#define MESGERR 1
#include <string.h>
int main (
int argc,
char **argv) {
int i, k, ind1, ind2;
int ret=-1;
if (fid < 0) {
MESSAGE(
"ERROR : open file in READ ONLY ACCESS mode ...");
goto ERROR;
}
if (
MEDmeshInfoByName(fid, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
dtunit, &sortingtype, &nstep, &axistype, axisname, unitname) < 0) {
goto ERROR;
}
{
MESSAGE(
"ERROR : number of nodes ...");
goto ERROR;
}
&coordinatechangement, &geotransformation)) < 0)
{
MESSAGE(
"ERROR : read number of polygon ...");
goto ERROR;
}
npoly = indexsize-1;
&coordinatechangement, &geotransformation)) < 0)
{
MESSAGE(
"ERROR : read connectivity size ...");
goto ERROR;
}
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
{
MESSAGE(
"ERROR : nodes coordinates ...");
free(coordinates);
goto ERROR;
}
free(coordinates);
{
MESSAGE(
"ERROR : read polygon connectivity ...");
free(index);
free(connectivity);
goto ERROR;
}
free(index);
free(connectivity);
ret=0;
ERROR:
ret=-1;
}
return ret;
}
MEDC_EXPORT med_err MEDmeshInfoByName(const med_idt fid, const char *const meshname, med_int *const spacedim, med_int *const meshdim, med_mesh_type *const meshtype, char *const description, char *const dtunit, med_sorting_type *const sortingtype, med_int *const nstep, med_axis_type *const axistype, char *const axisname, char *const axisunit)
Cette routine permet de lire les informations relatives à un maillage en précisant son nom.
MEDC_EXPORT med_int MEDmeshnEntity(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, const med_data_type datatype, const med_connectivity_mode cmode, med_bool *const changement, med_bool *const transformation)
Cette routine permet de lire le nombre d'entités dans un maillage pour une étape de calcul donnée.
MEDC_EXPORT med_err MEDmeshPolygonRd(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_connectivity_mode cmode, med_int *const polyindex, med_int *const connectivity)
Cette routine permet la lecture des connectivités de polygones.
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
MEDC_EXPORT med_idt MEDfileOpen(const char *const filename, const med_access_mode accessmode)
Ouverture d'un fichier MED.
MEDC_EXPORT med_err MEDmeshNodeCoordinateRd(const med_idt fid, const char *const meshname, const med_int numdt, const med_int numit, const med_switch_mode switchmode, med_float *const coordinates)
Cette routine permet de lire dans un maillage le tableau des coordonnées des noeuds,...
int main(int argc, char **argv)