summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpants <jaron@kent-dobias.com>2016-12-06 23:21:18 -0500
committerpants <jaron@kent-dobias.com>2016-12-06 23:21:18 -0500
commit97275c88a7ecec54f39a6c9f53c6512d25f2c99c (patch)
tree15fc57eda1e689d44e38590afe682ec2f6e105cc
parent088e7c73f95b968a833b7a7342e5e9f45f43086c (diff)
downloadfuse_networks-97275c88a7ecec54f39a6c9f53c6512d25f2c99c.tar.gz
fuse_networks-97275c88a7ecec54f39a6c9f53c6512d25f2c99c.tar.bz2
fuse_networks-97275c88a7ecec54f39a6c9f53c6512d25f2c99c.zip
changed fracture routine to also make percolation correction to the network for cluster statistics
-rw-r--r--src/fracture.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fracture.c b/src/fracture.c
index e11d352..d155b02 100644
--- a/src/fracture.c
+++ b/src/fracture.c
@@ -330,9 +330,11 @@ int main(int argc, char *argv[]) {
bool broken = net->fuses[j];
bool under_thres = net->thres[j] < net->thres[data->break_list[max_pos]];
bool zero_field = fabs(tmp_current[j]) < cutoff;
- if (!broken && under_thres && zero_field) would_break++;
+ if (!broken && under_thres && zero_field) {
+ break_edge(net, j, &c);
+ }
}
- damage[net->num_broken + would_break]++;
+ damage[net->num_broken]++;
free(tmp_current);
}