summaryrefslogtreecommitdiff
path: root/src/gen_laplacian.c
diff options
context:
space:
mode:
authorpants <jaron@kent-dobias.com>2016-09-02 15:24:34 -0400
committerpants <jaron@kent-dobias.com>2016-09-02 15:24:34 -0400
commitfd14c5e39d962be94a1f68b0d4cacb7a4aa9c3e7 (patch)
tree9abbaf23c1a57985b90110ef33a5ed3455ab6b5a /src/gen_laplacian.c
parent7ff906b9cd27a44472b40e78e5d595ea41df1482 (diff)
downloadfuse_networks-fd14c5e39d962be94a1f68b0d4cacb7a4aa9c3e7.tar.gz
fuse_networks-fd14c5e39d962be94a1f68b0d4cacb7a4aa9c3e7.tar.bz2
fuse_networks-fd14c5e39d962be94a1f68b0d4cacb7a4aa9c3e7.zip
embedded systems with crack fully supported
Diffstat (limited to 'src/gen_laplacian.c')
-rw-r--r--src/gen_laplacian.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gen_laplacian.c b/src/gen_laplacian.c
index d8f0c6d..97a2c9d 100644
--- a/src/gen_laplacian.c
+++ b/src/gen_laplacian.c
@@ -159,14 +159,15 @@ cholmod_sparse *gen_laplacian(const finst *instance, cholmod_common *c,
}
if (network->boundary != TORUS_BOUND) {
+ if (network->boundary != EMBEDDED_BOUND) acoo[0]++;
+
if (voltage_bound) {
- for (unsigned int i = 0; i < 2; i++) {
+ for (unsigned int i = 0; i < num_bounds; i++) {
for (unsigned int j = 0; j < bound_inds[i + 1] - bound_inds[i]; j++) {
acoo[bound_verts[bound_inds[i] + j]]++;
}
}
} else {
- acoo[0]++;
for (unsigned int i = 0; i < num_bounds; i++) {
rowind[num_verts + i] = num_verts + i;
colind[num_verts + i] = num_verts + i;
@@ -181,7 +182,7 @@ cholmod_sparse *gen_laplacian(const finst *instance, cholmod_common *c,
unsigned int start = num_gverts;
- for (unsigned int i = 0; i < num_bounds; i++) {
+ for (unsigned int i = 0; i < 2; i++) {
for (unsigned int j = 0; j < bound_inds[i + 1] - bound_inds[i]; j++) {
rowind[start + bound_inds[i] + j] = bound_verts[bound_inds[i] + j];
colind[start + bound_inds[i] + j] = num_verts + i;