Skip to content

Allow the 3d swapper to create tetrahedra with 4 boundary vertices when not in FEM mode #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/mmg3d/swapgen_3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ MMG5_int MMG5_chkswpgen(MMG5_pMesh mesh,MMG5_pSol met,MMG5_int start,int ia,
calnew = 1.0;
ier = 1;

if ( mesh->info.fem ) {
if ( mesh->info.fem == typchk ) {
/* Do not create internal edges between boundary points */
p0 = &mesh->point[np];
if ( p0->tag & MG_BDY ) {
Expand Down Expand Up @@ -207,7 +207,8 @@ MMG5_int MMG5_chkswpgen(MMG5_pMesh mesh,MMG5_pSol met,MMG5_int start,int ia,
}

/* Prevent from creating a tetra with 4 bdy vertices */
if ( mesh->point[np].tag & MG_BDY ) {
/* when the mesh is in FEM mode */
if ( mesh->info.fem == typchk && (mesh->point[np].tag & MG_BDY) ) {
if ( ( mesh->point[pt->v[MMG5_ifar[i][0]]].tag & MG_BDY ) &&
( mesh->point[pt->v[MMG5_ifar[i][1]]].tag & MG_BDY ) ) {
if ( ( mesh->point[pt->v[MMG5_iare[i][0]]].tag & MG_BDY ) ||
Expand Down
Loading