From 901b9f16494f37890be17ef4bb66e6efc6873340 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 10 Feb 2017 12:18:11 -0500 Subject: changed code to rely on jst --- src/fracture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fracture.c') diff --git a/src/fracture.c b/src/fracture.c index 6ad2f26..fd9de61 100644 --- a/src/fracture.c +++ b/src/fracture.c @@ -261,7 +261,7 @@ int main(int argc, char *argv[]) { for (uint32_t i = 0; i < N; i++) { printf("\033[F\033[JFRACTURE: %0*d / %d\n", (uint8_t)log10(N) + 1, i + 1, N); - graph_t *g = graph_create(lattice, boundary, L, use_dual, &c); + graph_t *g = graph_create(lattice, boundary, L, use_dual); net_t *net = net_create(g, inf, beta, crack_len, use_voltage_boundaries, &c); net_t *tmp_net = net_copy(net, &c); data_t *data = net_fracture(tmp_net, &c, cutoff); @@ -394,7 +394,7 @@ int main(int argc, char *argv[]) { } if (save_cluster_dist) { - uint_t *tmp_cluster_dist = get_cluster_dist(net, &c); + uint_t *tmp_cluster_dist = get_cluster_dist(net); for (uint_t j = 0; j < g->dnv; j++) { cluster_size_dist[j] += tmp_cluster_dist[j]; } @@ -403,7 +403,7 @@ int main(int argc, char *argv[]) { net_free(net, &c); - graph_free(g, &c); + graph_free(g); } printf("\033[F\033[JFRACTURE: COMPLETE\n"); -- cgit v1.2.3-70-g09d2 From d1ee045f36c82716142b2acde5036a4660d0a8cc Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 10 Feb 2017 13:02:22 -0500 Subject: added option for fracturing triangluar lattices --- src/fracture.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/fracture.c') diff --git a/src/fracture.c b/src/fracture.c index 52db2d8..c2b2a34 100644 --- a/src/fracture.c +++ b/src/fracture.c @@ -110,6 +110,10 @@ int main(int argc, char *argv[]) { lattice = VORONOI_HYPERUNIFORM_LATTICE; lattice_c = 'h'; break; + case 3: + lattice = TRIANGULAR_LATTICE; + lattice_c = 't'; + break; default: printf("lattice specifier must be 0 (VORONOI_LATTICE), 1 (SQUARE_LATTICE), or 2 (VORONOI_HYPERUNIFORM_LATTICE).\n"); exit(EXIT_FAILURE); -- cgit v1.2.3-70-g09d2 From 23682e445ba64452c453346f516f9101761438ba Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 7 Jun 2017 15:19:29 -0400 Subject: modified lattice options to rename SQUARE to DIAGONAL and add SQUARE --- src/fracture.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/fracture.c') diff --git a/src/fracture.c b/src/fracture.c index c2b2a34..73059ff 100644 --- a/src/fracture.c +++ b/src/fracture.c @@ -103,8 +103,8 @@ int main(int argc, char *argv[]) { lattice_c = 'v'; break; case 1: - lattice = SQUARE_LATTICE; - lattice_c = 's'; + lattice = DIAGONAL_LATTICE; + lattice_c = 'd'; break; case 2: lattice = VORONOI_HYPERUNIFORM_LATTICE; @@ -114,8 +114,12 @@ int main(int argc, char *argv[]) { lattice = TRIANGULAR_LATTICE; lattice_c = 't'; break; + case 4: + lattice = SQUARE_LATTICE; + lattice_c = 's'; + break; default: - printf("lattice specifier must be 0 (VORONOI_LATTICE), 1 (SQUARE_LATTICE), or 2 (VORONOI_HYPERUNIFORM_LATTICE).\n"); + printf("lattice specifier must be 0 (VORONOI_LATTICE), 1 (DIAGONAL_LATTICE), or 2 (VORONOI_HYPERUNIFORM_LATTICE).\n"); exit(EXIT_FAILURE); } break; -- cgit v1.2.3-70-g09d2