From 4eb69393d811d88a1b663e27c0290cfbd880d553 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 14 Feb 2014 17:30:10 +0000 Subject: [PATCH] pp --- Mesh/meshRefine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mesh/meshRefine.cpp b/Mesh/meshRefine.cpp index e12dd8f0df..37d4f8295a 100644 --- a/Mesh/meshRefine.cpp +++ b/Mesh/meshRefine.cpp @@ -137,6 +137,7 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti std::vector<MTetrahedron*> tetrahedra2; for(unsigned int i = 0; i < gr->tetrahedra.size(); i++){ MTetrahedron *t = gr->tetrahedra[i]; + // FIXME: we should choose the template to maximize the quality if(t->getNumVertices() == 10){ tetrahedra2.push_back (new MTetrahedron(t->getVertex(0), t->getVertex(4), t->getVertex(7), t->getVertex(6))); @@ -191,6 +192,7 @@ static void Subdivide(GRegion *gr, bool splitIntoHexas, faceContainer &faceVerti } delete h; } + if(splitIntoHexas){ for(unsigned int i = 0; i < gr->tetrahedra.size(); i++){ MTetrahedron *t = gr->tetrahedra[i]; @@ -386,8 +388,6 @@ void RefineMesh(GModel *m, bool linear, bool splitIntoQuads, bool splitIntoHexas for(GModel::riter it = m->firstRegion(); it != m->lastRegion(); ++it) Subdivide(*it, splitIntoHexas, faceVertices); - - double t2 = Cpu(); Msg::StatusBar(true, "Done refining mesh (%g s)", t2 - t1); } -- GitLab