diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/anal_process.c | 1 | ||||
-rw-r--r-- | src/fracture.c | 24 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/anal_process.c b/src/anal_process.c index ed2f1f7..694b453 100644 --- a/src/anal_process.c +++ b/src/anal_process.c @@ -5,7 +5,6 @@ #include <gsl/gsl_matrix.h> #include <gsl/gsl_vector.h> #include <gsl/gsl_blas.h> -#include <gsl/gsl_multifit_nlinear.h> void mom(uint_t len, uint_t n, uint32_t *data, double result[2]) { uint_t total = 0; diff --git a/src/fracture.c b/src/fracture.c index 305b5e3..79558c2 100644 --- a/src/fracture.c +++ b/src/fracture.c @@ -52,6 +52,7 @@ int main(int argc, char *argv[]) { char boundc2 = 'f'; uint8_t lattice_i; char lattice_c = 'v'; + char dual_c = 'o'; // get commandline options @@ -127,6 +128,7 @@ int main(int argc, char *argv[]) { break; case 'D': use_dual = true; + dual_c = 'd'; break; case 'c': save_cluster_dist = true; @@ -168,7 +170,7 @@ int main(int argc, char *argv[]) { FILE *data_out; if (save_data) { char *data_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(data_filename, filename_len, "data_%c_%c_%c_%u_%g_%g.txt", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(data_filename, filename_len, "data_%c_%c_%c_%c_%u_%g_%g.txt", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); data_out = fopen(data_filename, "a"); free(data_filename); } @@ -196,8 +198,8 @@ int main(int argc, char *argv[]) { c_filename = (char *)malloc(filename_len * sizeof(char)); a_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(c_filename, filename_len, "cstr_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); - snprintf(a_filename, filename_len, "avln_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(c_filename, filename_len, "cstr_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); + snprintf(a_filename, filename_len, "avln_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *cluster_out = fopen(c_filename, "rb"); FILE *avalanche_out = fopen(a_filename, "rb"); @@ -248,7 +250,7 @@ int main(int argc, char *argv[]) { (uint32_t *)calloc(max_edges, sizeof(uint32_t)); d_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(d_filename, filename_len, "damg_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(d_filename, filename_len, "damg_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *damage_out = fopen(d_filename, "rb"); @@ -481,7 +483,7 @@ int main(int argc, char *argv[]) { if (save_voltage_field) { char *vfld_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(vfld_filename, filename_len, "vfld_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(vfld_filename, filename_len, "vfld_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *vfld_file = fopen(vfld_filename, "ab"); fwrite(voltage_field, sizeof(double), 3 * voltage_pos, vfld_file); fclose(vfld_file); @@ -491,7 +493,7 @@ int main(int argc, char *argv[]) { if (save_stress_field) { char *cfld_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(cfld_filename, filename_len, "cfld_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(cfld_filename, filename_len, "cfld_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *cfld_file = fopen(cfld_filename, "ab"); fwrite(stress_field, sizeof(double), 3 * stress_pos, cfld_file); fclose(cfld_file); @@ -501,7 +503,7 @@ int main(int argc, char *argv[]) { if (save_damage_field) { char *dfld_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(dfld_filename, filename_len, "dfld_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(dfld_filename, filename_len, "dfld_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *dfld_file = fopen(dfld_filename, "ab"); fwrite(damage_field, sizeof(double), 2 * damage_pos, dfld_file); fclose(dfld_file); @@ -511,7 +513,7 @@ int main(int argc, char *argv[]) { if (save_conductivity) { char *cond_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(cond_filename, filename_len, "cond_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(cond_filename, filename_len, "cond_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *cond_file = fopen(cond_filename, "ab"); fwrite(conductivity, sizeof(double), N, cond_file); fclose(cond_file); @@ -521,7 +523,7 @@ int main(int argc, char *argv[]) { if (save_toughness) { char *tough_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(tough_filename, filename_len, "tuff_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(tough_filename, filename_len, "tuff_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *tough_file = fopen(tough_filename, "ab"); fwrite(toughness, sizeof(double), N, tough_file); fclose(tough_file); @@ -531,7 +533,7 @@ int main(int argc, char *argv[]) { if (save_threshold) { char *thres_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(thres_filename, filename_len, "thrs_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(thres_filename, filename_len, "thrs_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *thres_file = fopen(thres_filename, "ab"); fwrite(thresholds, sizeof(double), N, thres_file); fclose(thres_file); @@ -553,7 +555,7 @@ int main(int argc, char *argv[]) { if (save_crit_stress) { char *str_filename = (char *)malloc(filename_len * sizeof(char)); - snprintf(str_filename, filename_len, "strs_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); + snprintf(str_filename, filename_len, "strs_%c_%c_%c_%c_%d_%g_%g.dat", lattice_c, dual_c, boundc, boundc2, L, beta, crack_len); FILE *str_file = fopen(str_filename, "ab"); fwrite(crit_stress, sizeof(double), N, str_file); fclose(str_file); |