Commit e9f650e4 authored by Max Lyon's avatar Max Lyon
Browse files

only warn about transitioning through degenerate face when tracing

parent 3f76bc7e
...@@ -86,7 +86,8 @@ HexExtractor::HexExtractor() ...@@ -86,7 +86,8 @@ HexExtractor::HexExtractor()
numDartsTraced(0), numDartsTraced(0),
numDartTraceLoops(0), numDartTraceLoops(0),
callsToFindPort(0), callsToFindPort(0),
portsCheckedInFindPort(0) portsCheckedInFindPort(0),
tracing(false)
{ {
exactinit(); exactinit();
...@@ -841,6 +842,7 @@ void HexExtractor::traceDarts() ...@@ -841,6 +842,7 @@ void HexExtractor::traceDarts()
auto n = (int)intermediateHexMesh.n_vertices(); auto n = (int)intermediateHexMesh.n_vertices();
HEXEX_DEBUG_ONLY(std::cout << "Tracing darts" << std::endl;) HEXEX_DEBUG_ONLY(std::cout << "Tracing darts" << std::endl;)
tracing = true; // enable warnings when passing through degenerate faces
//#pragma omp parallel for //#pragma omp parallel for
for (auto i = 0; i < n; ++i) for (auto i = 0; i < n; ++i)
...@@ -860,6 +862,8 @@ void HexExtractor::traceDarts() ...@@ -860,6 +862,8 @@ void HexExtractor::traceDarts()
} }
} }
tracing = false;
} }
......
...@@ -711,7 +711,7 @@ private: ...@@ -711,7 +711,7 @@ private:
template <typename T, typename... Rest> template <typename T, typename... Rest>
void doTransition(HalfFaceHandle hfh, T& target, Rest&... rest) void doTransition(HalfFaceHandle hfh, T& target, Rest&... rest)
{ {
HEXEX_DEBUG_ONLY(if (isFaceDegenerate(hfh)) HEXEX_DEBUG_ONLY(if (tracing && isFaceDegenerate(hfh))
std::cout << "warning: transitioning through a degenerate face. Transition function might be wrong." << std::endl;) std::cout << "warning: transitioning through a degenerate face. Transition function might be wrong." << std::endl;)
doTransition(hfh, target); doTransition(hfh, target);
doTransition(hfh, rest...); doTransition(hfh, rest...);
...@@ -782,6 +782,8 @@ private: ...@@ -782,6 +782,8 @@ private:
long callsToFindPort; long callsToFindPort;
long portsCheckedInFindPort; long portsCheckedInFindPort;
bool tracing; // For debugging. Enables warning in doTransition
}; };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment