summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron <jaron@kent-dobias.com>2016-10-17 08:52:20 -0400
committerJaron <jaron@kent-dobias.com>2016-10-17 08:52:20 -0400
commit381d78796e69624635ecb35ecca833d5c6ece151 (patch)
tree7a61a9c5cc67fe363502ace2e05f4e5cc09d81c0
parent52e79c6f3ba3360501a7849df3bef3c6292dca08 (diff)
downloadfuse_networks-381d78796e69624635ecb35ecca833d5c6ece151.tar.gz
fuse_networks-381d78796e69624635ecb35ecca833d5c6ece151.tar.bz2
fuse_networks-381d78796e69624635ecb35ecca833d5c6ece151.zip
added processed data to repo, changed damage to include dangling bonds
-rw-r--r--data/processed/avln_v_o_c_c.txt15
-rw-r--r--data/processed/cstr_v_o_c_c.txt15
-rw-r--r--data/processed/damg_v_o_c_c.txt15
-rw-r--r--src/anal_process.c13
-rw-r--r--src/fracture.c14
5 files changed, 69 insertions, 3 deletions
diff --git a/data/processed/avln_v_o_c_c.txt b/data/processed/avln_v_o_c_c.txt
new file mode 100644
index 0000000..e97041c
--- /dev/null
+++ b/data/processed/avln_v_o_c_c.txt
@@ -0,0 +1,15 @@
+128 16 0.109013 0.00330394 0.212687 0.0109343 0.600801 0.0584475
+16 11.3137 0.00995582 0.000201815 0.0114875 0.000283553 0.0148699 0.000570157
+16 13.4543 0.00657932 0.000185752 0.00735777 0.000245694 0.00905535 0.000450994
+16 16 0.0048951 0.000179248 0.00539533 0.00023202 0.00650298 0.000423022
+16 8 0.0250264 0.000340175 0.0303557 0.000532917 0.0429356 0.0012422
+16 9.51366 0.0151254 0.000214827 0.017642 0.000306636 0.0232087 0.00060769
+32 11.3137 0.0475862 0.000654373 0.0682715 0.00131284 0.122249 0.00378682
+32 13.4543 0.0362891 0.000650562 0.0498816 0.00123653 0.0843465 0.00355508
+32 16 0.0318103 0.000707154 0.0456046 0.00149188 0.0837857 0.0050402
+32 8 0.084141 0.000930635 0.134131 0.0023016 0.286722 0.00901936
+32 9.51366 0.062882 0.000654421 0.0941775 0.00147487 0.183807 0.00552799
+64 11.3137 0.0981978 0.00211927 0.184413 0.00692219 0.508962 0.0363792
+64 13.4543 0.083924 0.00159642 0.148132 0.00466793 0.368935 0.0219483
+64 16 0.0751256 0.00174541 0.131022 0.00494065 0.318569 0.0218922
+64 9.51366 0.117597 0.00194366 0.227093 0.00673048 0.653297 0.0414158
diff --git a/data/processed/cstr_v_o_c_c.txt b/data/processed/cstr_v_o_c_c.txt
new file mode 100644
index 0000000..1b57cae
--- /dev/null
+++ b/data/processed/cstr_v_o_c_c.txt
@@ -0,0 +1,15 @@
+128 16 0.00035695 3.10133e-06 0.00064004 1.03726e-05 0.00176453 5.90607e-05
+16 11.3137 0.00418856 8.43795e-06 0.00526377 1.37328e-05 0.00776761 3.22015e-05
+16 13.4543 0.00313946 7.25345e-06 0.00389373 1.14416e-05 0.00560723 2.53456e-05
+16 16 0.00245955 6.39132e-06 0.00302519 9.94209e-06 0.00430165 2.17532e-05
+16 8 0.00807703 1.69589e-05 0.0105904 2.99998e-05 0.0167723 7.87939e-05
+16 9.51366 0.00576328 9.99092e-06 0.00736806 1.68059e-05 0.0111849 4.10585e-05
+32 11.3137 0.00269729 7.59462e-06 0.00401282 1.72517e-05 0.00787858 6.26018e-05
+32 13.4543 0.00199157 6.54779e-06 0.00298492 1.47247e-05 0.00584694 5.15898e-05
+32 16 0.00153758 5.74938e-06 0.0023024 1.27761e-05 0.00447655 4.35136e-05
+32 8 0.00536907 1.52468e-05 0.00806506 3.64711e-05 0.016428 0.000143674
+32 9.51366 0.00375918 8.98874e-06 0.00561532 2.08738e-05 0.0112047 7.76832e-05
+64 11.3137 0.00147259 8.48793e-06 0.00243211 2.49166e-05 0.00592412 0.000124085
+64 13.4543 0.00104589 5.10721e-06 0.00176182 1.52008e-05 0.00435362 7.83207e-05
+64 16 0.000780231 4.44632e-06 0.00133571 1.30838e-05 0.00329601 6.6331e-05
+64 9.51366 0.00216342 1.02305e-05 0.00353078 3.07692e-05 0.00866497 0.000165151
diff --git a/data/processed/damg_v_o_c_c.txt b/data/processed/damg_v_o_c_c.txt
new file mode 100644
index 0000000..5d76f09
--- /dev/null
+++ b/data/processed/damg_v_o_c_c.txt
@@ -0,0 +1,15 @@
+128 16 59.449 0.947709 3592.61 58.6469 220598 3741.47
+16 11.3137 8.17654 0.0170937 74.802 0.178947 751.475 2.18112
+16 13.4543 7.99741 0.0167274 71.6306 0.171577 704.984 2.04693
+16 16 7.89656 0.0165198 69.8638 0.167216 678.911 1.96142
+16 8 8.79941 0.0183537 86.2359 0.205204 925.793 2.66938
+16 9.51366 8.43106 0.0176119 79.4058 0.189887 821.225 2.39156
+32 11.3137 16.0827 0.0655088 274.649 1.21176 4953.58 24.654
+32 13.4543 15.7119 0.0640451 262.513 1.16073 4637.03 23.1836
+32 16 15.43 0.0628926 253.151 1.11937 4391.19 21.9493
+32 8 17.6065 0.0716557 328.61 1.4483 6473.57 32.4351
+32 9.51366 16.7187 0.0680883 296.705 1.30996 5562.39 27.9371
+64 11.3137 31.7059 0.254704 1037.99 8.7258 35039 316.559
+64 13.4543 30.8385 0.247825 982.678 8.27233 32309.2 293.039
+64 16 30.1852 0.242573 941.467 7.92239 30293.5 273.978
+64 9.51366 33.2509 0.267068 1141.21 9.59192 40380.9 365.914
diff --git a/src/anal_process.c b/src/anal_process.c
index 694b453..c66aea0 100644
--- a/src/anal_process.c
+++ b/src/anal_process.c
@@ -31,6 +31,8 @@ int main(int argc, char *argv[]) {
uint_t nc = argc - 1;
uint_t *Ls_c = (uint_t *)malloc(nc * sizeof(uint_t));
double *betas_c = (double *)malloc(nc * sizeof(double));
+ double *vals_c1 = (double *)malloc(nc * sizeof(double));
+ double *errors_c1 = (double *)malloc(nc * sizeof(double));
double *vals_c2 = (double *)malloc(nc * sizeof(double));
double *errors_c2 = (double *)malloc(nc * sizeof(double));
double *vals_c3 = (double *)malloc(nc * sizeof(double));
@@ -43,7 +45,7 @@ int main(int argc, char *argv[]) {
char *fn = argv[1 + i];
char *buff = (char *)malloc(20 * sizeof(char));
uint_t pos = 0; uint_t c = 0;
- while (c < 4) {
+ while (c < 5) {
if (fn[pos] == '_') {
c++;
}
@@ -78,6 +80,11 @@ int main(int argc, char *argv[]) {
fread(dist, sizeof(uint32_t), dist_len, dist_file);
fclose(dist_file);
{
+ double mom1[2];
+ mom(dist_len, 1, dist, mom1);
+ vals_c1[i] = mom1[0];
+ errors_c1[i] = mom1[1];
+
double mom2[2];
mom(dist_len, 2, dist, mom2);
vals_c2[i] = mom2[0];
@@ -100,7 +107,7 @@ int main(int argc, char *argv[]) {
FILE *out_file = fopen(out_filename, "w");
for (uint_t i = 0; i < nc; i++) {
- fprintf(out_file, "%u %g %g %g %g %g\n", Ls_c[i], betas_c[i], vals_c2[i], errors_c2[i], vals_c3[i], errors_c3[i]);
+ fprintf(out_file, "%u %g %g %g %g %g %g %g\n", Ls_c[i], betas_c[i], vals_c1[i], errors_c1[i], vals_c2[i], errors_c2[i], vals_c3[i], errors_c3[i]);
}
fclose(out_file);
@@ -108,6 +115,8 @@ int main(int argc, char *argv[]) {
free(Ls_c);
free(betas_c);
+ free(vals_c1);
+ free(errors_c1);
free(vals_c2);
free(errors_c2);
free(vals_c3);
diff --git a/src/fracture.c b/src/fracture.c
index 79558c2..74ed676 100644
--- a/src/fracture.c
+++ b/src/fracture.c
@@ -361,7 +361,19 @@ int main(int argc, char *argv[]) {
if (save_conductivity) conductivity[i] = data->conductivity[max_pos];
- if (save_damage) damage[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_stress_field || save_voltage_field) {
double *tmp_voltages = net_voltages(net, &c);