summaryrefslogtreecommitdiff
path: root/src/analysis_tools.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-12-28 17:33:35 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-12-28 17:33:35 -0500
commit9e1610143f0e96b77ca962a7113d79a2fbcbf6f5 (patch)
tree17d5f699769c9eb7cec602c19b68438e6e6cec14 /src/analysis_tools.cpp
parenta20ac5471a35c9c2a70b48fc4393d2323b52bd85 (diff)
downloadfuse_networks-9e1610143f0e96b77ca962a7113d79a2fbcbf6f5.tar.gz
fuse_networks-9e1610143f0e96b77ca962a7113d79a2fbcbf6f5.tar.bz2
fuse_networks-9e1610143f0e96b77ca962a7113d79a2fbcbf6f5.zip
partially fixed problems that arise in small systems by reworking the way that boundary edges are identified
Diffstat (limited to 'src/analysis_tools.cpp')
-rw-r--r--src/analysis_tools.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/analysis_tools.cpp b/src/analysis_tools.cpp
index 1e799bb..34e4ea0 100644
--- a/src/analysis_tools.cpp
+++ b/src/analysis_tools.cpp
@@ -102,12 +102,10 @@ std::list<unsigned int> find_minimal_crack(const Graph& G, const network& n) {
std::array<unsigned int, 2> crossing_count{0,0};
for (auto edge : cycle) {
- double dx = fabs(n.G.dual_vertices[n.G.dual_edges[edge].v[0]].r.x - n.G.dual_vertices[n.G.dual_edges[edge].v[1]].r.x);
- if (dx > n.G.L.x / 2) {
+ if (n.G.dual_edges[edge].crossings[0]) {
crossing_count[0]++;
}
- double dy = fabs(n.G.dual_vertices[n.G.dual_edges[edge].v[0]].r.y - n.G.dual_vertices[n.G.dual_edges[edge].v[1]].r.y);
- if (dy > n.G.L.y / 2) {
+ if (n.G.dual_edges[edge].crossings[1]) {
crossing_count[1]++;
}
}