summaryrefslogtreecommitdiff
path: root/src/update_beta.c
diff options
context:
space:
mode:
authorpants <jaron@kent-dobias.com>2016-09-08 11:54:06 -0400
committerpants <jaron@kent-dobias.com>2016-09-08 11:54:06 -0400
commitb74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11 (patch)
treec3fa46f10f6ae8604c4e784febc3eaa49b51b821 /src/update_beta.c
parenta264723b23d9ad6c3cb13450a6cf4b131f8d7338 (diff)
downloadfuse_networks-b74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11.tar.gz
fuse_networks-b74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11.tar.bz2
fuse_networks-b74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11.zip
cleaned up old files that don't matter
Diffstat (limited to 'src/update_beta.c')
-rw-r--r--src/update_beta.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/update_beta.c b/src/update_beta.c
deleted file mode 100644
index 4c1bf65..0000000
--- a/src/update_beta.c
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#include "fracture.h"
-
-double f(double damage) {
- assert(damage <= 1 && damage >= 0);
- return sqrt(1 - sqrt(1 - damage));
- // return 0.5 - 0.68182 * (0.5 - damage);
-}
-
-double update_beta(double beta, unsigned int width, const double *stress,
- const double *damage, double bound_total) {
-
- double total = 0;
- unsigned int num_totaled = 0;
-
- for (unsigned int i = 0; i < pow(width, 2); i++) {
- unsigned int stress_index =
- width / 4 + (width / 4 + (i / width) / 2) * width + (i % width) / 2;
- double outer_damage = f(pow(fabs(stress[i]), beta));
- double inner_stress = fabs(2 * stress[stress_index] / bound_total);
-
- if (outer_damage > 0 && inner_stress > 0 && inner_stress != 1) {
- total += log(outer_damage) / log(inner_stress);
- num_totaled++;
- }
- }
-
- assert(num_totaled > 0);
- assert(total == total);
-
- double new_beta = total / num_totaled;
-
- return new_beta;
-}