Skip to content
Snippets Groups Projects
Commit cce0d589 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent ab38c9fa
No related branches found
No related tags found
No related merge requests found
// $Id: meshGRegionDelaunayInsertion.cpp,v 1.21 2007-11-26 14:34:10 remacle Exp $ // $Id: meshGRegionDelaunayInsertion.cpp,v 1.22 2007-11-26 15:08:34 remacle Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "OS.h" #include "OS.h"
#include "BackgroundMesh.h" #include "BackgroundMesh.h"
#include "edgeSwap.h" #include "meshGRegionLocalMeshMod.h"
#include "meshGRegionDelaunayInsertion.h" #include "meshGRegionDelaunayInsertion.h"
#include "GModel.h" #include "GModel.h"
#include "GRegion.h" #include "GRegion.h"
......
...@@ -5,6 +5,7 @@ static int efaces[6][2] = {{0,2},{0,1},{1,2},{0,3},{2,3},{1,3}}; ...@@ -5,6 +5,7 @@ static int efaces[6][2] = {{0,2},{0,1},{1,2},{0,3},{2,3},{1,3}};
static int enofaces[6][2] = {{1,3},{2,3},{0,3},{1,2},{0,1},{0,2}}; static int enofaces[6][2] = {{1,3},{2,3},{0,3},{1,2},{0,1},{0,2}};
static int facesXedges[4][3] = {{0,1,3},{1,2,5},{0,2,4},{3,4,5}}; static int facesXedges[4][3] = {{0,1,3},{1,2,5},{0,2,4},{3,4,5}};
static int faces[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}}; static int faces[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}};
static int vFac[4][3] = {{0,1,2},{0,2,3},{0,1,3},{1,2,3}};
// as input, we give a tet and an edge, as return, we get // as input, we give a tet and an edge, as return, we get
// all tets that share this edge and all vertices that are // all tets that share this edge and all vertices that are
...@@ -350,13 +351,17 @@ void gmshEdgeSwap (std::vector<MTet4 *> &newTets, ...@@ -350,13 +351,17 @@ void gmshEdgeSwap (std::vector<MTet4 *> &newTets,
void gmshBuildVertexCavity_recur ( MTet4 *t, void gmshBuildVertexCavity_recur ( MTet4 *t,
MVertex *v, MVertex *v,
std::vector<MTet4*> &cavity){ std::vector<MTet4*> &cavity){
int iV=-1;
for (int i=0; i<4; i++){ for (int i=0; i<4; i++){
MTet4 *neigh = t->getNeigh(i); if (t->tet()->getVertex(i) == v){
iV = i;
break;
}
}
if (iV==-1)throw;
for (int i=0; i<3; i++){
MTet4 *neigh = t->getNeigh(vFac[iV][i]);
if (neigh){ if (neigh){
bool foundv = false;
for (int j=0;j<4;j++){if (t->tet()->getVertex(j) == v){foundv = true; break;}}
if (foundv)
{
bool found = false; bool found = false;
for (int j=0;j<cavity.size();j++){if (cavity[j] == neigh){found = true; break;}} for (int j=0;j<cavity.size();j++){if (cavity[j] == neigh){found = true; break;}}
if (!found){ if (!found){
...@@ -366,7 +371,8 @@ void gmshBuildVertexCavity_recur ( MTet4 *t, ...@@ -366,7 +371,8 @@ void gmshBuildVertexCavity_recur ( MTet4 *t,
} }
} }
} }
}
void gmshSmoothVertex ( MTet4 *t, void gmshSmoothVertex ( MTet4 *t,
int iVertex){ int iVertex){
std::vector<MTet4*> cavity; std::vector<MTet4*> cavity;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment