Skip to content

Commit

Permalink
added permtria array to mmg
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin Prigent committed Apr 16, 2024
1 parent 9c45b08 commit a82f2c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/mmg3d/hash_3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ int MMG5_chkBdryTria(MMG5_pMesh mesh) {
// that are stored more that once.
ier = MMG5_chkBdryTria_flagExtraTriangles(mesh,&ntpres,&hashElt);
// Delete flagged triangles
ier = MMG5_chkBdryTria_deleteExtraTriangles(mesh);
ier = MMG5_chkBdryTria_deleteExtraTriangles(mesh,NULL);
}
ntmesh +=ntpres;

Expand Down Expand Up @@ -1855,7 +1855,7 @@ int MMG5_chkBdryTria_flagExtraTriangles(MMG5_pMesh mesh, MMG5_int* ntpres, MMG5_
return 1;
}

int MMG5_chkBdryTria_deleteExtraTriangles(MMG5_pMesh mesh) {
int MMG5_chkBdryTria_deleteExtraTriangles(MMG5_pMesh mesh, MMG5_int* permtria) {

MMG5_pTria ptt, pttnew;
MMG5_int nt, nbl, k;
Expand All @@ -1869,6 +1869,9 @@ int MMG5_chkBdryTria_deleteExtraTriangles(MMG5_pMesh mesh) {
++nt;
if ( k!=nbl ) {
pttnew = &mesh->tria[nbl];
if ( permtria ) {
permtria[k] = nbl;

Check warning on line 1873 in src/mmg3d/hash_3d.c

View check run for this annotation

Codecov / codecov/patch

src/mmg3d/hash_3d.c#L1873

Added line #L1873 was not covered by tests
}
memcpy(pttnew,ptt,sizeof(MMG5_Tria));
}
++nbl;
Expand Down
2 changes: 1 addition & 1 deletion src/mmg3d/libmmg3d_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int MMG5_chkBdryTria_countBoundaries(MMG5_pMesh mesh, MMG5_int *ntmesh, MMG5_in
int MMG5_chkBdryTria_hashBoundaries(MMG5_pMesh mesh, MMG5_int ntmesh, MMG5_Hash *hashElt);
int MMG5_chkBdryTria_flagExtraTriangles(MMG5_pMesh mesh, MMG5_int* ntpres, MMG5_Hash* hashElt);
int MMG5_chkBdryTria_addMissingTriangles(MMG5_pMesh mesh, MMG5_int ntmesh, MMG5_int ntpres);
int MMG5_chkBdryTria_deleteExtraTriangles(MMG5_pMesh mesh);
int MMG5_chkBdryTria_deleteExtraTriangles(MMG5_pMesh mesh, MMG5_int* permtria);
int MMG5_mmg3dBezierCP(MMG5_pMesh mesh,MMG5_Tria *pt,MMG5_pBezier pb,int8_t ori);
extern int MMG5_BezierTgt(double c1[3],double c2[3],double n1[3],double n2[3],double t1[3],double t2[3]);
extern double MMG5_BezierGeod(double c1[3], double c2[3], double t1[3], double t2[3]);
Expand Down

0 comments on commit a82f2c3

Please sign in to comment.