51 MMG5_int adj,adj1,k,kk,l,nk,ip;
54 int8_t voy,voy1,i1,i2,j1,j2;
55 static int8_t mmgErr0=0,mmgErr1=0,mmgErr2=0,mmgErr3=0,mmgErr4=0;
56 static int8_t mmgErr5=0,mmgErr6=0,mmgErr7=0;
58 for (k=1; k<=
mesh->
nt; k++) {
60 if ( !
MG_EOK(pt1) )
continue;
64 if ( !adja[i] )
continue;
72 fprintf(stderr,
" ## Error: %s: 0. at least 1 missing edge"
75 fprintf(stderr,
"triangle %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
MMGS_indElt(
mesh,k),
86 fprintf(stderr,
"\n ## Error: %s: 1. at least 1 wrong adjacency"
87 " (%" MMG5_PRId
" %" MMG5_PRId
")\n",
89 fprintf(stderr,
"triangle %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
MMGS_indElt(
mesh,k),
92 fprintf(stderr,
"adj (%" MMG5_PRId
"): %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
MMGS_indElt(
mesh,k),
102 fprintf(stderr,
"\n ## Error: %s: 4. At least 1 invalid adjacent"
105 fprintf(stderr,
"vertices of k %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
108 fprintf(stderr,
"vertices of adj %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
114 if ( (pt1->
tag[i] != pt2->
tag[voy]) || (pt1->
edg[i] != pt2->
edg[voy] ) ) {
115 fprintf(stderr,
"\n ## Error: %s: 3. at least 1 wrong"
116 " tag/ref (%" MMG5_PRId
" %" MMG5_PRId
")"
122 adj1 = adjb[voy] / 3;
123 voy1 = adjb[voy] % 3;
124 if ( adj1 != k || voy1 != i ) {
127 fprintf(stderr,
"\n ## Error: %s: 2. at least 1 wrong"
128 " adjacency (%" MMG5_PRId
" %" MMG5_PRId
")\n",__func__,
MMGS_indElt(
mesh,k),
130 fprintf(stderr,
"vertices of %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
MMGS_indElt(
mesh,k),
133 fprintf(stderr,
"vertices of adj %" MMG5_PRId
": %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
" \n",
137 fprintf(stderr,
"adj(%" MMG5_PRId
"): %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
MMGS_indElt(
mesh,k),
140 fprintf(stderr,
"adj(%" MMG5_PRId
"): %" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
MMGS_indElt(
mesh,adj),
149 if ( pt2->
v[j2] != pt1->
v[i1] || pt2->
v[j1] != pt1->
v[i2] ) {
152 fprintf(stderr,
"\n ## Error: %s: 8. at least 1 wrong"
153 " orientation (%" MMG5_PRId
" %" MMG5_PRId
").\n",__func__,
MMGS_indElt(
mesh,k),
162 if ( !severe )
return 1;
165 printf(
" *** WARNING: Non-admissible normals.\n");
168 for (k=1; k<=
mesh->
nt; k++) {
170 if ( !
MG_EOK(pt1) )
continue;
173 for (i=0; i<3; i++) {
174 if ( !adja[i] )
continue;
181 fprintf(stderr,
"\n ## Error: %s: 6. at least 1 unused"
182 " vertex (%" MMG5_PRId
" %" MMG5_PRId
")\n",__func__,
184 fprintf(stderr,
"%" MMG5_PRId
" %" MMG5_PRId
" %" MMG5_PRId
"\n",
MMGS_indPt(
mesh,pt1->
v[0]),
193 if ( lon < 1 )
continue;
194 for (l=0; l<lon; l++) {
198 if ( pt2->
v[nk] != ip ) {
201 fprintf(stderr,
"\n ## Error: %s: 5. at least 1 wrong"
202 " ball (%" MMG5_PRId
", %" MMG5_PRId
").\n",__func__,
MMGS_indPt(
mesh,ip),
209 for (kk=1; kk<=
mesh->
nt; kk++) {
211 if ( !
MG_EOK(pt2) )
continue;
213 if ( pt2->
v[j] == ip ) {
221 fprintf(stderr,
"\n ## Error: %s: 7. at least 1 incorrect"
222 " ball (%" MMG5_PRId
": %d %d).\n",__func__,
MMGS_indPt(
mesh,ip),lon,len);
246 double dd,ps,*n,nt[3];
249 static int8_t mmgWarn0=0, mmgWarn1=0;
252 for (k=1; k<=
mesh->
np; k++) {
254 if ( !
MG_VOK(p0) )
continue;
262 dd = n[0]*n[0] + n[1]*n[1] + n[2]*n[2];
266 fprintf(stderr,
"\n ## Error: %s: at least 1 non unitary normal"
267 " (point: %" MMG5_PRId
" normal n1 = %f %f %f). exit program\n",
275 dd = n[0]*n[0] + n[1]*n[1] + n[2]*n[2];
279 fprintf(stderr,
"\n ## Error: %s: at least 1 non unitary normal"
280 " (point: %" MMG5_PRId
" normal n2 = %f %f %f). exit program\n",
289 for (k=1; k<=
mesh->
nt; k++) {
291 if ( !
MG_EOK(pt) )
continue;
294 for (i=0; i<3; i++) {
302 ps = n[0]*nt[0] + n[1]*nt[1] + n[2]*nt[2];
306 fprintf(stderr,
"\n ## Error: %s: at least 1"
307 " inconsistant normal (point %" MMG5_PRId
" in triangle %" MMG5_PRId
"):"
315 ps = n[0]*nt[0] + n[1]*nt[1] + n[2]*nt[2];
319 fprintf(stderr,
"\n ## Error: %s: at least 1"
320 " inconsistant normal (point %" MMG5_PRId
" in triangle %" MMG5_PRId
"):"
329 ps = n[0]*nt[0] + n[1]*nt[1] + n[2]*nt[2];
333 fprintf(stderr,
"\n ## Error: %s: at least 1"
334 " inconsistant normal (point %" MMG5_PRId
" in triangle %" MMG5_PRId
"):"
344 ps = n[0]*nt[0] + n[1]*nt[1] + n[2]*nt[2];
348 fprintf(stderr,
"\n ## Error: %s: at least 1"
349 " inconsistant normal (point %" MMG5_PRId
" in triangle %" MMG5_PRId
"):"
int MMG5_boulet(MMG5_pMesh mesh, MMG5_int start, int ip, MMG5_int *list, int8_t s, int8_t *opn)
int MMG5_mmgsChkmsh(MMG5_pMesh mesh, int severe, MMG5_int base)
int chknor(MMG5_pMesh mesh)
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)
Structure to store vertices of an MMG mesh.
Structure to store triangles of a MMG mesh.
Structure to store surface vertices of an MMG mesh.