diff options
Diffstat (limited to 'src/net_fracture.c')
-rw-r--r-- | src/net_fracture.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net_fracture.c b/src/net_fracture.c index 54f37dd..dcf67c9 100644 --- a/src/net_fracture.c +++ b/src/net_fracture.c @@ -44,7 +44,15 @@ data_t *net_fracture(net_t *net, cholmod_common *c, double cutoff) { uint_t last_broke = get_next_broken(net, currents, cutoff); - data_update(data, last_broke, fabs(conductivity * (net->thres)[last_broke] / currents[last_broke]), conductivity); + double sim_current; + + if (net->voltage_bound) { + sim_current = conductivity; + } else { + sim_current = 1; + } + + data_update(data, last_broke, fabs(sim_current * (net->thres)[last_broke] / currents[last_broke]), conductivity); free(voltages); free(currents); |