diff options
author | Jaron <jaron@kent-dobias.com> | 2017-06-22 22:40:47 -0400 |
---|---|---|
committer | Jaron <jaron@kent-dobias.com> | 2017-06-22 22:40:47 -0400 |
commit | d59fc339a40a47405bfef8c1313e324adca70479 (patch) | |
tree | addf46044c3a1507bd4069797c6218c457b67e5f /src/fracture.c | |
parent | f4a50f1332ff323c42aa9664292910fd78933c15 (diff) | |
parent | 4764d5d407347d4dd5990411b243b3ec4bd75bff (diff) | |
download | fuse_networks-d59fc339a40a47405bfef8c1313e324adca70479.tar.gz fuse_networks-d59fc339a40a47405bfef8c1313e324adca70479.tar.bz2 fuse_networks-d59fc339a40a47405bfef8c1313e324adca70479.zip |
lots of changes for merge
Diffstat (limited to 'src/fracture.c')
-rw-r--r-- | src/fracture.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/fracture.c b/src/fracture.c index 168e519..73059ff 100644 --- a/src/fracture.c +++ b/src/fracture.c @@ -103,15 +103,23 @@ 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; lattice_c = 'h'; break; + case 3: + 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; @@ -270,7 +278,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); @@ -406,7 +414,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]; } @@ -415,7 +423,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"); |