Skip to content
Snippets Groups Projects
Commit 09337203 authored by Thomas Toulorge's avatar Thomas Toulorge
Browse files

Check & fix inverted 3D elements at the end of RefineMesh

parent bf387a45
No related branches found
No related tags found
No related merge requests found
...@@ -388,6 +388,9 @@ void RefineMesh(GModel *m, bool linear, bool splitIntoQuads, bool splitIntoHexas ...@@ -388,6 +388,9 @@ void RefineMesh(GModel *m, bool linear, bool splitIntoQuads, bool splitIntoHexas
for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it) for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it)
Subdivide(*it, splitIntoHexas, faceVertices); Subdivide(*it, splitIntoHexas, faceVertices);
// Check all 3D elements for negative volume and reverse if needed
m->setAllVolumesPositive();
double t2 = Cpu(); double t2 = Cpu();
Msg::StatusBar(true, "Done refining mesh (%g s)", t2 - t1); Msg::StatusBar(true, "Done refining mesh (%g s)", t2 - t1);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment