From 3f7f20f21f583ca2de566bea08a87eac4b17ad29 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 23 Sep 2019 23:19:13 -0400 Subject: successfully implemented the backbone trimming with homespun graph algorithms, measurements have mostly been disabled and need to be migrated --- src/animate.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/animate.cpp') 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 -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::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; -- cgit v1.2.3-70-g09d2