Skip to content
Snippets Groups Projects
Commit fd7446fc authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

sanity check: don't try to tetrahedralize a volume with quads on the boundary
parent d65fdbf1
No related branches found
No related tags found
No related merge requests found
// $Id: meshGRegion.cpp,v 1.20 2006-12-02 19:29:37 geuzaine Exp $ // $Id: meshGRegion.cpp,v 1.21 2006-12-15 16:06:16 geuzaine Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -441,6 +441,16 @@ void meshGRegion::operator() (GRegion *gr) ...@@ -441,6 +441,16 @@ void meshGRegion::operator() (GRegion *gr)
if(MeshTransfiniteVolume(gr)) return; if(MeshTransfiniteVolume(gr)) return;
if(MeshExtrudedVolume(gr)) return; if(MeshExtrudedVolume(gr)) return;
std::list<GFace*> faces = gr->faces();
// sanity check
for(std::list<GFace*>::iterator it = faces.begin(); it != faces.end(); it++){
if((*it)->quadrangles.size()){
Msg(GERROR, "Cannot tetrahedralize volume with quadrangles on boundary");
return;
}
}
if(CTX.mesh.algo3d == DELAUNAY_TETGEN || CTX.mesh.algo3d == DELAUNAY_ISO){ if(CTX.mesh.algo3d == DELAUNAY_TETGEN || CTX.mesh.algo3d == DELAUNAY_ISO){
#if !defined(HAVE_TETGEN) #if !defined(HAVE_TETGEN)
Msg(GERROR, "Tetgen is not compiled in this version of Gmsh"); Msg(GERROR, "Tetgen is not compiled in this version of Gmsh");
...@@ -448,7 +458,6 @@ void meshGRegion::operator() (GRegion *gr) ...@@ -448,7 +458,6 @@ void meshGRegion::operator() (GRegion *gr)
// put all the faces in the same model // put all the faces in the same model
GModel::riter rit = gr->model()->firstRegion() ; GModel::riter rit = gr->model()->firstRegion() ;
if (gr != *rit)return; if (gr != *rit)return;
std::list<GFace*> faces = gr->faces();
std::list<GFace*> allFaces; std::list<GFace*> allFaces;
GModel::fiter fit = gr->model()->firstFace() ; GModel::fiter fit = gr->model()->firstFace() ;
while (fit != gr->model()->lastFace()){ while (fit != gr->model()->lastFace()){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment