43 vtkDataSet **dataset, int8_t ptMeditRef,
44 int8_t eltMeditRef,
int nsols,
45 int8_t metricData, int8_t lsData) {
56 fprintf(stderr,
" ** MISSING DATA.\n");
57 fprintf(stderr,
" Check that your mesh contains tetrahedra.\n");
58 fprintf(stderr,
" Exit program.\n");
65 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
78 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
83 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
90 &nsols,&metricData,&lsData);
94 if ( nsols > (metricData+lsData) ) {
95 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
104 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
121 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
126 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
133 &nsols,&metricData,&lsData);
134 if (
ier < 1 )
return ier;
140 printf(
" Exit program.\n");
157 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
162 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
169 &nsols,&metricData,&lsData);
170 if (
ier < 1 )
return ier;
173 if ( nsols > (metricData+lsData) ) {
174 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
183 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
200 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
205 int8_t ptMeditRef,eltMeditRef,metricData, lsData;
212 &nsols,&metricData,&lsData);
213 if (
ier < 1 )
return ier;
219 printf(
" Exit program.\n");
236 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
252 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
261 vtkXMLPUnstructuredGridWriter>(
mesh,allSol,
filename,0,1);
270 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
287 fprintf(stderr,
" ** VTK library not founded. 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 MMG3D_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 MMG3D_saveVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTU format.
int MMG3D_loadVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions from a file in VTK format.
int MMG3D_loadVtkMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly a solution from a file in VTK format.
static int MMG3D_loadVtkMesh_part2(MMG5_pMesh mesh, MMG5_pSol *sol, vtkDataSet **dataset, int8_t ptMeditRef, int8_t eltMeditRef, int nsols, int8_t metricData, int8_t lsData)
Input / Output Functions that needs cpp features.
int MMG3D_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one solution in VTK format.
int MMG3D_loadVtuMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly a solution in VTU (VTK) format from file.
int MMG3D_saveVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTK format.
int MMG3D_saveVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTU format.
API headers and documentation for the mmg3d library, for volumetric meshes in 3D.
int MMG3D_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_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)