From c2164e4a38b79c8a02bd7c0f4481f222c7b4dae6 Mon Sep 17 00:00:00 2001 From: pants Date: Tue, 30 Aug 2016 13:57:08 -0400 Subject: added ability to fracture triangulation instead of tiling --- src/homo_voronoi_fracture.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/homo_voronoi_fracture.c') diff --git a/src/homo_voronoi_fracture.c b/src/homo_voronoi_fracture.c index 4ba0244..4e2d67a 100644 --- a/src/homo_voronoi_fracture.c +++ b/src/homo_voronoi_fracture.c @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) { unsigned int N, L, filename_len; double beta, inf, cutoff; boundary_type boundary; - bool include_breaking, save_cluster_dist, use_voltage_boundaries, save_network, + bool include_breaking, save_cluster_dist, use_voltage_boundaries, use_dual, save_network, save_crit_stress, save_toughness, save_corr, save_conductivity, save_damage; @@ -24,6 +24,7 @@ int main(int argc, char *argv[]) { include_breaking = false; save_cluster_dist = false; use_voltage_boundaries = false; + use_dual = false; save_network = false; save_crit_stress = false; save_damage = false; @@ -34,7 +35,7 @@ int main(int argc, char *argv[]) { int boundary_int; char boundc2 = 'f'; - while ((opt = getopt(argc, argv, "n:L:b:B:dVcoNsCrt")) != -1) { + while ((opt = getopt(argc, argv, "n:L:b:B:dVcoNsCrtD")) != -1) { switch (opt) { case 'n': N = atoi(optarg); @@ -71,6 +72,9 @@ int main(int argc, char *argv[]) { case 'V': use_voltage_boundaries = true; break; + case 'D': + use_dual = true; + break; case 'c': save_cluster_dist = true; break; @@ -203,7 +207,7 @@ int main(int argc, char *argv[]) { for (unsigned int i = 0; i < N; i++) { printf("\033[F\033[JFRACTURE: %0*d / %d\n", (int)log10(N) + 1, i + 1, N); - fnet *network = ini_voronoi_network(L, boundary, genfunc_hyperuniform, &c); + fnet *network = ini_voronoi_network(L, boundary, use_dual, genfunc_hyperuniform, &c); finst *perm_instance = create_instance(network, inf, use_voltage_boundaries, true, &c); double *fuse_thres = gen_fuse_thres(network->num_edges, network->edge_coords, beta, beta_scaling_flat); finst *instance = copy_instance(perm_instance, &c); -- cgit v1.2.3-70-g09d2