diff options
author | Jaron Kent-Dobias <jkentdobias@g.hmc.edu> | 2016-08-22 10:11:14 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jkentdobias@g.hmc.edu> | 2016-08-22 10:11:14 -0400 |
commit | 2bb0740b68fdb62d45adc00204b3990ca42ade77 (patch) | |
tree | a52975e3460da781467ddb70aaa8d76840d01bb4 /src/corr_test.c | |
download | fuse_networks-2bb0740b68fdb62d45adc00204b3990ca42ade77.tar.gz fuse_networks-2bb0740b68fdb62d45adc00204b3990ca42ade77.tar.bz2 fuse_networks-2bb0740b68fdb62d45adc00204b3990ca42ade77.zip |
started repo again without all the data files gunking the works
Diffstat (limited to 'src/corr_test.c')
-rw-r--r-- | src/corr_test.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/corr_test.c b/src/corr_test.c new file mode 100644 index 0000000..2c93b8e --- /dev/null +++ b/src/corr_test.c @@ -0,0 +1,30 @@ + +#include "fracture.h" + +int main() { + cholmod_common c; + CHOL_F(start)(&c); + + unsigned int width = 64; + unsigned int n = pow(width / 2 + 1, 2) + pow((width + 1) / 2, 2); + + fnet *network = ini_square_network(width, true, false, &c); + finst *instance = create_instance(network, 1e-14, true, true, &c); + double *fuse_thres = gen_fuse_thres(network->num_edges, network->edge_coords, + 0.001, beta_scaling_flat); + fracture_network(instance, fuse_thres, &c, 1e-10); + + double *corr = get_corr(instance, NULL, &c); + + for (int i = 0; i < 2 * width; i++) { + printf("%f ", corr[i]); + } + printf("\n"); + + free_instance(instance, &c); + free_fnet(network, &c); + + CHOL_F(finish)(&c); + + return 0; +} |