#define MESGERR 1
#include <string.h>
#define MESGERR 1
#include <string.h>
int main (
int argc,
char **argv) {
char *componentname = NULL;
char *componentunit = NULL;
int ret=-1;
if (fid < 0) {
goto ERROR;
}
MESSAGE(
"ERROR : How many fields in the file ...");
goto ERROR;
}
for (i=0; i<nfield; i++) {
MESSAGE(
"ERROR : number of field component ...");
goto ERROR;
}
if ((componentname = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
if ((componentunit = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
if (
MEDfieldInfo(fid, i+1, fieldname, meshname, &localmesh, &fieldtype,
componentname, componentunit, dtunit, &nstep) < 0) {
free(componentname); free(componentunit);
goto ERROR;
}
free(componentname); free(componentunit);
MESSAGE(
"ERROR : read number of values ...");
goto ERROR;
}
if (nvalues) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
MESSAGE(
"ERROR : read fields values defined on vertices ...");
free(values);
goto ERROR;
}
free(values);
}
geotype = geotypes[j];
geotype)) < 0) {
MESSAGE(
"ERROR : read number of values ...");
goto ERROR;
}
if (nvalues) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
MESSAGE(
"ERROR : read fields values for cells ...");
free(values);
goto ERROR;
}
free(values);
}
}
}
ret=0;
ERROR:
ret=-1;
}
return ret;
}
MEDC_EXPORT med_err MEDfieldInfo(const med_idt fid, const int ind, char *const fieldname, char *const meshname, med_bool *const localmesh, med_field_type *const fieldtype, char *const componentname, char *const componentunit, char *const dtunit, med_int *const ncstp)
Cette fonction permet de lire les informations concernant le champ d'indice ind .
MEDC_EXPORT med_int MEDfieldnValue(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype)
Cette fonction permet de lire le nombre de valeurs dans un champ pour une étape de calcul,...
MEDC_EXPORT med_err MEDfieldValueRd(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_entity_type entitype, const med_geometry_type geotype, const med_switch_mode switchmode, const med_int componentselect, unsigned char *const value)
Cette fonction permet de lire les valeurs d'un champ définies sur des entités d'un maillage pour une ...
med_geometry_type MED_GET_CELL_GEOMETRY_TYPE[MED_N_CELL_FIXED_GEO+2]
MEDC_EXPORT med_int MEDfieldnComponent(const med_idt fid, const int ind)
Cette fonction lit le nombre de composantes d'un champ.
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
#define MED_N_CELL_FIXED_GEO
#define MED_ALL_CONSTITUENT
MEDC_EXPORT med_idt MEDfileOpen(const char *const filename, const med_access_mode accessmode)
Ouverture d'un fichier MED.
MEDC_EXPORT med_int MEDnField(const med_idt fid)
Cette fonction permet de lire le nombre de champs dans un fichier.
int main(int argc, char **argv)