summaryrefslogtreecommitdiff
path: root/src/get_current.c
diff options
context:
space:
mode:
authorpants <jaron@kent-dobias.com>2016-09-07 20:14:05 -0400
committerpants <jaron@kent-dobias.com>2016-09-07 20:14:05 -0400
commit3c5671310bdada56f5e087b951ac2e4d6086dfbf (patch)
tree361c4d0c60cddaf0c286f6d8d4f3e776b990d48a /src/get_current.c
parent6590154ae3e4ee97e5e1a2792f9f2ebf716ed251 (diff)
downloadfuse_networks-3c5671310bdada56f5e087b951ac2e4d6086dfbf.tar.gz
fuse_networks-3c5671310bdada56f5e087b951ac2e4d6086dfbf.tar.bz2
fuse_networks-3c5671310bdada56f5e087b951ac2e4d6086dfbf.zip
got square network embedded working, torus still broken
Diffstat (limited to 'src/get_current.c')
-rw-r--r--src/get_current.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/get_current.c b/src/get_current.c
index bc786f9..8493370 100644
--- a/src/get_current.c
+++ b/src/get_current.c
@@ -8,9 +8,12 @@ double *get_voltage(const net_t *instance, cholmod_common *c) {
cholmod_dense *x = CHOL_F(solve)(CHOLMOD_A, factor, b, c);
if (((double *)x->x)[0] != ((double *)x->x)[0]) {
- printf("ERROR: GET_VOLTAGE FAILED\n\n");
- CHOL_F(free_dense)(&x, c);
- return NULL;
+ for (uint_t i = 0; i < instance->graph->ne; i++) {
+ printf("%d ", instance->fuses[i]);
+ }
+ printf("\n");
+ printf("GET_VOLTAGE: value is NaN\n");
+ exit(EXIT_FAILURE);
}
double *field = (double *)x->x;