Skip to content
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

Remove dead code #127

Merged
merged 1 commit into from
Sep 13, 2024
Merged
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
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