summaryrefslogtreecommitdiff
path: root/src/toy_setup.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/toy_setup.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/toy_setup.c')
-rw-r--r--src/toy_setup.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/toy_setup.c b/src/toy_setup.c
deleted file mode 100644
index 228acbc..0000000
--- a/src/toy_setup.c
+++ /dev/null
@@ -1,37 +0,0 @@
-
-#include "fracture.h"
-
-bool break_fuses(unsigned int width, double *fuse_thres, double *field,
- bool *fuses) {
- assert(fuse_thres != NULL);
- assert(field != NULL);
- assert(fuses != NULL);
- unsigned int size = pow(width, 2);
-
- for (unsigned int i = 0; i < size; i++) {
- if (fuses[i]) {
- if (1 / fuse_thres[i] > field[i]) {
- fuses[i] = 0;
- }
- }
- }
-
- return true;
-}
-
-bool gen_toy_field(unsigned int width, double strength, double *field) {
- assert(field != NULL);
- unsigned int size = pow(width, 2);
-
- for (unsigned intint i = 0; i < size; i++) {
- int x = i / width + 1;
- int y = i % width + 1;
- if (y < (width + 1) / 2.)
- field[i] = fabs((width) / 2. - x) / strength;
- else
- field[i] =
- sqrt(pow((width) / 2. - x, 2) + pow((width) / 2. - y, 2)) / strength;
- }
-
- return true;
-}