42 vtkDataSet **dataset, int8_t ptMeditRef,
43 int8_t eltMeditRef,
int nsols,
44 int8_t metricData, int8_t lsData) {
52 fprintf(stderr,
"\n ## Error: %s: Input mesh must be a two-dimensional mesh.\n",
58 fprintf(stderr,
" ** MISSING DATA.\n");
59 fprintf(stderr,
" Check that your mesh contains triangles.\n");
60 fprintf(stderr,
" Exit program.\n");
71 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
87 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
92 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
99 &nsols,&metricData,&lsData);
100 if (
ier < 1 )
return ier;
103 if ( nsols > (metricData+lsData) ) {
104 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
113 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
121 fprintf(stderr,
" ** UNEXPECTED METRIC TYPE\n");
133 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
138 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
145 &nsols,&metricData,&lsData);
146 if (
ier < 1 )
return ier;
152 printf(
" Exit program.\n");
168 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
173 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
180 &nsols,&metricData,&lsData);
181 if (
ier < 1 )
return ier;
184 if ( nsols > (metricData+lsData) ) {
185 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
194 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
202 fprintf(stderr,
" ** UNEXPECTED METRIC TYPE\n");
214 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
219 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
226 &nsols,&metricData,&lsData);
227 if (
ier < 1 )
return ier;
233 printf(
" Exit program.\n");
249 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
254 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
261 &nsols,&metricData,&lsData);
262 if (
ier < 1 )
return ier;
265 if ( nsols > (metricData+lsData) ) {
266 fprintf(stderr,
"Error: %d UNEXPECTED DATA FIELD(S)\n",nsols-metricData-lsData);
275 fprintf(stderr,
" ** ERROR WHEN PARSING THE INPUT FILE\n");
283 fprintf(stderr,
" ** UNEXPECTED METRIC TYPE\n");
296 fprintf(stderr,
" ** VTK library not founded. Unavailable file format.\n");
301 int8_t ptMeditRef,eltMeditRef,metricData,lsData;
308 &nsols,&metricData,&lsData);
309 if (
ier < 1 )
return ier;
313 fprintf(stderr,
"Error: SEVERAL SOLUTIONS FOUND (%d)\n",nsols);
321 printf(
" Exit program.\n");
338 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
355 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
364 vtkXMLPUnstructuredGridWriter>(
mesh,allSol,
filename,0,1);
373 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
390 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
408 fprintf(stderr,
" ** VTK library not found. Unavailable file format.\n");
426 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 MMG2D_2dMeshCheck(MMG5_pMesh mesh)
int MMG2D_loadVtpMesh(MMG5_pMesh mesh, MMG5_pSol met, MMG5_pSol sol, const char *filename)
Load a mesh and possibly a solution in VTP (VTK) format from file.
static int MMG2D_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 MMG2D_loadVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTK format from file.
int MMG2D_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 MMG2D_loadVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTP (VTK) format from file.
int MMG2D_saveVtpMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTP format.
int MMG2D_saveVtkMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTK format.
int MMG2D_saveVtkMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one solution in VTK format.
int MMG2D_saveVtuMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTU format.
int MMG2D_saveVtpMesh(MMG5_pMesh mesh, MMG5_pSol sol, const char *filename)
Save a mesh and optionally one data field in VTP format.
int MMG2D_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 MMG2D_saveVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Save a mesh and multiple data fields in VTU format.
int MMG2D_loadVtuMesh_and_allData(MMG5_pMesh mesh, MMG5_pSol *sol, const char *filename)
Load a mesh and multiple solutions in VTU (VTK) format from file.
API headers and documentation for the mmg2d library.
int MMG2D_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)