41 vtkDataSet **dataset, int8_t ptMeditRef,
42 int8_t eltMeditRef,MMG5_int nsols,
43 int8_t metricData, int8_t lsData ) {
53 fprintf(stderr,
" ** MISSING DATA.\n");
54 fprintf(stderr,
" Check that your mesh contains triangles.\n");
55 fprintf(stderr,
" Exit program.\n");
66 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
79 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
85 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
92 &nsols,&metricData,&lsData);
96 if ( nsols > (metricData+lsData) ) {
97 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
106 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
123 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
129 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
136 &nsols,&metricData,&lsData);
137 if (
ier < 1 )
return ier;
142 printf(
" Exit program.\n");
159 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
165 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
172 &nsols,&metricData,&lsData);
173 if (
ier < 1 )
return ier;
176 if ( nsols > (metricData+lsData) ) {
177 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
186 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
203 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
209 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
216 &nsols,&metricData,&lsData);
217 if (
ier < 1 )
return ier;
222 printf(
" Exit program.\n");
239 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
245 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
252 &nsols,&metricData,&lsData);
253 if (
ier < 1 )
return ier;
256 if ( nsols > (metricData+lsData) ) {
257 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
266 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
283 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
289 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
296 &nsols,&metricData,&lsData);
297 if (
ier < 1 )
return ier;
302 printf(
" Exit program.\n");
319 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
336 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
345 vtkXMLPUnstructuredGridWriter>(
mesh,allSol,
filename,0,1);
354 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
371 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
389 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
406 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
MMG5_pMesh MMG5_pSol * sol
MMG5_pMesh char * filename
int MMG5_chkMetricType(MMG5_pMesh mesh, int *type, int *entities, FILE *inm)
int MMGS_saveVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Write a mesh and multiple data fields in vtu Vtk file format (.vtu extension).
int MMGS_loadVtuMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly data in VTU (VTK) format from file.
int MMGS_saveVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTK format.
int MMGS_saveVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field vtu Vtk file format (.vtu extension).
int MMGS_loadVtpMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and optionally a solution in VTP (VTK) format from file.
int MMGS_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Write mesh and optionally one data field in Vtk file format (.vtk extension).
int MMGS_loadVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTP (VTK) format from file.
static int MMGS_loadVtkMesh_part2(MMG5_pMesh mesh, MMG5_pSol *sol, vtkDataSet **dataset, int8_t ptMeditRef, int8_t eltMeditRef, MMG5_int nsols, int8_t metricData, int8_t lsData)
Input / Output Functions that needs cpp features.
int MMGS_loadVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTU (VTK) format from file.
int MMGS_loadVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTK format from file.
int MMGS_loadVtkMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly data in VTK format from file.
int MMGS_saveVtpMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTP format.
int MMGS_saveVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTP format.
API headers and documentation for the mmgs library.
int MMGS_zaldy(MMG5_pMesh mesh)
#define MMG5_SAFE_CALLOC(ptr, size, type, law)
#define MMG5_ADD_MEM(mesh, size, message, law)
#define MMG5_DEL_MEM(mesh, ptr)
int MMG5_loadVtkMesh_part1(MMG5_pMesh mesh, const char *filename, vtkDataSet **dataset, int8_t *ptMeditRef, int8_t *eltMeditRef, int *nsols, int8_t *metricData, int8_t *lsData)
int MMG5_loadVtpMesh_part1(MMG5_pMesh mesh, const char *filename, vtkDataSet **dataset, int8_t *ptMeditRef, int8_t *eltMeditRef, int *nsols, int8_t *metricData, int8_t *lsData)
int MMG5_loadVtuMesh_part1(MMG5_pMesh mesh, const char *filename, vtkDataSet **dataset, int8_t *ptMeditRef, int8_t *eltMeditRef, int *nsols, int8_t *metricData, int8_t *lsData)
int MMG5_loadVtkMesh_part2(MMG5_pMesh mesh, MMG5_pSol *sol, vtkDataSet **dataset, int8_t ptMeditRef, int8_t eltMeditRef, int nsols, int8_t metricData, int8_t lsData)
int MMG5_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename, int metricData, int binary)