Skip to content

Commit 919ba77

Browse files
committed
Correction of an inconsistency in defsiz_iso (NOM edges were not eligible to size prescription)
1 parent e34b29a commit 919ba77

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

src/mmg3d/analys_3d.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,11 +1457,6 @@ int MMG3D_analys(MMG5_pMesh mesh) {
14571457
MMG5_DEL_MEM(mesh,mesh->xpoint);
14581458
return 0;
14591459
}
1460-
1461-
/* printf("On est bien ici maintenant??\n");
1462-
MMG3D_packMesh(mesh,NULL,NULL);
1463-
MMG3D_saveMesh(mesh,mesh->nameout);
1464-
exit(0);*/
14651460

14661461
/* check subdomains connected by a vertex and mark these vertex as corner and
14671462
required */
@@ -1484,6 +1479,14 @@ int MMG3D_analys(MMG5_pMesh mesh) {
14841479

14851480
/* define geometry for non manifold points */
14861481
if ( !MMG3D_nmgeom(mesh) ) return 0;
1482+
1483+
/* Save mesh */
1484+
/*
1485+
MMG3D_packMesh(mesh,NULL,NULL);
1486+
MMG3D_saveMesh(mesh,mesh->nameout);
1487+
exit(0);
1488+
*/
1489+
14871490

14881491
#ifndef NDEBUG
14891492
MMG3D_chkfacetags(mesh);

src/mmg3d/isosiz_3d.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ int MMG3D_defsiz_iso(MMG5_pMesh mesh,MMG5_pSol met) {
797797
}
798798
}
799799
}
800+
/* If ismet */
800801
else {
801802

802803
/* size truncation */
@@ -932,7 +933,7 @@ int MMG3D_defsiz_iso(MMG5_pMesh mesh,MMG5_pSol met) {
932933
}
933934
}
934935

935-
/** 3) Travel all boundary faces to update size prescription for points on
936+
/** Step 4: Travel all boundary faces to update size prescription for points on
936937
* ridges/edges */
937938
/* Warning: here we pass more than once per each point because we see it from
938939
all the edges to which it belongs */
@@ -958,9 +959,12 @@ int MMG3D_defsiz_iso(MMG5_pMesh mesh,MMG5_pSol met) {
958959

959960
/* Skip this step if both points are on a required edge */
960961
if ( p0->flag == 3 && p1->flag == 3 ) continue;
962+
963+
// if ( ip0 == 19680 ) printf("Coucou \n");
961964

962965
/* Skip regular edges */
963-
if ( !MG_EDG(p0->tag) && !MG_EDG(p1->tag) ) continue;
966+
if ( !(MG_EDG(p0->tag) || (p0->tag & MG_NOM)) && !(MG_EDG(p1->tag) || (p1->tag & MG_NOM)) ) continue;
967+
// if ( !MG_EDG(p0->tag) && !MG_EDG(p1->tag) ) continue;
964968

965969
/** First step: search for local parameters */
966970
if ( !MMG3D_localParamNm(mesh,k,i,ia,&hausd,&hmin,&hmax) ) {
@@ -1027,9 +1031,12 @@ int MMG3D_defsiz_iso(MMG5_pMesh mesh,MMG5_pSol met) {
10271031
else
10281032
lm = sqrt(8.0*hausd / kappa);
10291033

1030-
if ( MG_EDG(p0->tag) && !MG_SIN_OR_NOM(p0->tag) && p0->flag != 3 )
1034+
/* Condition p0->flag = 3 seems empty: TO CHECK */
1035+
// if ( MG_EDG(p0->tag) && !MG_SIN_OR_NOM(p0->tag) && p0->flag != 3 )
1036+
if ( (MG_EDG(p0->tag) || (p0->tag & MG_NOM)) && !MG_SIN(p0->tag) && p0->flag != 3 )
10311037
met->m[ip0] = MG_MAX(hmin,MG_MIN(met->m[ip0],lm));
1032-
if ( MG_EDG(p1->tag) && !MG_SIN_OR_NOM(p1->tag) && p1->flag != 3 )
1038+
// if ( MG_EDG(p1->tag) && !MG_SIN_OR_NOM(p1->tag) && p1->flag != 3 )
1039+
if ( (MG_EDG(p1->tag) || (p1->tag & MG_NOM)) && !MG_SIN_OR_NOM(p1->tag) && p1->flag != 3 )
10331040
met->m[ip1] = MG_MAX(hmin,MG_MIN(met->m[ip1],lm));
10341041
}
10351042
}

src/mmg3d/mmg3d1_pattern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ int MMG5_mmg3d1_pattern(MMG5_pMesh mesh,MMG5_pSol met,MMG5_int *permNodGlob) {
465465
fprintf(stderr,"\n ## Metric undefined. Exit program.\n");
466466
return 0;
467467
}
468-
468+
469469
/* Debug: export variable MMG_SAVE_DEFSIZ to save adapted mesh at the end of
470470
* anatet wave */
471471
if ( getenv("MMG_SAVE_DEFSIZ") ) {

0 commit comments

Comments
 (0)