From 1e1fdfc2e3892667bccaf317a01defd8832041c7 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 16 Jan 2017 01:31:10 -0500 Subject: fixed voltage and torus conditions, current and free boundaries and broken right now --- src/net_fracture.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/net_fracture.c') diff --git a/src/net_fracture.c b/src/net_fracture.c index 71e8c4b..e7f18fc 100644 --- a/src/net_fracture.c +++ b/src/net_fracture.c @@ -38,7 +38,7 @@ data_t *net_fracture(net_t *net, cholmod_common *c, double cutoff) { double conductivity = net_conductivity(net, voltages); - if (conductivity < 1e-12 && net->graph->boundary == TORUS_BOUND) { + if (conductivity < cutoff) { free(voltages); free(currents); break; @@ -60,14 +60,6 @@ data_t *net_fracture(net_t *net, cholmod_common *c, double cutoff) { free(currents); break_edge(net, last_broke, c); - - if (net->num_components > 1 && net->graph->boundary == TORUS_BOUND) { - break; - } - - if (net->marks[net->graph->nv] != net->marks[net->graph->nv + 1] && net->graph->boundary != TORUS_BOUND) { - break; - } } return data; -- cgit v1.2.3-70-g09d2