summaryrefslogtreecommitdiff
path: root/src/animate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animate.cpp')
-rw-r--r--src/animate.cpp9
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;