38#ifndef _INLINED_FUNCT_3D_H
39#define _INLINED_FUNCT_3D_H
57 double ux,uy,uz,dd1,dd2,len;
63 dd1 = sa[0]*ux*ux + sa[3]*uy*uy + sa[5]*uz*uz \
64 + 2.0*(sa[1]*ux*uy + sa[2]*ux*uz + sa[4]*uy*uz);
65 if ( dd1 <= 0.0 ) dd1 = 0.0;
67 dd2 = sb[0]*ux*ux + sb[3]*uy*uy + sb[5]*uz*uz \
68 + 2.0*(sb[1]*ux*uy + sb[2]*ux*uz + sb[4]*uy*uz);
69 if ( dd2 <= 0.0 ) dd2 = 0.0;
73 if(fabs(dd1-dd2) < 0.05 ) {
74 len = sqrt(0.5*(dd1+dd2));
77 len = (sqrt(dd1)+sqrt(dd2)+4.0*sqrt(0.5*(dd1+dd2))) / 6.0;
113 &met->
m[6*ip1],&met->
m[6*ip2]);
180 for ( i=0; i<6; ++i )
181 m1[i] = met->
m[6*ip1+i];
187 for ( i=0; i<6; ++i )
188 m2[i] = met->
m[6*ip2+i];
279 return MMG5_caltet(
mesh,met,pt);
296 double ct[12],cs[3],rad,Vref,V,cal;
299 for (j=0,l=0; j<4; j++,l+=3) {
300 memcpy(&ct[l],
mesh->
point[pt->
v[j]].
c,3*
sizeof(
double));
310 Vref = 8.*sqrt(3)/27.*rad*sqrt(rad);
341 double abx,aby,abz,acx,acy,acz,adx,ady,adz,bcx,bcy,bcz,bdx,bdy,bdz;
343 double vol,v1,v2,v3,rap;
349 rap = abx*abx + aby*aby + abz*abz;
354 rap += acx*acx + acy*acy + acz*acz;
359 rap += adx*adx + ady*ady + adz*adz;
361 v1 = acy*adz - acz*ady;
362 v2 = acz*adx - acx*adz;
363 v3 = acx*ady - acy*adx;
364 vol = abx * v1 + aby * v2 + abz * v3;
370 rap += bcx*bcx + bcy*bcy + bcz*bcz;
375 rap += bdx*bdx + bdy*bdy + bdz*bdz;
380 rap += cdx*cdx + cdy*cdy + cdz*cdz;
384 rap = rap * sqrt(rap);
401 MMG5_int ia, ib, ic, id;
430 double cal,abx,aby,abz,acx,acy,acz,adx,ady,adz;
431 double h1,h2,h3,h4,h5,h6,det,vol,rap,v1,v2,v3,num;
432 double bcx,bcy,bcz,bdx,bdy,bdz,cdx,cdy,cdz;
476 v1 = acy*adz - acz*ady;
477 v2 = acz*adx - acx*adz;
478 v3 = acx*ady - acy*adx;
479 vol = abx * v1 + aby * v2 + abz * v3;
480 if ( vol <= 0. )
return 0.0;
482 det = mm[0] * ( mm[3]*mm[5] - mm[4]*mm[4]) \
483 - mm[1] * ( mm[1]*mm[5] - mm[2]*mm[4]) \
484 + mm[2] * ( mm[1]*mm[4] - mm[2]*mm[3]);
488 det = sqrt(det) * vol;
491 h1 = mm[0]*abx*abx + mm[3]*aby*aby + mm[5]*abz*abz
492 + 2.0*(mm[1]*abx*aby + mm[2]*abx*abz + mm[4]*aby*abz);
493 h2 = mm[0]*acx*acx + mm[3]*acy*acy + mm[5]*acz*acz
494 + 2.0*(mm[1]*acx*acy + mm[2]*acx*acz + mm[4]*acy*acz);
495 h3 = mm[0]*adx*adx + mm[3]*ady*ady + mm[5]*adz*adz
496 + 2.0*(mm[1]*adx*ady + mm[2]*adx*adz + mm[4]*ady*adz);
497 h4 = mm[0]*bcx*bcx + mm[3]*bcy*bcy + mm[5]*bcz*bcz
498 + 2.0*(mm[1]*bcx*bcy + mm[2]*bcx*bcz + mm[4]*bcy*bcz);
499 h5 = mm[0]*bdx*bdx + mm[3]*bdy*bdy + mm[5]*bdz*bdz
500 + 2.0*(mm[1]*bdx*bdy + mm[2]*bdx*bdz + mm[4]*bdy*bdz);
501 h6 = mm[0]*cdx*cdx + mm[3]*cdy*cdy + mm[5]*cdz*cdz
502 + 2.0*(mm[1]*cdx*cdy + mm[2]*cdx*cdz + mm[4]*cdy*cdz);
505 rap = h1 + h2 + h3 + h4 + h5 + h6;
507 num = sqrt(rap) * rap;
int MMG5_moymet(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt, double *m1)
int MMG5_cenrad_iso(MMG5_pMesh mesh, double *ct, double *c, double *rad)
static double MMG5_caltet_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
static double MMG5_caltet_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
static double MMG5_caltet_iso_4pt(double *a, double *b, double *c, double *d)
static double MMG5_lenedg_iso(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG5_lenedg33_ani(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG3D_caltetLES_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pTetra pt)
static double MMG5_lenedgspl_iso(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG5_lenedg_ani(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG5_lenedgspl_ani(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG5_lenedgCoor_ani(double *ca, double *cb, double *sa, double *sb)
inlined Functions
static double MMG5_lenedgspl33_ani(MMG5_pMesh mesh, MMG5_pSol met, int ia, MMG5_pTetra pt)
static double MMG5_orcal(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int iel)
static double MMG5_lenSurfEdg_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int ip1, MMG5_int ip2, int8_t isedg)
static double MMG5_lenSurfEdg33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int np0, MMG5_int np1, int8_t isedg)
static double MMG5_lenSurfEdg_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int np0, MMG5_int np1, int8_t isedg)
static const uint8_t MMG5_iare[6][2]
vertices of extremities of the edges of the tetra
double MMG5_orvol(MMG5_pPoint point, MMG5_int *v)
Structure to store vertices of an MMG mesh.
Structure to store tetrahedra of an MMG mesh.