diff options
author | pants <jaron@kent-dobias.com> | 2016-09-12 11:28:59 -0400 |
---|---|---|
committer | pants <jaron@kent-dobias.com> | 2016-09-12 11:28:59 -0400 |
commit | a235904d571652e99edcc9ff9639ec39c8fbc456 (patch) | |
tree | 987166e04805d3c54fbe28a502642ae309aab494 /src/net.c | |
parent | 075347d995342171735b95ef3fff30f94f48fdf7 (diff) | |
download | fuse_networks-a235904d571652e99edcc9ff9639ec39c8fbc456.tar.gz fuse_networks-a235904d571652e99edcc9ff9639ec39c8fbc456.tar.bz2 fuse_networks-a235904d571652e99edcc9ff9639ec39c8fbc456.zip |
added preliminary support for gathering statistics at crack growth, not critical stress
Diffstat (limited to 'src/net.c')
-rw-r--r-- | src/net.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -57,8 +57,8 @@ net_t *net_create(const graph_t *g, double inf, double beta, double notch_len, b net->voltage_bound = vb; net->boundary_cond = bound_set(g, vb, notch_len, c); - if (g->boundary != TORUS_BOUND) net->adjacency = gen_adjacency(net, false, false, 0, c); - else net->adjacency = gen_adjacency(net, true, false, 0, c); + net->adjacency = gen_adjacency(net, false, false, 0, c); + net->dual_adjacency = gen_adjacency(net, true, false, 0, c); net->marks = (uint_t *)malloc((net->graph->break_dim) * sizeof(uint_t)); assert(net->marks != NULL); @@ -112,6 +112,7 @@ net_t *net_copy(const net_t *net, cholmod_common *c) { memcpy(net_copy->dual_marks, net->dual_marks, dual_marks_size); net_copy->adjacency = CHOL_F(copy_sparse)(net->adjacency, c); + net_copy->dual_adjacency = CHOL_F(copy_sparse)(net->dual_adjacency, c); net_copy->boundary_cond = CHOL_F(copy_dense)(net->boundary_cond, c); net_copy->factor = CHOL_F(copy_factor)(net->factor, c); @@ -123,6 +124,7 @@ void net_free(net_t *net, cholmod_common *c) { free(net->thres); CHOL_F(free_dense)(&(net->boundary_cond), c); CHOL_F(free_sparse)(&(net->adjacency), c); + CHOL_F(free_sparse)(&(net->dual_adjacency), c); CHOL_F(free_factor)(&(net->factor), c); free(net->marks); free(net->dual_marks); |