Skip to content

Commit

Permalink
Modified MMG remesh so it can remesh internal surfaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMaas1978 committed Sep 3, 2024
1 parent 8dea531 commit 5d07051
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions FEAMR/FEMMGRemesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ bool FEMMGRemesh::MMG::build_mmg_mesh(MMG5_pMesh mmgMesh, MMG5_pSol mmgSol, FEMe
FEMesh& mesh = *topo.GetMesh();
int NN = mesh.Nodes();
int NE = topo.Elements();
int NF = topo.SurfaceFaces();
int NF = topo.Faces();

// allocate mesh size
if (MMG3D_Set_meshSize(mmgMesh, NN, NE, 0, NF, 0, 0) != 1)
Expand Down Expand Up @@ -192,7 +192,7 @@ bool FEMMGRemesh::MMG::build_mmg_mesh(MMG5_pMesh mmgMesh, MMG5_pSol mmgSol, FEMe
for (int i = 0; i < mesh.Surfaces(); ++i)
{
FESurface& surf = mesh.Surface(i);
vector<int> faceIndexList = topo.SurfaceFaceIndexList(surf);
vector<int> faceIndexList = topo.FaceIndexList(surf);
for (int j = 0; j < faceIndexList.size(); ++j)
{
faceMarker[faceIndexList[j]] = faceMark;
Expand All @@ -213,7 +213,7 @@ bool FEMMGRemesh::MMG::build_mmg_mesh(MMG5_pMesh mmgMesh, MMG5_pSol mmgSol, FEMe
// see if this is indeed a surface node set
for (int j = 0; j < NF; ++j)
{
const FEFaceList::FACE& face = topo.SurfaceFace(j);
const FEFaceList::FACE& face = topo.Face(j);
const int* fn = face.node;
if ((nodeTags[fn[0]] != 0) && (nodeTags[fn[1]] != 0) && (nodeTags[fn[2]] != 0))
{
Expand All @@ -229,7 +229,7 @@ bool FEMMGRemesh::MMG::build_mmg_mesh(MMG5_pMesh mmgMesh, MMG5_pSol mmgSol, FEMe
{
for (int j = 0; j < NF; ++j)
{
const FEFaceList::FACE& face = topo.SurfaceFace(j);
const FEFaceList::FACE& face = topo.Face(j);
const int* fn = face.node;
if ((nodeTags[fn[0]] == 1) && (nodeTags[fn[1]] == 1) && (nodeTags[fn[2]] == 1))
{
Expand Down Expand Up @@ -259,7 +259,7 @@ bool FEMMGRemesh::MMG::build_mmg_mesh(MMG5_pMesh mmgMesh, MMG5_pSol mmgSol, FEMe
// create the faces
for (int i = 0; i < NF; ++i)
{
const FEFaceList::FACE& f = topo.SurfaceFace(i);
const FEFaceList::FACE& f = topo.Face(i);
const int* n = &f.node[0];
MMG3D_Set_triangle(mmgMesh, n[0] + 1, n[1] + 1, n[2] + 1, faceMarker[i], i + 1);
}
Expand Down

0 comments on commit 5d07051

Please sign in to comment.