28static uint8_t
inxt[3] = {1,2,0};
29static uint8_t
iprev[3] = {2,0,1};
39 MMG5_int ip,iel,*adja,iadr;
42 if ( ifirst < 1 )
return 0;
44 if ( !
MG_EOK(pt) )
return 0;
47 if ( !
MG_VOK(ppt) )
return 0;
51 list[ilist] = 3*ifirst + iploc;
53 iadr = 3*(ifirst-1) + 1;
55 iel = adja[
inxt[iploc]]/3;
56 voy = adja[
inxt[iploc]]%3;
59 while ( iel && (iel != ifirst) &&
mesh->
tria[iel].
v[0]){
61 list[++ilist] = 3*iel + i;
62 assert( ip==(&
mesh->
tria[iel])->v[i] );
65 iel = adja[
inxt[i]]/3;
66 voy = adja[
inxt[i]]%3;
71 iadr = 3*(ifirst-1) + 1;
73 iel = adja[
iprev[iploc]]/3;
74 voy = adja[
iprev[iploc]]%3;
77 while ( iel && (iel != ifirst) &&
mesh->
tria[iel].
v[0]) {
79 list[++ilist] = 3*iel + i;
80 assert( ip==(&
mesh->
tria[iel])->v[i] );
83 iel = adja[
iprev[i]]/3;
85 voy = adja[
iprev[i]]%3;
118 double ux,uy,dd,n1[2],n2[2];
119 MMG5_int *adja,k,kk,refs;
138 while ( kk && (kk != start) && notedg );
141 fprintf(stderr,
" ## Error: %s: Unable to find a boundary edge in"
153 ux = p2->
c[0] - p1->
c[0];
154 uy = p2->
c[1] - p1->
c[1];
158 fprintf(stderr,
"\n ## Error: %s: Null edge"
159 " length (%e).\n",__func__,dd);
183 while ( kk && (kk != start) && notedg );
192 ux = p2->
c[0] - p1->
c[0];
193 uy = p2->
c[1] - p1->
c[1];
197 fprintf(stderr,
"\n ## Error: %s: Null edge length"
198 " (%e).\n",__func__,dd);
209 nn[0] = n1[0] + n2[0];
210 nn[1] = n1[1] + n2[1];
211 dd = nn[0]*nn[0] + nn[1]*nn[1];
235 static int8_t mmgWarn0=0;
240 if ( start < 1 )
return 0;
242 if ( !
MG_EOK(pt) )
return 0;
260 if ( *ip1 == 0 ) *ip1 = pt->
v[i2];
262 if ( *ip2 != 0 && *ip1 != pt->
v[i2] && *ip2 != pt->
v[i2] ) {
265 fprintf(stderr,
"\n ## Error: %s: at least 1 non singular"
266 " point at the intersection of 3 edges.\n",
271 if ( *ip1 != pt->
v[i2] ) *ip2 = pt->
v[i2];
279 if ( *ip2 != 0 && *ip1 != pt->
v[i1] && *ip2 != pt->
v[i1] ) {
282 fprintf(stderr,
"\n ## Error: %s: at least 1 non singular"
283 " point at the intersection of 3 edges.\n",
288 if ( *ip1 != pt->
v[i1] ) *ip2 = pt->
v[i1];
297 while ( k && k != start );
298 if ( k > 0 )
return ilist;
309 if ( !k )
return ilist;
326 if ( *ip2 != 0 && *ip1 != pt->
v[i2] && *ip2 != pt->
v[i2] ) {
329 fprintf(stderr,
"\n ## Error: %s: at least 1 non singular"
330 " point at the intersection of 3 edges.\n",
335 if ( *ip1 != pt->
v[i2] ) *ip2 = pt->
v[i2];
340 if ( *ip1 == 0 ) *ip1 = pt->
v[i1];
342 if ( *ip2 != 0 && *ip1 != pt->
v[i1] && *ip2 != pt->
v[i1] ) {
345 fprintf(stderr,
"\n ## Error: %s: at least 1 non singular"
346 " point at the intersection of 3 edges.\n",
351 if ( *ip1 != pt->
v[i1] ) *ip2 = pt->
v[i1];
int MMG2D_boulep(MMG5_pMesh mesh, MMG5_int ifirst, int iploc, MMG5_int *list)
int MMG2D_bouleendp(MMG5_pMesh mesh, MMG5_int start, int8_t ip, MMG5_int *ip1, MMG5_int *ip2, MMG5_int *list)
int MMG2D_boulen(MMG5_pMesh mesh, MMG5_int start, int8_t ip, MMG5_int *pleft, MMG5_int *pright, double *nn)
API headers and documentation for the mmg2d library.
MMG5_int MMG2D_indPt(MMG5_pMesh mesh, MMG5_int kp)
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.