Skip to content

Commit

Permalink
Merge pull request #127 from MmgTools/feature/code-cleaning
Browse files Browse the repository at this point in the history
Remove dead code
  • Loading branch information
laetitia-m authored Sep 13, 2024
2 parents e02e4e5 + 8668151 commit 0f82307
Showing 1 changed file with 0 additions and 109 deletions.
109 changes: 0 additions & 109 deletions src/analys_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,115 +1477,6 @@ int PMMG_hashNorver( PMMG_pParMesh parmesh,MMG5_pMesh mesh,MMG5_HGeom *hash,
return 1;
}

/**
* \param parmesh pointer to the parmesh structure
* \param mesh pointer to the mesh structure
*
* \return 1 if success, 0 if failure.
*
* Compute continuous geometric support (normal and tangent vectors) on
* non-manifold MG_OLDPARBDY points.
*
* \remark Analogous to the MMG3D_nmgeom function, but it only travels on
* old parallel points.
* \remark Normal and tangent vectors on these points are overwritten.
*
*/
int PMMG_update_nmgeom(PMMG_pParMesh parmesh,MMG5_pMesh mesh){
MMG5_pTetra pt;
MMG5_pPoint p0;
MMG5_pxPoint pxp;
int k,base;
int *adja;
double n[3],t[3];
int ip;
int8_t i,j,ier;

for( ip = 1; ip <= mesh->np; ip++ ) {
mesh->point[ip].flag = mesh->base;
}

base = ++mesh->base;
for (k=1; k<=mesh->ne; k++) {
pt = &mesh->tetra[k];
if( !MG_EOK(pt) ) continue;
adja = &mesh->adja[4*(k-1)+1];
for (i=0; i<4; i++) {
if ( adja[i] ) continue;
for (j=0; j<3; j++) {
ip = MMG5_idir[i][j];
p0 = &mesh->point[pt->v[ip]];
if ( p0->flag == base ) continue;
else if ( !(p0->tag & MG_OLDPARBDY) ) continue;
else if ( !(p0->tag & MG_NOM) ) continue;

p0->flag = base;
ier = MMG5_boulenm(mesh,k,ip,i,n,t);

if ( ier < 0 )
return 0;
else if ( !ier ) {
p0->tag |= MG_REQ;
p0->tag &= ~MG_NOSURF;
}
else {
if ( !p0->xp ) {
++mesh->xp;
if(mesh->xp > mesh->xpmax){
MMG5_TAB_RECALLOC(mesh,mesh->xpoint,mesh->xpmax,MMG5_GAP,MMG5_xPoint,
"larger xpoint table",
mesh->xp--;
fprintf(stderr," Exit program.\n");return 0;);
}
p0->xp = mesh->xp;
}
pxp = &mesh->xpoint[p0->xp];
memcpy(pxp->n1,n,3*sizeof(double));
memcpy(p0->n,t,3*sizeof(double));
}
}
}
}
/* Deal with the non-manifold points that do not belong to a surface
* tetra (a tetra that has a face without adjacent)*/
for (k=1; k<=mesh->ne; k++) {
pt = &mesh->tetra[k];
if( !MG_EOK(pt) ) continue;

for (i=0; i<4; i++) {
p0 = &mesh->point[pt->v[i]];
if ( !(p0->tag & MG_OLDPARBDY) ) continue;
else if ( p0->tag & MG_PARBDY || p0->tag & MG_REQ || !(p0->tag & MG_NOM) || p0->xp ) continue;
ier = MMG5_boulenmInt(mesh,k,i,t);
if ( ier ) {
++mesh->xp;
if(mesh->xp > mesh->xpmax){
MMG5_TAB_RECALLOC(mesh,mesh->xpoint,mesh->xpmax,MMG5_GAP,MMG5_xPoint,
"larger xpoint table",
mesh->xp--;
fprintf(stderr," Exit program.\n");return 0;);
}
p0->xp = mesh->xp;
pxp = &mesh->xpoint[p0->xp];
memcpy(p0->n,t,3*sizeof(double));
}
else {
p0->tag |= MG_REQ;
p0->tag &= ~MG_NOSURF;
}
}
}

/*for (k=1; k<=mesh->np; k++) {
p0 = &mesh->point[k];
if ( !(p0->tag & MG_NOM) || p0->xp ) continue;
p0->tag |= MG_REQ;
p0->tag &= ~MG_NOSURF;
}*/

return 1;
}

static inline
int MMG5_skip_nonOldParBdy ( int8_t tag ) {
return !(tag & MG_OLDPARBDY);
Expand Down

0 comments on commit 0f82307

Please sign in to comment.