32 double hausd[3],hmax[3],ps,cosn,ux,uy,ll,li,t1[2],t2[2];
48 if ( par->
ref != pt->
ref )
continue;
50 hmax[0] = hmax[1] = hmax[2] = par->
hmax;
51 hausd[0] = hausd[1] = hausd[2] = par->
hausd;
66 if ( par->
ref != pt->
edg[i] )
continue;
88 if ( par->
ref != pt->
edg[i] )
continue;
91 hausd[i] = par->
hausd;
106 for (i=0; i<3; i++) {
114 ux = p2->
c[0] - p1->
c[0];
115 uy = p2->
c[1] - p1->
c[1];
119 if ( ll > hmax[i]*hmax[i] ) {
158 ps = t1[0]*ux + t1[1]*uy;
163 if ( cosn > 9.0*hausd[i]*hausd[i] ) {
168 ps = -(t2[0]*ux + t2[1]*uy);
173 if ( cosn > 9.0*hausd[i]*hausd[i] ) {
188 double b1[2],b2[2],t1[2],t2[2],n1[2],n2[2],bn[2],ux,uy,ll,li,ps;
192 if ( !
MG_EOK(pt) )
return 0;
201 o[0] = (1-s)*p1->
c[0]+s*p2->
c[0];
202 o[1] = (1-s)*p1->
c[1]+s*p2->
c[1];
203 memset(no,0,2*
sizeof(
double));
207 ux = p2->
c[0] - p1->
c[0];
208 uy = p2->
c[1] - p1->
c[1];
249 ps = n1[0]*n2[0] + n1[1]*n2[1];
256 ps = n1[0]*n2[0] + n1[1]*n2[1];
264 ps = ux*t1[0]+uy*t1[1];
268 ps = ux*t2[0]+uy*t2[1];
272 ps = ux*(n1[0]+n2[0]) + uy*(n1[1]+n2[1]);
275 bn[0] = n1[0]+n2[0] - ps*ux;
276 bn[1] = n1[1]+n2[1] - ps*uy;
277 ps = bn[0]*bn[0] + bn[1]*bn[1];
285 o[0] = (1.0-s)*(1.0-s)*(1.0-s)*p1->
c[0] + 3.0*(1.0-s)*(1.0-s)*s*b1[0] + 3.0*(1.0-s)*s*s*b2[0] + s*s*s*p2->
c[0];
286 o[1] = (1.0-s)*(1.0-s)*(1.0-s)*p1->
c[1] + 3.0*(1.0-s)*(1.0-s)*s*b1[1] + 3.0*(1.0-s)*s*s*b2[1] + s*s*s*p2->
c[1];
288 no[0] = (1.0-s)*(1.0-s)*n1[0] + 2*(1.0-s)*s*bn[0] + s*s*n2[0];
289 no[1] = (1.0-s)*(1.0-s)*n1[1] + 2*(1.0-s)*s*bn[1] + s*s*n2[1];
int MMG2D_bezierCurv(MMG5_pMesh mesh, MMG5_int k, int8_t i, double s, double *o, double *no)
int MMG2D_chkedg(MMG5_pMesh mesh, MMG5_int k)
static const uint8_t MMG5_iprv2[3]
static const uint8_t MMG5_inxt2[6]
#define MG_SET(flag, bit)
Local parameters for a specific entity and reference.
Structure to store vertices of an MMG mesh.
Structure to store triangles of a MMG mesh.