53 MMG5_int vx[3],k,np,refint,refext;
54 MMG5_int ip0,ip1,ns,nt,
ier,nb;
58 for (k=1; k<=
mesh->
np; k++)
63 for (k=1; k<=
mesh->
nt; k++) {
65 if ( !
MG_EOK(pt) )
continue;
78 if ( p0->
flag && p1->
flag )
continue;
96 for (k=1; k<=
mesh->
nt; k++) {
98 if ( !
MG_EOK(pt) )
continue;
100 for (i=0; i<3; i++) {
132 else if (
MG_SMSGN(v0,v1) )
continue;
133 else if ( !p0->
flag || !p1->
flag )
continue;
139 c[0] = p0->
c[0] + s*(p1->
c[0]-p0->
c[0]);
140 c[1] = p0->
c[1] + s*(p1->
c[1]-p0->
c[1]);
141 c[2] = p0->
c[2] + s*(p1->
c[2]-p0->
c[2]);
146 fprintf(stderr,
"\n ## Error: %s: unable to"
147 " allocate a new point\n",__func__);
155 if ( met && met->
m ) {
156 if ( met->
size > 1 ) {
164 fprintf(stderr,
"\n ## Error: %s: unable to"
165 " interpolate the metric during the level-set"
166 " discretization\n",__func__);
179 for (k=1; k<=nt; k++) {
182 if ( !
MG_EOK(pt) )
continue;
184 memset(vx,0,3*
sizeof(MMG5_int));
185 for (i=0; i<3; i++) {
207 case 3:
case 5:
case 6:
213 assert(pt->
flag == 0);
216 if ( !
ier )
return 0;
220 fprintf(stdout,
" %7" MMG5_PRId
" splitted\n",ns);
223 for (k=1; k<=
mesh->
np; k++)
251 strcat(str,
"(BOUNDARY PART)");
264 fprintf(stdout,
" ** ISOSURFACE EXTRACTION %s\n",str);
268 for (k=1; k<=
sol->
np; k++)
273 fprintf(stderr,
"\n ## Problem in setting boundary. Exit program.\n");
279 fprintf(stderr,
"\n ## Error: %s: hashing problem (1). Exit program.\n",
285 fprintf(stderr,
"\n ## Topology problem. Exit program.\n");
290 if ( !MMG5_snpval(
mesh,
sol) ) {
291 fprintf(stderr,
"\n ## Problem with implicit function. Exit program.\n");
298 fprintf(stderr,
"\n ## Error in removing small parasitic components. Exit program.\n");
305 fprintf(stdout,
"\n ## Warning: rmc option not implemented for boundary"
306 " isosurface extraction.\n");
314 if ( !MMG5_resetRef(
mesh) ) {
315 fprintf(stderr,
"\n ## Problem in resetting references. Exit program.\n");
321 fprintf(stderr,
"\n ## Problem in discretizing implicit function. Exit program.\n");
325 if ( !MMG5_setref(
mesh,
sol) ) {
326 fprintf(stderr,
"\n ## Problem in setting references. Exit program.\n");
332 fprintf(stderr,
"\n ## Hashing problem. Exit program.\n");
339 fprintf(stderr,
"\n ## No manifold resulting situation. Exit program.\n");
MMG5_pMesh MMG5_pSol * sol
if(!ier) exit(EXIT_FAILURE)
int MMGS_setadj(MMG5_pMesh mesh)
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 MMGS_assignEdge(MMG5_pMesh mesh)
int MMGS_hashTria(MMG5_pMesh mesh)
int MMGS_intmet33_ani(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
int intmet_iso(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int8_t i, MMG5_int ip, double s)
MMG5_int MMGS_newPt(MMG5_pMesh mesh, double c[3], double n[3])
int MMGS_split1(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, int i, MMG5_int *vx)
#define MMGS_POINT_REALLOC(mesh, sol, ip, wantedGap, law, o, tag)
int MMGS_split2(MMG5_pMesh mesh, MMG5_pSol met, MMG5_int k, MMG5_int *vx)
int MMG5_rmc(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG5_snpval_ls(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG5_isSplit(MMG5_pMesh mesh, MMG5_int ref, MMG5_int *refint, MMG5_int *refext)
int MMG5_resetRef_ls(MMG5_pMesh mesh)
int MMG5_chkmanimesh(MMG5_pMesh mesh)
int MMG5_setref_ls(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG5_resetRef_lssurf(MMG5_pMesh mesh)
int MMG5_snpval_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
int MMG5_setref_lssurf(MMG5_pMesh mesh, MMG5_pSol sol)
#define MMG5_INCREASE_MEM_MESSAGE()
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)
static int MMGS_cuttri(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
int MMGS_mmgs2(MMG5_pMesh mesh, MMG5_pSol sol, MMG5_pSol met)
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 triangles of a MMG mesh.