From 873a9f9bedbbfb07d475e271923a7b86464e515f Mon Sep 17 00:00:00 2001 From: pants Date: Wed, 7 Sep 2016 14:55:30 -0400 Subject: more major refactoring --- src/fracture.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/fracture.c') diff --git a/src/fracture.c b/src/fracture.c index 23bce03..6053146 100644 --- a/src/fracture.c +++ b/src/fracture.c @@ -166,14 +166,14 @@ int main(int argc, char *argv[]) { genfunc_uniform, &c)) == NULL) ; perm_instance = create_instance(network, inf, voltage_bound, false, &c); - gen_crack(perm_instance, crack_len, crack_width, &c); + gen_crack(perm_instance, crack_len, &c); finish_instance(perm_instance, &c); } } else { network = ini_square_network(width, periodic, side_bounds, &c); crack_width = 1; perm_instance = create_instance(network, inf, voltage_bound, false, &c); - gen_crack(perm_instance, crack_len, crack_width, &c); + gen_crack(perm_instance, crack_len, &c); finish_instance(perm_instance, &c); c_dist_size = network->dnv; a_dist_size = network->nv; @@ -286,14 +286,14 @@ int main(int argc, char *argv[]) { genfunc_uniform, &c)) == NULL) ; perm_instance = create_instance(network, inf, voltage_bound, false, &c); - gen_crack(perm_instance, crack_len, crack_width, &c); + gen_crack(perm_instance, crack_len, &c); finish_instance(perm_instance, &c); if (supplied_bound) { voronoi_bound_ini(perm_instance, square_bound, width); } } double *fuse_thres = gen_fuse_thres( - network->ne, network->edge_coords, beta, beta_scaling_flat); + network->ne, network->ex, beta, beta_scaling_flat); finst *instance = copy_instance(perm_instance, &c); breaking_data = fracture_network(instance, fuse_thres, &c, cutoff); free_instance(instance, &c); @@ -414,8 +414,8 @@ int main(int argc, char *argv[]) { if (network_out) { FILE *net_out = fopen("network.txt", "w"); for (unsigned int i = 0; i < network->nv; i++) { - fprintf(net_out, "%f %f ", network->vert_coords[2 * i], - network->vert_coords[2 * i + 1]); + fprintf(net_out, "%f %f ", network->vx[2 * i], + network->vx[2 * i + 1]); } fprintf(net_out, "\n"); for (unsigned int i = 0; i < network->ne; i++) { @@ -424,8 +424,8 @@ int main(int argc, char *argv[]) { } fprintf(net_out, "\n"); for (unsigned int i = 0; i < network->dnv; i++) { - fprintf(net_out, "%f %f ", network->dual_vert_coords[2 * i], - network->dual_vert_coords[2 * i + 1]); + fprintf(net_out, "%f %f ", network->dvx[2 * i], + network->dvx[2 * i + 1]); } fprintf(net_out, "\n"); for (unsigned int i = 0; i < network->ne; i++) { -- cgit v1.2.3-70-g09d2