From fd14c5e39d962be94a1f68b0d4cacb7a4aa9c3e7 Mon Sep 17 00:00:00 2001 From: pants Date: Fri, 2 Sep 2016 15:24:34 -0400 Subject: embedded systems with crack fully supported --- src/gen_laplacian.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gen_laplacian.c') 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; -- cgit v1.2.3-70-g09d2