summaryrefslogtreecommitdiff
path: root/src/corr_test.c
blob: b6f8a1847a53741157881d7940bb2aeb112bcdb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

#include "fracture.h"

int main() {
	cholmod_common c;
	CHOL_F(start)(&c);

	unsigned int width = 64;

	graph_t *network = graph_create(VORONOI_LATTICE, TORUS_BOUND, 128, false, &c);
	net_t *instance = net_create(network, 1e-14, 3, 0, true, &c);
	net_fracture(instance, &c, 1e-10);

	double *corr = get_corr(instance, NULL, &c);

	for (int i = 0; i < 2 * width; i++) {
		printf("%g ", corr[i]);
	}
	printf("\n");

	net_free(instance, &c);
	graph_free(network, &c);

	CHOL_F(finish)(&c);

	return 0;
}