From 8668151935afcf8f1443964f64ab70539c4c9b84 Mon Sep 17 00:00:00 2001 From: Algiane Froehly Date: Thu, 12 Sep 2024 15:12:11 +0200 Subject: [PATCH] Remove ununsed function In a first place, Luca, that implemented the // analysis, guessed that some part of the analysis (such as the analysis of non-manifold situations) were not possible at the beginning of the process and have to be updated after interface migration. Finally, the non-manifold analysis is done during the pre-processing step and the 'update_nmgeom' function is not called anymore and can be removed. --- src/analys_pmmg.c | 109 ---------------------------------------------- 1 file changed, 109 deletions(-) diff --git a/src/analys_pmmg.c b/src/analys_pmmg.c index 5e084eb0..003b6b93 100644 --- a/src/analys_pmmg.c +++ b/src/analys_pmmg.c @@ -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);