#include "fracture.h" double *genfunc_uniform(unsigned int L, bound_t boundary, gsl_rng *r, unsigned int *num) { *num = 2 * pow(L / 2, 2); double *lattice = (double *)malloc(2 * (*num) * sizeof(double)); for (unsigned int i = 0; i < (*num); i++) { lattice[2*i] = gsl_ran_flat(r, 0, 1); lattice[2*i+1] = gsl_ran_flat(r, 0, 1); } return lattice; } double g(double rho, double dist) { return 1 - gsl_sf_exp(-M_PI * rho * dist); } double *genfunc_hyperuniform(unsigned int L, bound_t boundary, gsl_rng *r, unsigned int *num) { *num = 2 * pow(L / 2, 2); double *lattice = spheres(*num, 0.8, 0.5, 0.9, 100, 100000); return lattice; }