summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-01-24 14:32:04 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-01-24 14:32:04 -0500
commit9c5779adc0a52cb88ccbfa315cf11544f00148bb (patch)
tree895c71552a1b5fad3f09d274869dfe378f198cb6 /src
parent747f0c3df40e08d1b9aaa15bee614fae4bdb008b (diff)
downloadfuse_networks-9c5779adc0a52cb88ccbfa315cf11544f00148bb.tar.gz
fuse_networks-9c5779adc0a52cb88ccbfa315cf11544f00148bb.tar.bz2
fuse_networks-9c5779adc0a52cb88ccbfa315cf11544f00148bb.zip
simplified random graph creation to only use uniform voronoi sites
Diffstat (limited to 'src')
-rw-r--r--src/animate_fracture.cpp8
-rw-r--r--src/fracture.cpp8
2 files changed, 4 insertions, 12 deletions
diff --git a/src/animate_fracture.cpp b/src/animate_fracture.cpp
index 62c5b1e..9ae79cc 100644
--- a/src/animate_fracture.cpp
+++ b/src/animate_fracture.cpp
@@ -34,9 +34,8 @@ int main(int argc, char* argv[]) {
double Lx = 16.0;
double Ly = 16.0;
double beta = 0.5;
- double w = 0.01;
- while ((opt = getopt(argc, argv, "X:Y:N:b:w:")) != -1) {
+ while ((opt = getopt(argc, argv, "X:Y:N:b:")) != -1) {
switch (opt) {
case 'N':
N = (unsigned int)atof(optarg);
@@ -50,9 +49,6 @@ int main(int argc, char* argv[]) {
case 'b':
beta = atof(optarg);
break;
- case 'w':
- w = atof(optarg);
- break;
default:
exit(1);
}
@@ -67,7 +63,7 @@ int main(int argc, char* argv[]) {
std::mt19937 rng{seeds};
for (unsigned int trial = 0; trial < N; trial++) {
- graph G(Lx, Ly, rng, w);
+ graph G(Lx, Ly, rng);
network network(G, &c);
network.set_thresholds(beta, rng);
network.fracture(meas);
diff --git a/src/fracture.cpp b/src/fracture.cpp
index 47b4856..3505166 100644
--- a/src/fracture.cpp
+++ b/src/fracture.cpp
@@ -34,9 +34,8 @@ int main(int argc, char* argv[]) {
double Lx = 16;
double Ly = 16;
double beta = 0.5;
- double w = 0.01;
- while ((opt = getopt(argc, argv, "N:X:Y:b:w:")) != -1) {
+ while ((opt = getopt(argc, argv, "N:X:Y:b:")) != -1) {
switch (opt) {
case 'N':
N = (unsigned int)atof(optarg);
@@ -50,9 +49,6 @@ int main(int argc, char* argv[]) {
case 'b':
beta = atof(optarg);
break;
- case 'w':
- w = atof(optarg);
- break;
default:
exit(1);
}
@@ -69,7 +65,7 @@ int main(int argc, char* argv[]) {
for (unsigned int trial = 0; trial < N; trial++) {
while (true) {
try {
- graph G(Lx, Ly, rng, w);
+ graph G(Lx, Ly, rng);
network network(G, &c);
network.set_thresholds(beta, rng);
network.fracture(meas);