summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron <jaron@kent-dobias.com>2016-10-24 09:21:27 -0400
committerJaron <jaron@kent-dobias.com>2016-10-24 09:21:27 -0400
commite7e9eba1f5c6e79dc8b83ac0738d78c6dae04269 (patch)
treede07d59c56a468ea08e3b03c824d5a98e56729f5
parent383cedbc5d37c582ec24ffd566c833d491eb2089 (diff)
downloadfuse_networks-e7e9eba1f5c6e79dc8b83ac0738d78c6dae04269.tar.gz
fuse_networks-e7e9eba1f5c6e79dc8b83ac0738d78c6dae04269.tar.bz2
fuse_networks-e7e9eba1f5c6e79dc8b83ac0738d78c6dae04269.zip
changed damage back to how it worked before
-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);