55 MMG5_int k,ref,ip1,ip2;
58 for (k=1; k<=
mesh->
ne; k++) {
60 if ( !
MG_EOK(pt) )
continue;
62 if ( !pt->
xt )
continue;
77 pxt->
tag[ia] &= ~MG_REF;
114 fprintf(stderr,
"\n ## Error: %s: hashing problem (1). Exit program.\n",
120 for (k=1; k<=
mesh->
np; k++)
124 fprintf(stderr,
" Exit program.\n");
130 for (k=1; k<=
mesh->
np; k++) {
132 if ( !
MG_VOK(p0) )
continue;
135 fprintf(stderr,
" ## Warning: %s: snapping value %" MMG5_PRId
"; "
136 "previous value: %E.\n",__func__,k,fabs(
sol->m[k]));
166 MMG5_int vx[6],nb,k,ip0,ip1,np,ns,ne,
ier,src,refext,refint;
167 int8_t ia,iface,j,npneg;
168 static int8_t mmgWarn = 0;
171 for (k=1; k<=
mesh->
np; k++)
176 for (k=1; k<=
mesh->
ne; k++) {
178 if ( !pt->
xt )
continue;
181 for (iface=0; iface<4; iface++) {
183 for (j=0; j<3; j++) {
191 if ( p0->
flag && p1->
flag )
continue;
204 if ( ! nb )
return 1;
210 for (k=1; k<=
mesh->
ne; k++) {
212 if ( !
MG_EOK(pt) )
continue;
216 for (ia=0; ia<6; ia++) {
225 if ( !pt->
xt )
continue;
228 for (ia=0; ia<4; ia++) {
231 for (j=0; j<3; j++) {
242 for (k=1; k<=
mesh->
ne; k++) {
244 if ( !
MG_EOK(pt) )
continue;
245 if ( !pt->
xt )
continue;
248 for (iface=0; iface<4; iface++) {
250 for (j=0; j<3; j++) {
256 if ( np>0 )
continue;
264 else if (
MG_SMSGN(v0,v1) )
continue;
265 else if ( !p0->
flag || !p1->
flag )
continue;
272 c[0] = p0->
c[0] + s*(p1->
c[0]-p0->
c[0]);
273 c[1] = p0->
c[1] + s*(p1->
c[1]-p0->
c[1]);
274 c[2] = p0->
c[2] + s*(p1->
c[2]-p0->
c[2]);
285 fprintf(stderr,
"\n ## Error: %s: unable to"
286 " allocate a new point\n",__func__);
302 double,
"larger solution",
317 if ( met && met->
m ) {
318 if ( met->
size > 1 ) {
326 fprintf(stderr,
"\n ## Error: %s: unable to"
327 " interpolate the metric during the level-set"
328 " discretization\n",__func__);
337 fprintf(stderr,
" ## Warning: %s: the level-set intersect at least"
338 " one required entity. Required entity ignored.\n\n",__func__);
353 for (k=1; k<=ne; k++) {
355 if ( !
MG_EOK(pt) )
continue;
357 memset(vx,0,6*
sizeof(
int));
359 for (ia=0; ia<6; ia++) {
365 case 1:
case 2:
case 4:
case 8:
case 16:
case 32:
370 case 48:
case 24:
case 40:
case 6:
case 34:
case 36:
371 case 20:
case 5:
case 17:
case 9:
case 3:
case 10:
376 case 12:
case 18:
case 33:
381 case 7:
case 25:
case 42:
case 52:
386 case 35:
case 19:
case 13:
case 37:
case 22:
case 28:
case 26:
387 case 14:
case 49:
case 50:
case 44:
case 41:
392 case 30:
case 45:
case 51:
398 assert(pt->
flag == 0);
402 if ( !
ier )
return 0;
405 fprintf(stdout,
" %7" MMG5_PRId
" splitted\n",ns);
423 MMG5_int k,ip,ip1,ip2,ref,refint,refext;
424 int8_t nmns,npls,nz,i,ia,j,j1,j2,
ier;
427 for (k=1; k<=
mesh->
ne; k++) {
429 if ( !
MG_EOK(pt) )
continue;
431 if ( !pt->
xt )
continue;
434 for (i=0; i<4; i++) {
437 nmns = npls = nz = 0;
440 for (j=0; j<3; j++) {
454 fprintf(stderr,
" ## Error: at least 1 triangle with its 3 vertices over the level-set.\n"
455 " Undetermined case.\n");
464 pxt->
ref[i] = refext;
470 pxt->
ref[i] = refint;
475 for (j=0; j<3; j++) {
MMG5_pMesh MMG5_pSol * sol
int MMG5_hashUpdate(MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
int MMG5_hashNew(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int hsiz, MMG5_int hmax)
MMG5_int MMG5_hashGet(MMG5_Hash *hash, MMG5_int a, MMG5_int b)
int MMG5_hashEdge(MMG5_pMesh mesh, MMG5_Hash *hash, MMG5_int a, MMG5_int b, MMG5_int k)
int MMG3D_hashTetra(MMG5_pMesh mesh, int pack)
Create array of adjacency.
int MMG3D_intmet33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
int MMG5_intmet_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
API headers and documentation for the mmg3d library, for volumetric meshes in 3D.
int MMG5_split4op(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG5_split3op(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG5_split1(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t metRidTyp)
MMG5_int MMG3D_newPt(MMG5_pMesh mesh, double c[3], uint16_t tag, MMG5_int src)
static const int8_t MMG5_iarf[4][3]
iarf[i]: edges of face opposite to vertex i
static const uint8_t MMG5_iare[6][2]
vertices of extremities of the edges of the tetra
int MMG5_split2(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
int MMG5_split2sf(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
#define MMG3D_POINT_REALLOC(mesh, sol, ip, wantedGap, law, o, tag, src)
int MMG5_split3cone(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int vx[6], int8_t)
static const uint8_t MMG5_idir[4][3]
idir[i]: vertices of face opposite to vertex i
int MMG5_isSplit(MMG5_pMesh mesh, MMG5_int ref, MMG5_int *refint, MMG5_int *refext)
int MMG5_getStartRef(MMG5_pMesh mesh, MMG5_int ref, MMG5_int *pref)
int MMG3D_cuttet_lssurf(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
int MMG3D_snpval_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG3D_setref_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG3D_resetRef_lssurf(MMG5_pMesh mesh)
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MMG5_INCREASE_MEM_MESSAGE()
#define MMG5_ADD_MEM(mesh, size, message, law)
#define MMG5_SAFE_REALLOC(ptr, prevSize, newSize, type, message, law)
static const uint8_t MMG5_iprv2[3]
static const uint8_t MMG5_inxt2[6]
#define MMG5_DEL_MEM(mesh, ptr)
#define MG_SET(flag, bit)
#define MMG5_SAFE_RECALLOC(ptr, prevSize, newSize, type, message, law)
Identic as MMG5_HGeom but use MMG5_hedge to store edges instead of MMG5_hgeom (memory economy).
Structure to store vertices of an MMG mesh.
Structure to store tetrahedra of an MMG mesh.
Structure to store additional information for the surface tetrahedra of an MMG mesh.