47 memcpy(ppt->
c,c,2*
sizeof(
double));
77 fprintf(stdout,
" ## INVALID EDGE.\n");
113 fprintf(stdout,
" ## INVALID ELEMENT.\n");
119 iadr = (iel-1)*3 + 1;
121 memset(&
mesh->
adja[iadr],0,3*
sizeof(MMG5_int));
147 size_t usedMem,avMem,reservedMem,npadd;
161 fprintf(stderr,
"\n ## Error: %s: %zu MB of memory ",__func__,
163 fprintf(stderr,
"is not enough to load mesh. You need to ask %zu MB minimum\n",
173 2*
sizeof(
MMG5_Tria) + 3*2*
sizeof(MMG5_int)
174 + 0.2*
sizeof(
MMG5_Edge) + 3*
sizeof(double);
181 npadd = avMem/(2*bytes);
186 if (
sizeof(MMG5_int) ==
sizeof(int32_t) ) {
199 int32_t int32_ntmax = (INT32_MAX-(coef+1))/coef;
201 if ( int32_ntmax < mesh->ntmax ) {
202 if ( int32_ntmax <= mesh->nt ) {
204 fprintf(stderr,
"\n ## Error: %s: with %" MMG5_PRId
" triangles Mmg will overflow"
205 " the 32-bit integer.\n",__func__,
mesh->
nt);
206 fprintf(stderr,
"Please, configure Mmg with MMG5_INT=int64_t argument.\n");
217 fprintf(stdout,
" MAXIMUM MEMORY AUTHORIZED (MB) %zu\n",
222 fprintf(stdout,
" MMG2D_NPMAX %" MMG5_PRId
"\n",
mesh->
npmax);
223 fprintf(stdout,
" MMG2D_NTMAX %" MMG5_PRId
"\n",
mesh->
ntmax);
260 printf(
" Exit program.\n");
284 for (k=
mesh->
npnil; k<mesh->npmax-1; k++) {
293 for (k=
mesh->
nenil; k<mesh->ntmax-1; k++)
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
size_t MMG5_memSize(void)
void MMG5_memOption_memSet(MMG5_pMesh mesh)
#define MMG5_ADD_MEM(mesh, size, message, law)
Structure to store edges of am MMG mesh.
Structure to store vertices of an MMG mesh.
Structure to store quadrangles of an MMG mesh.
Structure to store triangles of a MMG mesh.
void MMG5_delEdge(MMG5_pMesh mesh, MMG5_int iel)
int MMG2D_memOption(MMG5_pMesh mesh)
static int MMG2D_memOption_memSet(MMG5_pMesh mesh)
int MMG2D_zaldy(MMG5_pMesh mesh)
MMG5_int MMG2D_newPt(MMG5_pMesh mesh, double c[2], uint16_t tag)
int MMG2D_delElt(MMG5_pMesh mesh, MMG5_int iel)
void MMG2D_delPt(MMG5_pMesh mesh, MMG5_int ip)
int MMG2D_setMeshSize_alloc(MMG5_pMesh mesh)
MMG5_int MMG2D_newElt(MMG5_pMesh mesh)