119 if ( disp && *disp ) {
142 if ( disp && *disp ) {
184 disp =
sol = ls = NULL;
205 fprintf(stderr,
"\n ## Error: %s: MMG2D_Init_mesh:\n"
206 " unexpected argument type: %d\n",__func__,typArg);
207 fprintf(stderr,
" Argument type must be one of the following"
208 " preprocessor variable: MMG5_ARG_ppMesh, MMG5_ARG_ppMet,"
209 " MMG5_ARG_ppLs, MMG5_ARG_ppDisp\n");
214 if ( meshCount !=1 ) {
215 fprintf(stderr,
"\n ## Error: %s: MMG2D_Init_mesh:\n"
216 " you need to initialize the mesh structure that"
217 " will contain your mesh.\n",__func__);
265 int meshCount,metCount,lsCount,dispCount,fieldsCount;
268 meshCount = metCount = lsCount = dispCount = fieldsCount = 0;
269 disp =
sol = sols = ls = NULL;
296 fprintf(stderr,
"\n ## Error: %s: MMG2D_Free_all:\n"
297 " unexpected argument type: %d\n",__func__,typArg);
298 fprintf(stderr,
" Argument type must be one of the following"
299 " preprocessor variable: MMG5_ARG_ppMesh or MMG5_ARG_ppMet\n");
304 if ( meshCount !=1 ) {
305 fprintf(stderr,
"\n ## Error: %s: MMG2D_Free_all:\n"
306 " you need to provide your mesh structure"
307 " to allow to free the associated memory.\n",__func__);
311 if ( metCount > 1 || lsCount > 1 || dispCount > 1 || fieldsCount > 1 ) {
312 fprintf(stdout,
"\n ## Warning: %s: MMG2D_Free_all:\n"
313 " This function can free only one structure of each type.\n"
314 " Probable memory leak.\n",
378 disp =
sol = ls = sols = NULL;
401 fprintf(stderr,
"\n ## Error: %s: MMG2D_Free_structures:\n"
402 " unexpected argument type: %d\n",__func__,typArg);
403 fprintf(stderr,
" Argument type must be one of the following"
404 " preprocessor variable: MMG5_ARG_ppMesh or MMG5_ARG_ppMet\n");
409 if ( meshCount !=1 ) {
410 fprintf(stderr,
"\n ## Error: %s: MMG2D_Free_structures:\n"
411 " you need to provide your mesh structure"
412 " to allow to free the associated memory.\n",__func__);
438 if ( (*mesh)->quadra )
442 if ( disp && (*disp) && (*disp)->
m )
446 if ( ls && (*ls) && (*ls)->
m )
450 if (
sol && (*
sol) && (*sol)->m )
454 if ( sols && (*mesh)->nsols ) {
455 for ( i=0; i<(*mesh)->nsols; ++i ) {
492 disp =
sol = ls = sols = NULL;
515 fprintf(stderr,
"\n ## Error: %s: MMG2D_Free_names:\n"
516 " unexpected argument type: %d\n",__func__,typArg);
517 fprintf(stderr,
" Argument type must be one of the following"
518 " preprocessor variable: MMG5_ARG_ppMesh or MMG5_ARG_ppMet\n");
523 if ( meshCount !=1 ) {
524 fprintf(stderr,
"\n ## Error: %s: MMG2D_Free_names:\n"
525 " you need to provide your mesh structure"
526 " to allow to free the associated memory.\n",__func__);
539 if ( disp && *disp ) {
540 if ( (*disp)->namein ) {
544 if ( (*disp)->nameout ) {
551 if ( (*ls)->namein ) {
555 if ( (*ls)->nameout ) {
562 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 MMG2D_Init_parameters(MMG5_pMesh mesh)
Initialize the input parameters (stored in the Info structure).
void MMG2D_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
Initialize file names to their default values.
int MMG2D_Free_structures(const int starter,...)
Structure deallocations before return.
int MMG2D_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of the input solution file.
int MMG2D_Free_names(const int starter,...)
Structure deallocations before return.
int MMG2D_Set_outputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solout)
Set the name of the output solution file.
MMG5_pMesh MMG5_pSol * sol
void MMG2D_Set_commonFunc(void)
Set common function pointers between mmgs and mmg2d to the matching mmg2d functions.
API headers and documentation for the mmg2d library.
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MMG5_SAFE_FREE(ptr)
#define MMG5_DEL_MEM(mesh, ptr)
static int MMG2D_Alloc_mesh(MMG5_pMesh *mesh, MMG5_pSol *met, MMG5_pSol *ls, MMG5_pSol *disp)
int MMG2D_Free_all_var(va_list argptr)
int MMG2D_Free_structures_var(va_list argptr)
int MMG2D_Free_names_var(va_list argptr)
int MMG2D_Init_mesh_var(va_list argptr)
static void MMG2D_Init_woalloc_mesh(MMG5_pMesh *mesh, MMG5_pSol *met, MMG5_pSol *ls, MMG5_pSol *disp)