120 if ( disp && *disp ) {
143 if ( disp && *disp ) {
185 disp =
sol = ls = NULL;
206 fprintf(stderr,
"\n ## Error: %s: MMG3D_Init_mesh:\n"
207 " unexpected argument type: %d\n",__func__,typArg);
208 fprintf(stderr,
" Argument type must be one"
209 " of the MMG5_ARG* preprocessor variable:"
210 " MMG5_ARG_ppMesh, MMG5_ARG_ppMet,"
211 " MMG5_ARG_ppLs, MMG5_ARG_ppDisp\n");
216 if ( meshCount !=1 ) {
217 fprintf(stderr,
"\n ## Error: %s: MMG3D_Init_mesh:\n"
218 " you need to initialize the mesh structure that"
219 " will contain your mesh.\n",__func__);
267 int meshCount,metCount,lsCount,dispCount,fieldsCount;
269 meshCount = metCount = lsCount = dispCount = fieldsCount = 0;
271 disp =
sol = sols = ls = NULL;
298 fprintf(stderr,
"\n ## Error: %s: MMG3D_Free_all:\n"
299 " unexpected argument type: %d\n",__func__,typArg);
300 fprintf(stderr,
" Argument type must be one of the following preprocessor"
302 " MMG5_ARG_ppMesh, MMG5_ARG_ppMet,"
303 " MMG5_ARG_ppLs, MMG5_ARG_ppDisp\n");
308 if ( meshCount !=1 ) {
309 fprintf(stderr,
"\n ## Error: %s: MMG3D_Free_all:\n"
310 " you need to provide your mesh structure"
311 " to allow to free the associated memory.\n",__func__);
315 if ( metCount > 1 || lsCount > 1 || dispCount > 1 || fieldsCount > 1 ) {
316 fprintf(stdout,
"\n ## Warning: %s: MMG3D_Free_all:\n"
317 " This function can free only one structure of each type.\n"
318 " Probable memory leak.\n",
362 if ( (*mesh)->tetra )
365 if ( (*mesh)->prism )
377 if ( (*mesh)->adjapr )
380 if ( (*mesh)->htab.geom )
386 if ( (*mesh)->quadra )
389 if ( (*mesh)->xtetra )
392 if ( (*mesh)->xprism )
396 if ( disp && (*disp) && (*disp)->
m )
400 if ( ls && (*ls) && (*ls)->
m )
404 if ( field && (*mesh)->nsols ) {
405 for ( i=0; i<(*mesh)->nsols; ++i ) {
459 disp =
sol = ls = sols = NULL;
482 fprintf(stderr,
"\n ## Error: %s: MMG3D_Free_structures:\n"
483 " unexpected argument type: %d\n",__func__,typArg);
484 fprintf(stderr,
" Argument type must be one of the following preprocessor"
486 " MMG5_ARG_ppMesh, MMG5_ARG_ppMet,"
487 " MMG5_ARG_ppLs, MMG5_ARG_ppDisp\n");
492 if ( meshCount !=1 ) {
493 fprintf(stderr,
"\n ## Error: %s: MMG3D_Free_structures:\n"
494 " you need to provide your mesh structure"
495 " to allow to free the associated memory.\n",__func__);
556 disp =
sol = ls = sols = NULL;
579 fprintf(stderr,
"\n ## Error: %s: MMG3D_Free_names:\n"
580 " unexpected argument type: %d\n",__func__,typArg);
581 fprintf(stderr,
" Argument type must be one of the following preprocessor"
583 " MMG5_ARG_ppMesh, MMG5_ARG_ppMet,"
584 " MMG5_ARG_ppLs, MMG5_ARG_ppDisp\n");
589 if ( meshCount !=1 ) {
590 fprintf(stderr,
"\n ## Error: %s: MMG3D_Free_names:\n"
591 " you need to provide your mesh structure"
592 " to allow to free the associated memory.\n",__func__);
603 if ( disp && *disp ) {
604 if ( (*disp)->namein ) {
608 if ( (*disp)->nameout ) {
615 if ( (*ls)->namein ) {
619 if ( (*ls)->nameout ) {
626 for ( i=0; i<(*mesh)->nsols; ++i ) {
void MMG5_mmgFree_names(MMG5_pMesh mesh, MMG5_pSol met)
void MMG5_Free_structures(MMG5_pMesh mesh, MMG5_pSol sol)
void MMG3D_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
Initialize file names to their default values.
int MMG3D_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of input solution file.
int MMG3D_Free_structures(const int starter,...)
Structure deallocations before return.
int MMG3D_Free_names(const int starter,...)
Structure deallocations before return.
int MMG3D_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
Set the name of the output solution file.
void MMG3D_Init_parameters(MMG5_pMesh mesh)
Initialize parameters to their default values.
MMG5_pMesh MMG5_pSol * sol
void MMG3D_Set_commonFunc(void)
API headers and documentation for the mmg3d library, for volumetric meshes in 3D.
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MMG5_SAFE_FREE(ptr)
#define MMG5_DEL_MEM(mesh, ptr)
static void MMG3D_Init_woalloc_mesh(MMG5_pMesh mesh, MMG5_pSol *met, MMG5_pSol *ls, MMG5_pSol *disp)
int MMG3D_Free_all_var(va_list argptr)
int MMG3D_Free_structures_var(va_list argptr)
static int MMG3D_Alloc_mesh(MMG5_pMesh *mesh, MMG5_pSol *met, MMG5_pSol *ls, MMG5_pSol *disp)
int MMG3D_Free_names_var(va_list argptr)
void MMG3D_Free_arrays(MMG5_pMesh *mesh, MMG5_pSol *sol, MMG5_pSol *ls, MMG5_pSol *disp, MMG5_pSol *field)
int MMG3D_Init_mesh_var(va_list argptr)