39 MMG5_int *adja,*adja1,adj,adj1,k,iadr;
44 static int8_t mmgErr0=0,mmgErr1=0,mmgErr2=0,mmgErr3=0,mmgErr4=0,mmgErr5=0;
45 static int8_t mmgErr6=0,mmgErr7=0,mmgErr8=0,mmgErr9=0,mmgErr10=0,mmgErr11=0;
46 static int8_t mmgErr12=0,mmgErr13=0,mmgErr14=0,mmgErr15=0;
49 for (k=1; k<=
mesh->
nt; k++) {
51 if ( !
MG_EOK(pt1) )
continue;
66 fprintf(stderr,
"\n ## Error: %s: 1. at least 1 wrong"
69 fprintf(stderr,
"vertices of %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
MMG2D_indElt(
mesh,k),
72 fprintf(stderr,
"adj of %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
73 k,adja[0]/3,adja[1]/3,adja[2]/3);
83 fprintf(stderr,
"\n ## Error: %s: 4. at least 1 invalid"
86 fprintf(stderr,
"vertices of %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
89 fprintf(stderr,
"vertices adj %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
90 adj,pt2->
v[0],pt2->
v[1],pt2->
v[2]);
91 fprintf(stderr,
"adj of %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
MMG2D_indElt(
mesh,k),
101 adj1 = adja1[voy] / 3;
102 voy1 = adja1[voy] % 3;
103 if ( adj1 != k || voy1 != i ) {
106 fprintf(stderr,
"\n ## Error: %s: 2. at least 1 inconsistency in adja array"
108 fprintf(stderr,
"vertices of %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
MMG2D_indElt(
mesh,k),
111 fprintf(stderr,
"adj(k) %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
MMG2D_indElt(
mesh,adj),
114 fprintf(stderr,
"adj(%" MMG5_PRId
"): %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
117 fprintf(stderr,
"adj(%" MMG5_PRId
"): %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
128 for (k=1; k<=
mesh->
nt; k++) {
130 if ( !
MG_EOK(pt) )
continue;
132 for (i=0; i<3; i++) {
140 fprintf(stderr,
"\n ## Error: %s: at least 1 tag inconsistency"
141 " (triangle %" MMG5_PRId
": edge %d, vertex %" MMG5_PRId
")\n",__func__,
149 fprintf(stderr,
"\n ## Error: %s: at least 1 tag inconsistency"
150 " (triangle %" MMG5_PRId
": edge %d, vertex %" MMG5_PRId
")\n",__func__,
162 fprintf(stderr,
"\n ## Error: %s: at least 1 tag inconsistency"
163 " (triangle %" MMG5_PRId
": edge %d, vertex %" MMG5_PRId
")\n",__func__,
171 fprintf(stderr,
"\n ## Error: %s: at least 1 tag inconsistency"
172 " (triangle %" MMG5_PRId
": edge %d, vertex %" MMG5_PRId
")\n",__func__,
183 for (k=1; k<=
mesh->
nt; k++) {
185 if ( !
MG_EOK(pt) )
continue;
188 for (i=0; i<3; i++) {
192 MMG5_int jel = adja[i] / 3;
200 fprintf(stderr,
"\n ## Error: %s: at least 1 wrong edge tag"
201 " (edge %d in tria %" MMG5_PRId
".)\n",
212 fprintf(stderr,
"\n ## Error: %s: at least 1 edge tagged boundary"
213 " while it has a neighbour (%" MMG5_PRId
" %" MMG5_PRId
").\n",__func__,
224 if ( pt->
ref == pt1->
ref ) {
227 fprintf(stderr,
"\n ## Error: %s: at least 1 edge tagged ref while"
228 " both corresponding triangles have same ref (%" MMG5_PRId
229 " %" MMG5_PRId
").\n",__func__,
240 for (k=1; k<=
mesh->
nt; k++) {
242 if ( !
MG_EOK(pt) )
continue;
244 for (i=0; i<3; i++) {
253 fprintf(stderr,
"\n ## Error: %s: at least 1 edge (%" MMG5_PRId
" %" MMG5_PRId
") tagged"
265 fprintf(stderr,
"\n ## Error: %s: at least 1 edge (%" MMG5_PRId
" %" MMG5_PRId
") tagged %d,"
266 " with a point (%" MMG5_PRId
") not tagged BDY.\n",__func__,
277 fprintf(stderr,
"\n ## Error: %s: at least 1 edge (%" MMG5_PRId
" %" MMG5_PRId
") tagged %d,"
278 " with a point (%" MMG5_PRId
") not tagged BDY.\n",__func__,
288 if ( !severe )
return 1;
294 for (k=1; k<=
mesh->
nt; k++) {
296 if ( !
MG_EOK(pt1) )
continue;
300 for (i=0; i<3; i++) {
301 adj = (adja[i]-1) / 3 + 1;
302 if ( !adj )
continue;
311 fprintf(stderr,
"\n ## Error: %s: at least 1 unused vertex %" MMG5_PRId
312 " %" MMG5_PRId
"\n",__func__,
314 fprintf(stderr,
"%" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
324 for (l=1; l<=lon; l++) {
328 if ( pt2->
v[nk] != ip ) {
331 fprintf(stderr,
"\n ## Error: %s: at least 1 wrong ball %" MMG5_PRId
332 ", %" MMG5_PRId
"\n",
339 if ( lon < 1 )
continue;
344 for (kk=1; kk<=
mesh->
nt; kk++) {
346 if ( !
MG_EOK(pt2) )
continue;
348 if ( pt2->
v[j] == ip ) {
356 fprintf(stderr,
"\n ## Error: %s: at least 1 incorrect ball %"
357 MMG5_PRId
": %d %d\n",
int MMG2D_boulep(MMG5_pMesh mesh, MMG5_int ifirst, int iploc, MMG5_int *list)
int MMG5_mmg2dChkmsh(MMG5_pMesh mesh, int severe, MMG5_int base)
API headers and documentation for the mmg2d library.
MMG5_int MMG2D_indPt(MMG5_pMesh mesh, MMG5_int kp)
MMG5_int MMG2D_indElt(MMG5_pMesh mesh, MMG5_int kel)
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
static const uint8_t MMG5_iprv2[3]
static const uint8_t MMG5_inxt2[6]
#define MMG5_SAFE_FREE(ptr)
Structure to store vertices of an MMG mesh.
Structure to store triangles of a MMG mesh.