diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-04-19 13:31:16 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-04-19 13:31:16 -0400 |
commit | 1cd41b27808da0fe558cfe31dfc370a71ea2dc50 (patch) | |
tree | 235983765d267a5b95af90f8c82431bcc72d1732 /src | |
parent | ea4113e623170692a469f152752f9d583eecfedd (diff) | |
download | fuse_networks-1cd41b27808da0fe558cfe31dfc370a71ea2dc50.tar.gz fuse_networks-1cd41b27808da0fe558cfe31dfc370a71ea2dc50.tar.bz2 fuse_networks-1cd41b27808da0fe558cfe31dfc370a71ea2dc50.zip |
added support for rotating a lattice
Diffstat (limited to 'src')
-rw-r--r-- | src/sample.cpp | 8 | ||||
-rw-r--r-- | src/sample_fracture.cpp | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/sample.cpp b/src/sample.cpp index b8af937..488d20d 100644 --- a/src/sample.cpp +++ b/src/sample.cpp @@ -16,25 +16,25 @@ void sample::pre_fracture(const network& n) { sample_file << "<|"; sample_file << "\"vr\"->{"; for (const graph::vertex &v : n.G.vertices) { - sample_file << "{" << v.r.x << "," << v.r.y << "},"; + sample_file <<std::fixed<< "{" << v.r.x << "," << v.r.y << "},"; } sample_file << "},\"vp\"->{"; for (const graph::vertex &v : n.G.vertices) { sample_file << "{"; for (const graph::coordinate &r : v.polygon) { - sample_file << "{" << r.x << "," << r.y << "},"; + sample_file <<std::fixed<< "{" << r.x << "," << r.y << "},"; } sample_file << "},"; } sample_file << "},\"ur\"->{"; for (const graph::vertex &v : n.G.dual_vertices) { - sample_file << "{" << v.r.x << "," << v.r.y << "},"; + sample_file <<std::fixed<< "{" << v.r.x << "," << v.r.y << "},"; } sample_file << "},\"up\"->{"; for (const graph::vertex &v : n.G.dual_vertices) { sample_file << "{"; for (const graph::coordinate &r : v.polygon) { - sample_file << "{" << r.x << "," << r.y << "},"; + sample_file <<std::fixed<< "{" << r.x << "," << r.y << "},"; } sample_file << "},"; } diff --git a/src/sample_fracture.cpp b/src/sample_fracture.cpp index 42a6a5a..782b3e4 100644 --- a/src/sample_fracture.cpp +++ b/src/sample_fracture.cpp @@ -47,6 +47,7 @@ int main(int argc, char* argv[]) { CHOL_F(start)(&c); sample meas(Lx, Ly, beta); + //sample meas2(Ly, Lx, beta); randutils::auto_seed_128 seeds; std::mt19937 rng{seeds}; @@ -56,6 +57,12 @@ int main(int argc, char* argv[]) { network network(G, &c); network.set_thresholds(beta, rng); network.fracture(meas); + + /*graph G2 = G.rotate(); + class network network2(G2, &c); + network2.thresholds = network.thresholds; + network2.fracture(meas2); + */ } CHOL_F(finish)(&c); |