diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-23 23:19:13 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-23 23:19:13 -0400 |
commit | 3f7f20f21f583ca2de566bea08a87eac4b17ad29 (patch) | |
tree | ea55b8f42f797653ed2bac21ad0bf57bf95068f5 /src/animate.cpp | |
parent | 9e3726c6c7762f6292333f85117546acc01f5568 (diff) | |
download | fuse_networks-3f7f20f21f583ca2de566bea08a87eac4b17ad29.tar.gz fuse_networks-3f7f20f21f583ca2de566bea08a87eac4b17ad29.tar.bz2 fuse_networks-3f7f20f21f583ca2de566bea08a87eac4b17ad29.zip |
successfully implemented the backbone trimming with homespun graph algorithms, measurements have mostly been disabled and need to be migrated
Diffstat (limited to 'src/animate.cpp')
-rw-r--r-- | src/animate.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/animate.cpp b/src/animate.cpp index a7b6173..6c844d2 100644 --- a/src/animate.cpp +++ b/src/animate.cpp @@ -2,7 +2,7 @@ #include "animate.hpp" #include <iostream> -animate::animate(double Lx, double Ly, unsigned window_size, int argc, char *argv[]) : G(2 * (unsigned)ceil(Lx * Ly / 2)) { +animate::animate(double Lx, double Ly, unsigned window_size, int argc, char *argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize((unsigned)(Lx / Ly * window_size), window_size); @@ -16,7 +16,6 @@ animate::animate(double Lx, double Ly, unsigned window_size, int argc, char *arg void animate::pre_fracture(const network &n) { lv = std::numeric_limits<long double>::lowest(); avalanches = {}; - boost::remove_edge_if(trivial, G); seen_guy = false; glClearColor(1.0f, 1.0f, 1.0f, 1.0f ); @@ -59,7 +58,6 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i) avalanches.back().push_back(i); } - boost::add_edge(n.G.dual_edges[i].v[0], n.G.dual_edges[i].v[1], {i}, G); glClearColor(1.0f, 1.0f, 1.0f, 1.0f ); glClear(GL_COLOR_BUFFER_BIT); @@ -110,6 +108,11 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i) draw = true; } + if (cur.currents[j] > 1e-9 && n.backbone[j]) { + weird = true; + } + + if (draw) { graph::coordinate r1 = n.G.vertices[n.G.edges[j].v[0]].r; graph::coordinate r2 = n.G.vertices[n.G.edges[j].v[1]].r; |