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

fix netgen optimization (need tets with neg vol)
parent 58330d99
Branches
Tags
No related merge requests found
......@@ -455,11 +455,6 @@ class MTetrahedron : public MElement {
: MElement(num, part)
{
_v[0] = v0; _v[1] = v1; _v[2] = v2; _v[3] = v3;
if (getVolume() < 0)
{
_v[0] = v1; _v[1] = v0;
}
}
MTetrahedron(std::vector<MVertex*> &v, int num=0, int part=0)
: MElement(num, part)
......
// $Id: meshGRegion.cpp,v 1.17 2006-11-29 16:57:01 remacle Exp $
// $Id: meshGRegion.cpp,v 1.18 2006-11-29 23:44:40 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -240,6 +240,8 @@ Ng_Mesh *buildNetgenStructure(GRegion *gr, bool importVolumeMesh,
if(importVolumeMesh){
for(unsigned int i = 0; i< gr->tetrahedra.size(); i++){
MTetrahedron *t = gr->tetrahedra[i];
// netgen expects tet with negative volume
if(t->getVolumeSign() > 0) t->revert();
int tmp[4];
tmp[0] = t->getVertex(0)->getNum();
tmp[1] = t->getVertex(1)->getNum();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment