From 4f4cf365eae07e04298459bf8f9e27ad0cfcc834 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 5 Dec 2018 19:16:28 -0500 Subject: now takes Lx and Ly for anisotropic fracture --- src/fracture.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/fracture.cpp') diff --git a/src/fracture.cpp b/src/fracture.cpp index 0aad56e..317d91b 100644 --- a/src/fracture.cpp +++ b/src/fracture.cpp @@ -31,16 +31,20 @@ int main(int argc, char* argv[]) { int opt; unsigned int N = 1; - unsigned int L = 16; + unsigned int Lx = 16; + unsigned int Ly = 16; double beta = 0.5; - while ((opt = getopt(argc, argv, "N:L:b:")) != -1) { + while ((opt = getopt(argc, argv, "N:X:Y:b:")) != -1) { switch (opt) { case 'N': N = (unsigned int)atof(optarg); break; - case 'L': - L = atoi(optarg); + case 'X': + Lx = atoi(optarg); + break; + case 'Y': + Ly = atoi(optarg); break; case 'b': beta = atof(optarg); @@ -53,9 +57,9 @@ int main(int argc, char* argv[]) { cholmod_common c; CHOL_F(start)(&c); - graph G(L); + graph G(Lx, Ly); network base_network(G, &c); - ma meas(L, beta); + ma meas(Lx, Ly, beta); randutils::auto_seed_128 seeds; std::mt19937 rng{seeds}; -- cgit v1.2.3-70-g09d2