45 double lon,len,calold,calnew,caltmp;
46 MMG5_int ip1,ip2,ipb,l,ll,lj,jel,kel,*adja;
48 uint8_t i1,i2,j,jj,j2,voy,open;
62 calold = calnew = DBL_MAX;
66 if ( typchk == 2 && met->
m ) {
67 lon = MMG2D_lencurv(
mesh,met,ip1,ip2);
100 jel = list[ilist-1] / 3;
102 j = list[ilist-1] % 3;
119 if ( ipb == pt1->
v[j] )
return 0;
127 for (l=0; l<ilist-1; l++) {
139 if ( ilist > 3 || ( ilist == 3 && open ) ) {
151 for (l=1; l<ilist-1+open; l++) {
164 len = MMG2D_lencurv(
mesh,met,ip1,ip2);
165 if ( len > lon )
return 0;
170 pt0->
tag[j2] |= pt->
tag[i1];
172 else if ( l == ilist-2 && !open ) {
173 ll = list[ilist-1+open] / 3;
175 if ( ll >
mesh->
nt )
return 0;
176 lj = list[ilist-1+open] % 3;
185 if ( typchk == 2 && met->
m && met->
size == 3 )
190 calold =
MG_MIN(calold,caltmp);
192 if ( typchk == 2 && met->
m && met->
size == 3 )
198 calnew =
MG_MIN(calnew,caltmp);
199 if ( calold <
MMG2D_NULKAL && calnew <= calold )
return 0;
200 else if ( calnew <
MMG2D_NULKAL || calnew < 0.001*calold )
return 0;
205 else if ( ilist == 3 ) {
225 pt0->
tag[jj] |= pt1->
tag[j];
235 assert ( ilist == 2 );
236 if ( ilist !=2 )
return 0;
237 if ( !open )
return 0;
247 if ( pt2->
v[voy] == ip2 )
return 0;
251 if ( MMG5_abs(pt->
ref) != MMG5_abs(pt1->
ref) )
return 0;
252 else if ( !(pt1->
tag[jj] &
MG_GEO) )
return 0;
263 if ( calold <
MMG2D_NULKAL && calnew <= calold )
return 0;
275 MMG5_int iel,jel,ip1,ip2,k,kel,*adja;
276 uint8_t i,j,jj,i1,i2,open;
293 for (k=1; k<ilist-1+open; k++) {
307 pt1->
tag[j] |= pt->
tag[i1];
313 mesh->
adja[3*(kel-1)+1+k] = 3*jel+j;
314 mesh->
adja[3*(jel-1)+1+j] = 3*kel+k;
316 pt2->
tag[k] |= pt1->
tag[j];
324 iel = list[ilist-1] / 3;
325 i1 = list[ilist-1] % 3;
328 jel = list[ilist-2] / 3;
329 jj = list[ilist-2] % 3;
332 pt1->
tag[j] |= pt->
tag[i1];
339 mesh->
adja[3*(kel-1)+1+k] = 3*jel + j;
340 mesh->
adja[3*(jel-1)+1+j] = 3*kel + k;
342 pt2->
tag[k] |= pt1->
tag[j];
361 MMG5_int iel,jel,kel,mel,ip,*adja;
362 uint8_t i,i1,j,j1,j2,k,m;
381 pt1->
v[j] = pt->
v[i1];
382 pt1->
tag[j1] |= pt2->
tag[k];
384 pt1->
tag[j2] |= pt->
tag[i];
390 adja[j1] =
mesh->
adja[3*(kel-1)+1+k];
391 adja[j2] =
mesh->
adja[3*(iel-1)+1+i];
397 pt->
tag[m] = pt1->
tag[j2];
398 pt->
edg[m] = pt1->
edg[j2];
399 mesh->
adja[3*(mel-1)+1+m] = 3*jel + j2;
406 pt->
tag[m] = pt1->
tag[j1];
407 pt->
edg[m] = pt1->
edg[j1];
408 mesh->
adja[3*(mel-1)+1+m] = 3*jel + j1;
423 MMG5_int *adja,iel,jel,kel,ip1,ip2;
424 int8_t i1,i2,jj,j2,k;
441 pt1->
tag[jj] |= pt->
tag[i1];
442 pt1->
edg[jj] = pt->
edg[i1];
447 adja[jj] =
mesh->
adja[3*(iel-1)+1+i1];
452 mesh->
adja[3*(kel-1)+1+k] = 3*jel + jj;
int MMG2D_chkedg(MMG5_pMesh mesh, MMG5_int k)
int MMG5_boulet(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *list, int8_t s, int8_t *opn)
int MMG2D_colver(MMG5_pMesh mesh, int ilist, MMG5_int *list)
int MMG2D_chkcol(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int *list, int8_t typchk)
int MMG2D_colver3(MMG5_pMesh mesh, MMG5_int *list)
int MMG2D_colver2(MMG5_pMesh mesh, MMG5_int *list)
double MMG2D_caltri_ani(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pTria)
int MMG2D_delElt(MMG5_pMesh mesh, MMG5_int iel)
void MMG2D_delPt(MMG5_pMesh mesh, MMG5_int ip)
double MMG2D_caltri_iso(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pTria)
static const uint8_t MMG5_iprv2[3]
static const uint8_t MMG5_inxt2[6]
Structure to store vertices of an MMG mesh.
Structure to store triangles of a MMG mesh.