summaryrefslogtreecommitdiff
path: root/src/homo_voronoi_fracture.c
diff options
context:
space:
mode:
authorpants <jaron@kent-dobias.com>2016-08-30 13:57:08 -0400
committerpants <jaron@kent-dobias.com>2016-08-30 13:57:08 -0400
commitc2164e4a38b79c8a02bd7c0f4481f222c7b4dae6 (patch)
treebfc884782ff1171f1987deef09fcc137e4e9db29 /src/homo_voronoi_fracture.c
parent68c9e7c4937d391cad533a4e417bd11bfdb1e8b7 (diff)
downloadfuse_networks-c2164e4a38b79c8a02bd7c0f4481f222c7b4dae6.tar.gz
fuse_networks-c2164e4a38b79c8a02bd7c0f4481f222c7b4dae6.tar.bz2
fuse_networks-c2164e4a38b79c8a02bd7c0f4481f222c7b4dae6.zip
added ability to fracture triangulation instead of tiling
Diffstat (limited to 'src/homo_voronoi_fracture.c')
-rw-r--r--src/homo_voronoi_fracture.c10
1 files changed, 7 insertions, 3 deletions
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);