summaryrefslogtreecommitdiff
path: root/src/net_fracture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_fracture.c')
-rw-r--r--src/net_fracture.c10
1 files changed, 1 insertions, 9 deletions
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;