64  double         len,lon,ps,cosnold,cosnnew,kal,n0old[3],n1old[3],n00old[3];
 
   65  double         n0new[3],n1new[3],n00new[3];
 
   66  MMG5_int       *adja,jel,kel,ip1,ip2,l,ll;
 
   68  int8_t         i1,i2,j,jj,j2,lj,open,voy;
 
   80  n00old[0] = n00old[1] = n00old[2] = 0.;
 
   81  n0old[0]  = n0old[1]  = n0old[2]  = 0.;
 
   82  n1old[0]  = n1old[1]  = n1old[2]  = 0.;
 
   83  n00new[0] = n00new[1] = n00new[2] = 0.;
 
   84  n0new[0]  = n0new[1]  = n0new[2]  = 0.;
 
   85  n1new[0]  = n1new[1]  = n1new[2]  = 0.;
 
   89    lon = MMGS_lenEdg(
mesh,met,ip1,ip2,0);
 
   97  if ( ilist <= 0 )  
return 0;
 
  103  if ( ilist+open > 3 ) {
 
  108      if ( MMG5_abs(pt->
ref) != MMG5_abs(pt1->
ref) )  
return 0;
 
  112    assert ( ilist-1+open > 1 );
 
  113    for (l=1; l<ilist-1+open; l++) {
 
  123        len = MMGS_lenEdg(
mesh,met,ip1,ip2,0);
 
  124        if ( len > lon || !len )  
return 0;
 
  133      ps = n1new[0]*n1old[0] + n1new[1]*n1old[1]  + n1new[2]*n1old[2];
 
  134      if ( ps < 0.0 )  
return 0;
 
  137      if ( l == 1 && !open ) {
 
  138        memcpy(n00old,n1old,3*
sizeof(
double));
 
  139        memcpy(n00new,n1new,3*
sizeof(
double));
 
  145          cosnold = n0old[0]*n1old[0] + n0old[1]*n1old[1] + n0old[2]*n1old[2];
 
  146          cosnnew = n0new[0]*n1new[0] + n0new[1]*n1new[1] + n0new[2]*n1new[2];
 
  148            if ( cosnnew < cosnold )  
return 0;
 
  156        pt0->
tag[j2] |= pt->
tag[i1];
 
  158      else if ( l == ilist-2+open ) {
 
  160          ll = list[ilist-1] / 3;
 
  161          lj = list[ilist-1] % 3;
 
  165          assert ( list[0]/3 == k );
 
  166          pt0->
tag[jj] |= pt->
tag[i];
 
  176      memcpy(n0old,n1old,3*
sizeof(
double));
 
  177      memcpy(n0new,n1new,3*
sizeof(
double));
 
  182      cosnold = n00old[0]*n1old[0] + n00old[1]*n1old[1] + n00old[2]*n1old[2];
 
  183      cosnnew = n00new[0]*n1new[0] + n00new[1]*n1new[1] + n00new[2]*n1new[2];
 
  185        if ( cosnnew < cosnold )  
return 0;
 
  190      jel = list[ilist-1] / 3;
 
  191      j   = list[ilist-1] % 3;
 
  195        jel = list[ilist-2] / 3;
 
  197        if ( MMG5_abs(pt->
ref) != MMG5_abs(pt1->
ref) )  
return 0;
 
  203  else if ( ilist == 3 ) {
 
  227    pt0->
tag[jj] |= pt1->
tag[j];
 
  238  else if ( ilist == 2 ) {
 
  239    if ( !open )  
return 0;
 
  250    if ( pt2->
v[voy] == ip2) 
return 0;
 
  254    if ( MMG5_abs(pt->
ref) != MMG5_abs(pt1->
ref) )  
return 0;
 
  255    else if ( !(pt1->
tag[jj] & 
MG_GEO) )  
return 0;
 
  259    if ( p2->
tag > p1->
tag || p2->
ref != p1->
ref )  
return 0;
 
  265    pt0->
v[i1] = pt1->
v[j2];
 
  282  MMG5_int      *adja,k,iel,jel,kel,ip1,ip2;
 
  283  int8_t        i,i1,i2,j,jj,open;
 
  298  for (k=1; k<ilist-1+open; k++) {
 
  311  pt1->
tag[j] |= pt->
tag[i1];
 
  316    mesh->
adja[3*(kel-1)+1+k] = 3*jel + j;
 
  317    mesh->
adja[3*(jel-1)+1+j] = 3*kel + k;
 
  319    pt2->
tag[k] |= pt1->
tag[j];
 
  327    iel = list[ilist-1] / 3;
 
  328    i1  = list[ilist-1] % 3;
 
  331    jel = list[ilist-2] / 3;
 
  332    jj  = list[ilist-2] % 3;
 
  335    pt1->
tag[j] |= pt->
tag[i1];
 
  341      mesh->
adja[3*(kel-1)+1+k] = 3*jel + j;
 
  342      mesh->
adja[3*(jel-1)+1+j] = 3*kel + k;
 
  344      pt2->
tag[k] |= pt1->
tag[j];
 
  372  MMG5_int     *adja,iel,jel,kel,mel,ip;
 
  373  int8_t       i,i1,j,j1,j2,k,m;
 
  393  pt1->
v[j]     = pt->
v[i1];
 
  394  pt1->
tag[j1] |= pt2->
tag[k];
 
  396  pt1->
tag[j2] |= pt->
tag[i];
 
  402  adja[j1] = 
mesh->
adja[3*(kel-1)+1+k];
 
  403  adja[j2] = 
mesh->
adja[3*(iel-1)+1+i];
 
  409    pt->
tag[m]  = pt1->
tag[j2];
 
  410    pt->
edg[m]  = pt1->
edg[j2];
 
  411    mesh->
adja[3*(mel-1)+1+m] = 3*jel + j2;
 
  418    pt->
tag[m]  = pt1->
tag[j1];
 
  419    pt->
edg[m]  = pt1->
edg[j1];
 
  420    mesh->
adja[3*(mel-1)+1+m] = 3*jel + j1;
 
  435  MMG5_int     *adja,iel,jel,kel,ip;
 
  436  int8_t       i1,i2,jj,j2,k;
 
  451  pt->
v[i1] = pt1->
v[jj];
 
  452  pt->
tag[i2] |= pt1->
tag[j2];
 
  453  pt->
edg[i2] = pt1->
edg[j2];
 
  458  adja[i2] = 
mesh->
adja[3*(jel-1)+1+j2];
 
  463    mesh->
adja[3*(kel-1)+1+k] = 3*iel + i2;
 
  476  double         kal,ps,cosnold,cosnnew;
 
  477  double         n0old[3],n0new[3],n1old[3],n1new[3],n00old[3],n00new[3];
 
  480  int8_t         i1,i2,j,jj,j2,open;
 
  489  n00old[0] = n00old[1] = n00old[2] = 0.;
 
  490  n0old[0]  = n0old[1]  = n0old[2]  = 0.;
 
  491  n1old[0]  = n1old[1]  = n1old[2]  = 0.;
 
  492  n00new[0] = n00new[1] = n00new[2] = 0.;
 
  493  n0new[0]  = n0new[1]  = n0new[2]  = 0.;
 
  494  n1new[0]  = n1new[1]  = n1new[2]  = 0.;
 
  498  if ( pt->
v[i1] & 
MG_NOM )  
return 0;
 
  505  MMG5_int *adja = &
mesh->
adja[3*(k-1)+1];
 
  507  assert ( opn == open );
 
  514    if ( MMG5_abs(pt->
ref) != MMG5_abs(pt1->
ref) )  
return 0;
 
  517    assert ( ilist-1+open > 1 );
 
  518    for (l=1; l<ilist-1+open; l++) {
 
  529      ps = n1new[0]*n1old[0] + n1new[1]*n1old[1]  + n1new[2]*n1old[2];
 
  530      if ( ps < 0.0 )  
return 0;
 
  533      if ( l == 1 && !open ) {
 
  534        memcpy(n00old,n1old,3*
sizeof(
double));
 
  535        memcpy(n00new,n1new,3*
sizeof(
double));
 
  541          cosnold = n0old[0]*n1old[0] + n0old[1]*n1old[1] + n0old[2]*n1old[2];
 
  542          cosnnew = n0new[0]*n1new[0] + n0new[1]*n1new[1] + n0new[2]*n1new[2];
 
  544            if ( cosnnew < 
MG_MIN(0.0,cosnold) )  
return 0;
 
  549        memcpy(n0old,n1old,3*
sizeof(
double));
 
  550        memcpy(n0new,n1new,3*
sizeof(
double));
 
  559      cosnold = n00old[0]*n1old[0] + n00old[1]*n1old[1] + n00old[2]*n1old[2];
 
  560      cosnnew = n00new[0]*n1new[0] + n00new[1]*n1new[1] + n00new[2]*n1new[2];
 
  562        if ( cosnnew < 
MG_MIN(0.0,cosnold) )  
return 0;
 
  567      jel = list[ilist-1] / 3;
 
  569      jel = list[ilist-2] / 3;
 
  571      if ( MMG5_abs(pt->
ref) != MMG5_abs(pt1->
ref) )  
return 0;
 
  578  else if ( ilist == 3 ) {
 
  589  else if ( ilist == 2 ) {
 
  590    if ( !open )  
return 0;
 
  595    if ( MMG5_abs(pt->
ref) != MMG5_abs(pt1->
ref) )  
return 0;
 
  596    else if ( !(pt1->
tag[jj] & 
MG_GEO) )  
return 0;
 
  600    if ( p2->
tag > p1->
tag || p2->
ref != p1->
ref )  
return 0;
 
int MMG5_boulet(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *list, int8_t s, int8_t *opn)
 
int boulechknm(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *list)
 
int colver(MMG5_pMesh mesh, MMG5_int *list, int ilist)
 
int colver3(MMG5_pMesh mesh, MMG5_int *list)
 
int colver2(MMG5_pMesh mesh, MMG5_int *list)
 
int chkcol(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int *list, int8_t typchk, double(*MMGS_lenEdg)(MMG5_pMesh, MMG5_pSol, MMG5_int, MMG5_int, int8_t), double(*MMGS_caltri)(MMG5_pMesh, MMG5_pSol, MMG5_pTria))
 
int litcol(MMG5_pMesh mesh, MMG5_int k, int8_t i, double kali)
 
int MMGS_delElt(MMG5_pMesh mesh, MMG5_int iel)
 
int chkedg(MMG5_pMesh, MMG5_int)
 
void MMGS_delPt(MMG5_pMesh mesh, MMG5_int ip)
 
static const uint8_t MMG5_iprv2[3]
 
static const uint8_t MMG5_inxt2[6]
 
int MMG5_nortri(MMG5_pMesh mesh, MMG5_pTria pt, double *n)
 
double MMG5_caltri_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria ptt)
 
Structure to store vertices of an MMG mesh.
 
Structure to store triangles of a MMG mesh.