summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fracture.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/fracture.c b/src/fracture.c
index 74ed676..79558c2 100644
--- a/src/fracture.c
+++ b/src/fracture.c
@@ -361,19 +361,7 @@ int main(int argc, char *argv[]) {
if (save_conductivity) conductivity[i] = data->conductivity[max_pos];
- if (save_damage) {
- uint_t num_dead = 0;
- double *tmp_voltages = net_voltages(net, &c);
- double *tmp_currents = net_currents(net, tmp_voltages, &c);
- for (uint_t i = 0; i < g->ne; i++) {
- if (!net->fuses[i] && fabs(tmp_currents[i]) < cutoff) {
- num_dead++;
- }
- }
- damage[max_pos + num_dead]++;
- free(tmp_voltages);
- free(tmp_currents);
- }
+ if (save_damage) damage[max_pos]++;
if (save_stress_field || save_voltage_field) {
double *tmp_voltages = net_voltages(net, &c);