From 0ad947f800bcbe2c488d2d5cbcdb16c46e6d3857 Mon Sep 17 00:00:00 2001 From: Jaron Date: Tue, 8 Nov 2016 08:17:26 -0500 Subject: various changes, including adding central moments and changing the fuse thresholds to long doubles --- src/net.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net.c') diff --git a/src/net.c b/src/net.c index f3aeda9..444e76c 100644 --- a/src/net.c +++ b/src/net.c @@ -1,8 +1,8 @@ #include "fracture.h" -double *get_thres(uint_t ne, double beta) { - double *thres = (double *)malloc(ne * sizeof(double)); +long double *get_thres(uint_t ne, double beta) { + long double *thres = (long double *)malloc(ne * sizeof(long double)); assert(thres != NULL); gsl_rng *r = gsl_rng_alloc(GSL_RAND_GEN); @@ -39,7 +39,7 @@ void net_notch(net_t *net, double notch_len, cholmod_common *c) { correct_length = v1x < notch_len && v2x < notch_len; if (crosses_center && not_wrapping && correct_length) { - break_edge(net, i, c); + break_edge(net, i, c, false); } } } @@ -96,8 +96,8 @@ net_t *net_copy(const net_t *net, cholmod_common *c) { assert(net_copy->fuses != NULL); memcpy(net_copy->fuses, net->fuses, fuses_size); - size_t thres_size = (net->graph)->ne * sizeof(double); - net_copy->thres = (double *)malloc(thres_size); + size_t thres_size = (net->graph)->ne * sizeof(long double); + net_copy->thres = (long double *)malloc(thres_size); assert(net_copy->thres != NULL); memcpy(net_copy->thres, net->thres, thres_size); -- cgit v1.2.3-70-g09d2