summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaron <jaron@heveled.ccmr.cornell.edu>2016-12-07 12:10:02 -0500
committerJaron <jaron@heveled.ccmr.cornell.edu>2016-12-07 12:10:02 -0500
commitcdb18338d3ae54785f311608d303420d5b47d698 (patch)
tree16755a1f559aaa9a70809fc9bf79dde0aa7bb16e /src
parentbc9431676787cc919741b447be82524c0a8bca6c (diff)
downloadfuse_networks-cdb18338d3ae54785f311608d303420d5b47d698.tar.gz
fuse_networks-cdb18338d3ae54785f311608d303420d5b47d698.tar.bz2
fuse_networks-cdb18338d3ae54785f311608d303420d5b47d698.zip
changed number of dual verts to be standard
Diffstat (limited to 'src')
-rw-r--r--src/graph_genfunc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graph_genfunc.c b/src/graph_genfunc.c
index 39a8480..54d9daa 100644
--- a/src/graph_genfunc.c
+++ b/src/graph_genfunc.c
@@ -2,7 +2,7 @@
#include "fracture.h"
double *genfunc_uniform(unsigned int L, bound_t boundary, gsl_rng *r, unsigned int *num) {
- *num = pow(L / 2 + 1, 2) + pow((L + 1) / 2, 2);
+ *num = 2 * pow(L / 2, 2);
double *lattice = (double *)malloc(2 * (*num) * sizeof(double));
for (unsigned int i = 0; i < (*num); i++) {
@@ -18,7 +18,7 @@ double g(double rho, double dist) {
}
double *genfunc_hyperuniform(unsigned int L, bound_t boundary, gsl_rng *r, unsigned int *num) {
- *num = pow(L / 2 + 1, 2) + pow((L + 1) / 2, 2);
+ *num = 2 * pow(L / 2, 2);
// necessary to prevent crashing when underflow occurs
gsl_set_error_handler_off();