Commit e9f650e4 authored by Max Lyon's avatar Max Lyon

only warn about transitioning through degenerate face when tracing

parent 3f76bc7e
......@@ -86,7 +86,8 @@ HexExtractor::HexExtractor()
numDartsTraced(0),
numDartTraceLoops(0),
callsToFindPort(0),
portsCheckedInFindPort(0)
portsCheckedInFindPort(0),
tracing(false)
{
exactinit();
......@@ -841,6 +842,7 @@ void HexExtractor::traceDarts()
auto n = (int)intermediateHexMesh.n_vertices();
HEXEX_DEBUG_ONLY(std::cout << "Tracing darts" << std::endl;)
tracing = true; // enable warnings when passing through degenerate faces
//#pragma omp parallel for
for (auto i = 0; i < n; ++i)
......@@ -860,6 +862,8 @@ void HexExtractor::traceDarts()
}
}
tracing = false;
}
......
......@@ -711,7 +711,7 @@ private:
template <typename T, typename... 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;)
doTransition(hfh, target);
doTransition(hfh, rest...);
......@@ -782,6 +782,8 @@ private:
long callsToFindPort;
long portsCheckedInFindPort;
bool tracing; // For debugging. Enables warning in doTransition
};
......
Markdown is supported
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