Mmg
Simplicial remeshers (mesh adaptation, isovalue discretization, lagrangian movement)
anisomovpt_3d.c
Go to the documentation of this file.
1/* =============================================================================
2** This file is part of the mmg software package for the tetrahedral
3** mesh modification.
4** Copyright (c) Bx INP/CNRS/Inria/UBordeaux/UPMC, 2004-
5**
6** mmg is free software: you can redistribute it and/or modify it
7** under the terms of the GNU Lesser General Public License as published
8** by the Free Software Foundation, either version 3 of the License, or
9** (at your option) any later version.
10**
11** mmg is distributed in the hope that it will be useful, but WITHOUT
12** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14** License for more details.
15**
16** You should have received a copy of the GNU Lesser General Public
17** License and of the GNU General Public License along with mmg (in
18** files COPYING.LESSER and COPYING). If not, see
19** <http://www.gnu.org/licenses/>. Please read their terms carefully and
20** use this copy of the mmg distribution only if you accept them.
21** =============================================================================
22*/
23
36#include "libmmg3d.h"
39#include "mmgexterns_private.h"
40
58int MMG5_movintpt_ani(MMG5_pMesh mesh,MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *list,int ilist,
59 int improve) {
60
61
62 MMG5_pTetra pt,pt0;
63 MMG5_pPoint p0,p1,p2,p3,ppt0;
64 double vol,totvol,m[6];
65 double calold,calnew,callist[MMG3D_LMAX+2],det;
66 MMG5_int iel;
67 int k,i0;
68
69 assert ( ilist > 0 );
70 if ( ilist <= 0 ) {
71 fprintf(stderr,"\n ## Error: %s:"
72 " volumic ball has null or negative size (%d)\n",
73 __func__,ilist);
74 return 0;
75 }
76
77 pt0 = &mesh->tetra[0];
78 ppt0 = &mesh->point[0];
79 memset(ppt0,0,sizeof(MMG5_Point));
80
81 if ( met->m ) {
82 iel = list[0] / 4;
83 i0 = list[0] % 4;
84 memcpy(&met->m[0],&met->m[met->size*mesh->tetra[iel].v[i0]],met->size*sizeof(double));
85 }
86
87 /* Coordinates of optimal point */
88 calold = DBL_MAX;
89 totvol = 0.0;
90 for (k=0; k<ilist; k++) {
91 iel = list[k] / 4;
92 pt = &mesh->tetra[iel];
93 p0 = &mesh->point[pt->v[0]];
94 p1 = &mesh->point[pt->v[1]];
95 p2 = &mesh->point[pt->v[2]];
96 p3 = &mesh->point[pt->v[3]];
97 vol= MMG5_det4pt(p0->c,p1->c,p2->c,p3->c);
98
99 if ( !MMG5_moymet(mesh,met,pt,m) ) {
100 // MMG5_moymet must succeed because we have at least 1 point of the tet
101 // that is internal.
102 return 0;
103 }
104
105 det = m[0] * ( m[3]*m[5] - m[4]*m[4]) - m[1] * ( m[1]*m[5] - m[2]*m[4])
106 + m[2] * ( m[1]*m[4] - m[2]*m[3]);
107 if ( det < MMG5_EPSD2 ) {
108 return 0;
109 }
110
111 vol *= sqrt(det);
112
113 totvol += vol;
114 /* barycenter */
115 ppt0->c[0] += 0.25 * vol*(p0->c[0] + p1->c[0] + p2->c[0] + p3->c[0]);
116 ppt0->c[1] += 0.25 * vol*(p0->c[1] + p1->c[1] + p2->c[1] + p3->c[1]);
117 ppt0->c[2] += 0.25 * vol*(p0->c[2] + p1->c[2] + p2->c[2] + p3->c[2]);
118 calold = MG_MIN(calold, pt->qual);
119 }
120 if (totvol < MMG5_EPSD2) {
121 return 0;
122 }
123
124 totvol = 1.0 / totvol;
125 ppt0->c[0] *= totvol;
126 ppt0->c[1] *= totvol;
127 ppt0->c[2] *= totvol;
128
129 /* Check new position validity */
130 calnew = DBL_MAX;
131 for (k=0; k<ilist; k++) {
132 iel = list[k] / 4;
133 i0 = list[k] % 4;
134 pt = &mesh->tetra[iel];
135 memcpy(pt0,pt,sizeof(MMG5_Tetra));
136 pt0->v[i0] = 0;
137 callist[k] = MMG5_orcal(mesh,met,0);
138 if (callist[k] < MMG5_NULKAL) {
139 return 0;
140 }
141 calnew = MG_MIN(calnew,callist[k]);
142 }
143 if (calold < MMG5_EPSOK && calnew <= calold) {
144 return 0;
145 }
146 else if (calnew < MMG5_EPSOK) {
147 return 0;
148 }
149 else if ( improve && calnew < 1.02* calold ) {
150 return 0;
151 }
152 else if ( calnew < 0.3 * calold ) {
153 return 0;
154 }
155
156 /* update position */
157 if ( PROctree )
158 MMG3D_movePROctree(mesh, PROctree, pt->v[i0], ppt0->c, p0->c);
159
160 p0 = &mesh->point[pt->v[i0]];
161 p0->c[0] = ppt0->c[0];
162 p0->c[1] = ppt0->c[1];
163 p0->c[2] = ppt0->c[2];
164 for (k=0; k<ilist; k++) {
165 (&mesh->tetra[list[k]/4])->qual=callist[k];
166 (&mesh->tetra[list[k]/4])->mark=mesh->mark;
167 }
168
169 return 1;
170}
171
192 int64_t *listv,int ilistv,MMG5_int *lists,int ilists,
193 int improveSurf, int improveVol) {
194 MMG5_pTetra pt,pt0;
195 MMG5_pxTetra pxt;
196 MMG5_pPoint p0;
197 MMG5_Tria tt;
198 MMG5_pxPoint pxp;
199 MMG5_Bezier b;
200 double n[3],r[3][3],lispoi[3*MMG3D_LMAX+1],det2d;
201 double detloc,gv[2],step,lambda[3];
202 double o[3],no[3],*m0,ncur[3],nprev[3],nneighi[3];
203 double calold,calnew,caltmp,callist[MMG3D_LMAX+2];
204 MMG5_int k,kel,iel,ip0,nxp;
205 int ier,l;
206 uint8_t i0,iface,i;
207 static int warn = 0;
208 static int8_t mmgErr0=0;
209
210 step = 0.1;
211 if ( ilists < 2 ) return 0;
212
213 k = listv[0] / 4;
214 i0 = listv[0] % 4;
215 pt = &mesh->tetra[k];
216 ip0 = pt->v[i0];
217 p0 = &mesh->point[ip0];
218 m0 = &met->m[6*ip0];
219 assert( p0->xp && !MG_EDG(p0->tag) );
220
221 n[0] = mesh->xpoint[p0->xp].n1[0];
222 n[1] = mesh->xpoint[p0->xp].n1[1];
223 n[2] = mesh->xpoint[p0->xp].n1[2];
224
226 if ( !MMG5_rotmatrix(n,r) ) {
227 return 0;
228 }
229
232 if ( !MMG3D_rotate_surfacicBall(mesh,lists,ilists,ip0,r,lispoi) ) {
233 return 0;
234 }
235
238 gv[0] = 0.0;
239 gv[1] = 0.0;
240
241 for (k=0; k<ilists; k++) {
242 iel = lists[k] / 4;
243 iface = lists[k] % 4;
244 pt = &mesh->tetra[iel];
245 pxt = &mesh->xtetra[pt->xt];
246
247 assert( 0<=iface && iface<4 && "unexpected local face idx");
248 MMG5_tet2tri(mesh,iel,iface,&tt);
249
250 if(!MMG5_bezierCP(mesh,&tt,&b,MG_GET(pxt->ori,iface))){
251 if( !mmgErr0 ) {
252 mmgErr0 = 1;
253 fprintf(stderr,"\n ## Error: %s: function MMG5_bezierCP return 0.\n",
254 __func__);
255 }
256 return -1;
257 }
258
259 /* Compute integral of sqrt(T^J(xi) M(P(xi)) J(xi)) * P(xi) over the triangle */
260 if ( !MMG5_elementWeight(mesh,met,&tt,p0,&b,r,gv) ) {
261 if ( !warn ) {
262 ++warn;
263 fprintf(stderr,"\n ## Warning: %s:"
264 " unable to compute optimal position for at least"
265 " 1 point.\n",__func__);
266 }
267 return 0;
268 }
269 }
270
271 /* At this point : gv = - gradient of V = direction to follow */
273 det2d = lispoi[1]*gv[1] - lispoi[2]*gv[0];
274 kel = 0;
275 if ( det2d >= 0.0 ) {
276 for (k=0; k<ilists; k++) {
277 detloc = gv[0]*lispoi[3*(k+1)+2] - gv[1]*lispoi[3*(k+1)+1];
278 if ( detloc >= 0.0 ) {
279 kel = k;
280 break;
281 }
282 }
283 if ( k == ilists ) {
284 return 0;
285 }
286 }
287 else {
288 for (k=ilists-1; k>=0; k--) {
289 detloc = lispoi[3*k+1]*gv[1] - lispoi[3*k+2]*gv[0];
290 if ( detloc >= 0.0 ) {
291 kel = k;
292 break;
293 }
294 }
295 if ( k == -1 ) {
296 return 0;
297 }
298 }
299
300 /* Sizing of time step : make sure point does not go out corresponding triangle. */
301 det2d = -gv[1]*(lispoi[3*(kel+1)+1] - lispoi[3*(kel)+1]) + \
302 gv[0]*(lispoi[3*(kel+1)+2] - lispoi[3*(kel)+2]);
303 if ( fabs(det2d) < MMG5_EPSD2 ) {
304 return 0;
305 }
306
307 det2d = 1.0 / det2d;
308 step *= det2d;
309
310 det2d = lispoi[3*(kel)+1]*(lispoi[3*(kel+1)+2] - lispoi[3*(kel)+2]) - \
311 lispoi[3*(kel)+2 ]*(lispoi[3*(kel+1)+1] - lispoi[3*(kel)+1]);
312 step *= det2d;
313 step = fabs(step);
314 gv[0] *= step;
315 gv[1] *= step;
316
317 /* Computation of the barycentric coordinates of the new point in the corresponding triangle. */
318 det2d = lispoi[3*kel+1]*lispoi[3*(kel+1)+2] - lispoi[3*kel+2]*lispoi[3*(kel+1)+1];
319 if ( det2d < MMG5_EPSD2 ) {
320 return 0;
321 }
322 det2d = 1.0 / det2d;
323 lambda[1] = lispoi[3*(kel+1)+2]*gv[0] - lispoi[3*(kel+1)+1]*gv[1];
324 lambda[2] = -lispoi[3*(kel)+2]*gv[0] + lispoi[3*(kel)+1]*gv[1];
325 lambda[1]*= (det2d);
326 lambda[2]*= (det2d);
327 lambda[0] = 1.0 - lambda[1] - lambda[2];
328
331 nxp = MMG3D_movbdyregpt_geom(mesh,lists,kel,ip0,n,lambda,o,no);
332 if ( nxp < 0 ) {
333 return -1;
334 }
335 else if ( !nxp ) {
336 return 0;
337 }
338 pxp = &mesh->xpoint[nxp];
339
340 /* parallel transport of metric at p0 to new point. */
341 if ( !MMG5_paratmet(p0->c,n,m0,o,no,&met->m[0]) ) {
342 return 0;
343 }
344
345 /* For each surfacic triangle build a virtual displaced triangle for check
346 * purposes :
347 * - check the new triangle qualities;
348 * - check normal deviation with the adjacent through the edge facing ip0
349 * and the previous one */
350 k = lists[ilists-1] / 4;
351 iface = lists[ilists-1] % 4;
352
353 assert( 0<=iface && iface<4 && "unexpected local face idx");
354 MMG5_tet2tri(mesh,k,iface,&tt);
355 for( i=0 ; i<3 ; i++ )
356 if ( tt.v[i] == ip0 ) break;
357 assert ( i<3 );
358 if ( i>=3 ) return 0;
359 tt.v[i] = 0;
360
361 if ( !MMG5_nortri(mesh, &tt, nprev) ) return 0;
362
363 calold = calnew = DBL_MAX;
364 for (l=0; l<ilists; l++) {
365 k = lists[l] / 4;
366 iface = lists[l] % 4;
367
368 assert( 0<=iface && iface<4 && "unexpected local face idx");
369 MMG5_tet2tri(mesh,k,iface,&tt);
370 calold = MG_MIN(calold,MMG5_caltri(mesh,met,&tt));
371
372 for( i=0 ; i<3 ; i++ )
373 if ( tt.v[i] == ip0 ) break;
374
375 assert ( i<3 );
376 if ( i>=3 ) return 0;
377 tt.v[i] = 0;
378
379 caltmp = MMG5_caltri(mesh,met,&tt);
380 if ( caltmp < MMG5_EPSD2 ) {
381 /* We don't check the input triangle qualities, thus we may have a very
382 * bad triangle in our mesh */
383 return 0;
384 }
385 calnew = MG_MIN(calnew,caltmp);
386
387 if ( !MMG5_nortri(mesh, &tt, ncur) ) return 0;
388
389 if ( !MG_GEO_OR_NOM(tt.tag[i]) ) {
390 /* Check normal deviation between k and the triangle facing ip0 */
391 /* Note that we don't check the ridge creation along non-manifold edges
392 * because nm edges are skipped while we add ridge tags during analysis
393 * step. */
394 ier = MMG3D_normalAdjaTri(mesh,k,iface, i,nneighi);
395 if ( ier <= 0 ) {
396 return 0;
397 }
398 ier = MMG5_devangle( ncur, nneighi, mesh->info.dhd );
399 if ( ier <= 0 ) {
400 return 0;
401 }
402 }
403
404 i = MMG5_iprv2[i];
405
406 if ( !MG_GEO_OR_NOM(tt.tag[i]) ) {
407 /* Check normal deviation between k and the previous triangle */
408 ier = MMG5_devangle( ncur, nprev, mesh->info.dhd );
409 if ( ier<=0 ) {
410 return 0;
411 }
412 }
413 memcpy(nprev, ncur, 3*sizeof(double));
414
415 }
416 if ( calold < MMG5_EPSOK && calnew <= calold ) {
417 return 0;
418 } else if (calnew < MMG5_EPSOK) {
419 return 0;
420 }
421 else if (improveSurf && calnew < 1.02*calold) {
422 return 0;
423 }
424 else if ( calnew < 0.3*calold ) {
425 return 0;
426 }
427 memset(pxp,0,sizeof(MMG5_xPoint));
428
429 /* Test : check whether all volumes remain positive with new position of the point */
430 calold = calnew = DBL_MAX;
431 for (l=0; l<ilistv; l++) {
432 k = listv[l] / 4;
433 i0 = listv[l] % 4;
434 pt = &mesh->tetra[k];
435 pt0 = &mesh->tetra[0];
436 memcpy(pt0,pt,sizeof(MMG5_Tetra));
437 pt0->v[i0] = 0;
438 calold = MG_MIN(calold, pt->qual);
439 callist[l]=MMG5_orcal(mesh,met,0);
440 if ( callist[l] < MMG5_NULKAL ) {
441 return 0;
442 }
443 calnew = MG_MIN(calnew,callist[l]);
444 }
445
446 if ( calold < MMG5_EPSOK && calnew <= calold ) {
447 return 0;
448 }
449 else if (calnew < MMG5_EPSOK) {
450 return 0;
451 }
452 else if (improveVol && calnew < calold) {
453 return 0;
454 }
455 else if ( calnew < 0.3*calold ) {
456 return 0;
457 }
458
459 /* When all tests have been carried out, update coordinates, normals and metrics*/
460 if ( PROctree )
461 MMG3D_movePROctree(mesh, PROctree, ip0, o, p0->c);
462
463 p0->c[0] = o[0];
464 p0->c[1] = o[1];
465 p0->c[2] = o[2];
466
467 n[0] = no[0];
468 n[1] = no[1];
469 n[2] = no[2];
470
471 memcpy(m0,&met->m[0],6*sizeof(double));
472
473 for(l=0; l<ilistv; l++){
474 (&mesh->tetra[listv[l]/4])->qual= callist[l];
475 (&mesh->tetra[listv[l]/4])->mark= mesh->mark;
476 }
477 return 1;
478}
479
501static inline
503 int ilistv,MMG5_int *lists, int ilists,int improve,const int16_t edgTag){
504 MMG5_pTetra pt;
505 MMG5_pPoint p0;
506 MMG5_Tria tt;
507 double ll1old,ll2old,l1new,l2new;
508 double o[3],no[3],no2[3],to[3], ncur[3],nprev[3],nneighi[3];
509 double calold,calnew,caltmp;
510 MMG5_int l,iel,ip0,ip1,ip2,ip;
511 uint8_t i,iface,isrid;
512
513 ip1 = ip2 = 0;
514 pt = &mesh->tetra[listv[0]/4];
515 ip0 = pt->v[listv[0]%4];
516 p0 = &mesh->point[ip0];
517
520 isrid = ((MG_GEO & edgTag) && !(MG_NOM & edgTag));
521
522 assert ( edgTag & p0->tag );
523
526 int ier = MMG3D_curveEndingPts(mesh,lists,ilists,edgTag,ip0,&ip1,&ip2);
527 if ( !ier ) {
528 return 0;
529 }
530
537 ll1old = MMG5_lenSurfEdg(mesh,met,ip0,ip1,isrid);
538 ll2old = MMG5_lenSurfEdg(mesh,met,ip0,ip2,isrid);
539
540 if ( (!ll1old) || (!ll2old) ) {
541 return 0;
542 }
543
546 ip = MMG3D_movbdycurvept_newPosForSimu( mesh,p0,ip0,ip1,ip2,ll1old,ll2old,
547 isrid,MMG3D_MOVSTEP,o,no,no2,to,edgTag );
548 if ( !ip ) {
549 return 0;
550 }
551
553 if ( (MG_GEO & edgTag) && !(MG_NOM & edgTag) ) {
554 /* Interpolation of metric between ip0 and ip2 along ridge */
555 if ( !MMG5_intridmet(mesh,met,ip0,ip,MMG3D_MOVSTEP,no,&met->m[0]) ) {
556 return 0;
557 }
558 }
559 else {
560 /* Interpolation of metric between ip0 and ip2 along non manifold or ref edge */
561 if ( !MMG5_paratmet(p0->c,mesh->xpoint[p0->xp].n1,&met->m[6*ip0],o,no,&met->m[0]) ) {
562 return 0;
563 }
564 }
565
567 l1new = MMG5_lenSurfEdg(mesh,met,0,ip1,isrid);
568 l2new = MMG5_lenSurfEdg(mesh,met,0,ip2,isrid);
569
570 if ( (!l1new) || (!l2new) ) {
571 return 0;
572 }
573
574 if ( fabs(l2new -l1new) >= fabs(ll2old -ll1old) ) {
575 return 0;
576 }
577
583 iel = lists[ilists-1] / 4;
584 iface = lists[ilists-1] % 4;
585
586 assert( 0<=iface && iface<4 && "unexpected local face idx");
587 MMG5_tet2tri(mesh,iel,iface,&tt);
588 for( i=0 ; i<3 ; i++ ) {
589 if ( tt.v[i] == ip0 ) {
590 break;
591 }
592 }
593
594 assert ( i<3 );
595 if ( i>=3 ) {
596 return 0;
597 }
598 tt.v[i] = 0;
599
600 if ( !MMG5_nortri(mesh, &tt, nprev) ) {
601 return 0;
602 }
603
604 calold = calnew = DBL_MAX;
605 for( l=0 ; l<ilists ; l++ ){
606 iel = lists[l] / 4;
607 iface = lists[l] % 4;
608
609 assert( 0<=iface && iface<4 && "unexpected local face idx");
610 MMG5_tet2tri(mesh,iel,iface,&tt);
611 caltmp = MMG5_caltri(mesh,met,&tt);
612 calold = MG_MIN(calold,caltmp);
613
614 for( i=0 ; i<3 ; i++ ) {
615 if ( tt.v[i] == ip0 ) {
616 break;
617 }
618 }
619 assert(i<3);
620 if ( i==3 ) {
621 return 0;
622 }
623
624 tt.v[i] = 0;
625
626 caltmp = MMG5_caltri(mesh,met,&tt);
627 if ( caltmp < MMG5_EPSD2 ) {
628 /* We don't check the input triangle qualities, thus we may have a very
629 * bad triangle in our mesh */
630 return 0;
631 }
632 calnew = MG_MIN(calnew,caltmp);
633
634 if ( !MMG5_nortri(mesh, &tt, ncur) ) {
635 return 0;
636 }
637
638 if ( !MG_GEO_OR_NOM(tt.tag[i]) ) {
639 /* Check normal deviation between iel and the triangle facing ip0 */
640 /* Note that we don't check the ridge creation along non-manifold edges
641 * because nm edges are skipped while we add ridge tags during analysis
642 * step. */
643 int16_t ier2 = MMG3D_normalAdjaTri(mesh,iel,iface, i,nneighi);
644 if ( ier2 <=0 ) {
645 return 0;
646 }
647 ier2 = MMG5_devangle( ncur, nneighi, mesh->info.dhd );
648 if ( ier2 <= 0 ) {
649 return 0;
650 }
651 }
652
653 i = MMG5_iprv2[i];
654
655 if ( !MG_GEO_OR_NOM(tt.tag[i]) ) {
656 /* Check normal deviation between k and the previous triangle */
657 int16_t ier2 = MMG5_devangle( ncur, nprev, mesh->info.dhd );
658 if ( ier2<=0 ) {
659 return 0;
660 }
661 }
662 memcpy(nprev, ncur, 3*sizeof(double));
663 }
664 if ( calold < MMG5_EPSOK && calnew <= calold ) {
665 return 0;
666 }
667 else if ( calnew < calold ) {
668 return 0;
669 }
670 memset(&mesh->xpoint[mesh->point[0].xp],0,sizeof(MMG5_xPoint));
671
675 ier = MMG3D_movbdycurvept_chckAndUpdate(mesh,met,PROctree,listv,ilistv,
676 improve,p0,ip0,isrid,o,no,no2,to);
677
678 if ( ier ) {
679 memcpy(&met->m[6*ip0],&met->m[0],6*sizeof(double));
680 }
681
682 return ier;
683}
684
704 int ilistv, MMG5_int *lists, int ilists,int improve){
705
706 return MMG3D_movbdycurvept_ani(mesh,met,PROctree,listv,ilistv,lists,ilists,improve,MG_REF);
707}
708
728 int64_t *listv,int ilistv, MMG5_int *lists, int ilists,
729 int improve){
730
731 return MMG3D_movbdycurvept_ani(mesh,met,PROctree,listv,ilistv,lists,ilists,improve,MG_NOM);
732}
733
734
752 int64_t *listv,int ilistv,MMG5_int *lists,int ilists,
753 int improve) {
754
755 return MMG3D_movbdycurvept_ani(mesh,met,PROctree,listv,ilistv,lists,ilists,improve,MG_GEO);
756}
int ier
MMG5_pMesh * mesh
int MMG3D_movePROctree(MMG5_pMesh mesh, MMG3D_pPROctree q, MMG5_int no, double *newVer, double *oldVer)
Definition: PRoctree_3d.c:225
int MMG5_elementWeight(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTria pt, MMG5_pPoint p0, MMG5_Bezier *pb, double r[3][3], double gv[2])
Definition: anisomovpt.c:53
int MMG5_movbdynompt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve)
static int MMG3D_movbdycurvept_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve, const int16_t edgTag)
int MMG5_movbdyregpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improveSurf, int improveVol)
int MMG5_movbdyrefpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve)
int MMG5_movintpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *list, int ilist, int improve)
Definition: anisomovpt_3d.c:58
int MMG5_movbdyridpt_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, MMG5_int *lists, int ilists, int improve)
int MMG5_moymet(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt, double *m1)
Definition: anisosiz_3d.c:144
static double MMG5_orcal(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int iel)
int MMG5_intridmet(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int ip1, MMG5_int ip2, double s, double v[3], double mr[6])
Definition: intmet.c:163
API headers for the mmg3d library.
#define MMG3D_LMAX
Definition: libmmg3d.h:58
int MMG3D_curveEndingPts(MMG5_pMesh, MMG5_int *, int, const int16_t, MMG5_int, MMG5_int *, MMG5_int *)
Definition: movpt_3d.c:936
int MMG3D_movbdycurvept_chckAndUpdate(MMG5_pMesh mesh, MMG5_pSol met, MMG3D_pPROctree PROctree, int64_t *listv, int ilistv, int improve, MMG5_pPoint p0, MMG5_int ip0, uint8_t isrid, double o[3], double no[3], double no2[3], double to[3])
Definition: movpt_3d.c:1048
#define MMG3D_MOVSTEP
int MMG3D_movbdycurvept_newPosForSimu(MMG5_pMesh, MMG5_pPoint, MMG5_int, MMG5_int, MMG5_int, double, double, uint8_t, const double, double[3], double[3], double[3], double[3], const int16_t)
Definition: movpt_3d.c:1142
int MMG3D_rotate_surfacicBall(MMG5_pMesh, MMG5_int *, int, MMG5_int, double r[3][3], double *)
Definition: movpt_3d.c:350
int MMG3D_normalAdjaTri(MMG5_pMesh, MMG5_int, int8_t, int, double n[3])
Definition: split_3d.c:466
void MMG5_tet2tri(MMG5_pMesh mesh, MMG5_int k, int8_t ie, MMG5_Tria *ptt)
Definition: mmg3d1.c:102
int MMG3D_movbdyregpt_geom(MMG5_pMesh, MMG5_int *, const MMG5_int, const MMG5_int, double[3], double[3], double[3], double[3])
Definition: movpt_3d.c:482
int MMG5_paratmet(double c0[3], double n0[3], double m[6], double c1[3], double n1[3], double mt[6])
Definition: mettools.c:1390
#define MG_GEO
#define MMG5_EPSOK
#define MG_MIN(a, b)
#define MG_EDG(tag)
static const uint8_t MMG5_iprv2[3]
double MMG5_det4pt(double c0[3], double c1[3], double c2[3], double c3[3])
Definition: tools.c:932
#define MMG5_NULKAL
#define MG_GEO_OR_NOM(tag)
#define MG_GET(flag, bit)
int MMG5_devangle(double *n1, double *n2, double crit)
Definition: tools.c:103
int MMG5_nortri(MMG5_pMesh mesh, MMG5_pTria pt, double *n)
Definition: tools.c:209
int MMG5_rotmatrix(double n[3], double r[3][3])
Definition: tools.c:467
#define MG_NOM
#define MMG5_EPSD2
#define MG_REF
double dhd
Definition: libmmgtypes.h:518
MMG mesh structure.
Definition: libmmgtypes.h:605
MMG5_Info info
Definition: libmmgtypes.h:651
MMG5_pPoint point
Definition: libmmgtypes.h:641
MMG5_int mark
Definition: libmmgtypes.h:618
MMG5_pxPoint xpoint
Definition: libmmgtypes.h:642
MMG5_pTetra tetra
Definition: libmmgtypes.h:643
MMG5_pxTetra xtetra
Definition: libmmgtypes.h:644
Structure to store points of a MMG mesh.
Definition: libmmgtypes.h:270
int16_t tag
Definition: libmmgtypes.h:284
double c[3]
Definition: libmmgtypes.h:271
MMG5_int xp
Definition: libmmgtypes.h:279
double * m
Definition: libmmgtypes.h:671
MMG5_int v[4]
Definition: libmmgtypes.h:403
MMG5_int xt
Definition: libmmgtypes.h:407
double qual
Definition: libmmgtypes.h:402
int16_t tag[3]
Definition: libmmgtypes.h:342
MMG5_int v[3]
Definition: libmmgtypes.h:334
Structure to store surface points of a MMG mesh.
Definition: libmmgtypes.h:294
double n1[3]
Definition: libmmgtypes.h:295
Structure to store the surface tetrahedra of a MMG mesh.
Definition: libmmgtypes.h:418
int8_t ori
Definition: libmmgtypes.h:427