175 fprintf(stderr,
"\n ## Error: %s: MMGS_Init_mesh:\n"
176 " unexpected argument type: %d\n",__func__,typArg);
177 fprintf(stderr,
" Argument type must be one of the following"
178 " preprocessor variable: MMG5_ARG_ppMesh, MMG5_ARG_ppMet,"
179 " MMG5_ARG_ppLs.\n");
184 if ( meshCount !=1 ) {
185 fprintf(stderr,
"\n ## Error: %s: MMGS_Init_mesh:\n"
186 " you need to initialize the mesh structure that"
187 " will contain your mesh.\n",__func__);
231 int meshCount,metCount,lsCount,fieldsCount;
233 meshCount = metCount = lsCount = fieldsCount = 0;
234 sol = sols = ls = NULL;
257 fprintf(stderr,
"\n ## Error: %s: MMGS_Free_all:\n"
258 " unexpected argument type: %d\n",__func__,typArg);
259 fprintf(stderr,
" Argument type must be one of the following"
260 " preprocessor variable: MMG5_ARG_ppMesh, MMG5_ARG_ppMet or "
266 if ( meshCount !=1 ) {
267 fprintf(stderr,
"\n ## Error: %s: MMGS_Free_all:\n"
268 " you need to provide your mesh structure"
269 " to allow to free the associated memory.\n",__func__);
273 if ( metCount > 1 || lsCount > 1 || fieldsCount > 1 ) {
274 fprintf(stdout,
"\n ## Warning: %s: MMGS_Free_all:\n"
275 " This function can free only one structure of each type.\n"
276 " Probable memory leak.\n",
333 sol = ls = sols = NULL;
353 fprintf(stderr,
"\n ## Error: %s: MMGS_Free_structures:\n"
354 " unexpected argument type: %d\n",__func__,typArg);
355 fprintf(stderr,
" Argument type must be one of the following"
356 " preprocessor variable: MMG5_ARG_ppMesh, MMG5_ARG_ppMet or"
357 " MMG5_ARG_ppLs.\n");
362 if ( meshCount !=1 ) {
363 fprintf(stderr,
"\n ## Error: %s: MMGS_Free_structures:\n"
364 " you need to provide your mesh structure"
365 " to allow to free the associated memory.\n",__func__);
378 if ( ls && (*ls) && (*ls)->
m ) {
383 if (
sol && (*
sol) && (*sol)->m ) {
388 if ( sols && (*mesh)->nsols ) {
389 for ( i=0; i<(*mesh)->nsols; ++i ) {
435 sol = ls = sols = NULL;
455 fprintf(stderr,
"\n ## Error: %s: MMGS_Free_names:\n"
456 " unexpected argument type: %d\n",__func__,typArg);
457 fprintf(stderr,
" Argument type must be one of the following"
458 " preprocessor variable: MMG5_ARG_ppMesh, MMG5_ARG_ppMet "
459 " or MMG5_ARG_ppLs\n");
464 if ( meshCount !=1 ) {
465 fprintf(stderr,
"\n ## Error: %s: MMGS_Free_names:\n"
466 " you need to provide your mesh structure"
467 " to allow to free the associated memory.\n",__func__);
482 if ( (*ls)->namein ) {
486 if ( (*ls)->nameout ) {
492 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)
int MMGS_Free_structures(const int starter,...)
Structure deallocations before return.
void MMGS_Init_parameters(MMG5_pMesh mesh)
Initialize the input parameters.
int MMGS_Set_inputSolName(MMG5_pMesh mesh, MMG5_pSol sol, const char *solin)
Set the name of the input solution file.
void MMGS_Init_fileNames(MMG5_pMesh mesh, MMG5_pSol sol)
Initialize file names to their default values.
int MMGS_Free_names(const int starter,...)
Structure deallocations before return.
int MMGS_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 MMGS_Set_commonFunc(void)
Set common function pointers between mmgs and mmg3d to the matching mmgs functions.
API headers and documentation for the mmgs library.
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MMG5_SAFE_FREE(ptr)
#define MMG5_DEL_MEM(mesh, ptr)
static int MMGS_Alloc_mesh(MMG5_pMesh *mesh, MMG5_pSol *met, MMG5_pSol *ls)
int MMGS_Init_mesh_var(va_list argptr)
int MMGS_Free_all_var(va_list argptr)
static void MMGS_Init_woalloc_mesh(MMG5_pMesh mesh, MMG5_pSol *met, MMG5_pSol *ls)
int MMGS_Free_names_var(va_list argptr)
int MMGS_Free_structures_var(va_list argptr)