Aller à la documentation de ce fichier.
34 int main (
int argc,
char **argv) {
41 char *componentname = NULL;
42 char *componentunit = NULL;
47 med_int csit, numit, numdt, meshnumit, meshnumdt, it;
57 MESSAGE(
"ERROR : open file ...");
66 MESSAGE(
"ERROR : How many fields in the file ...");
73 for (i=0; i<nfield; i++) {
76 MESSAGE(
"ERROR : number of field component ...");
80 if ((componentname = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
81 MESSAGE(
"ERROR : memory allocation ...");
85 if ((componentunit = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
86 MESSAGE(
"ERROR : memory allocation ...");
90 if (
MEDfieldInfo(fid, i+1, fieldname, meshname, &localmesh, &fieldtype,
91 componentname, componentunit, dtunit, &nstep) < 0) {
92 MESSAGE(
"ERROR : Field info ...");
103 for (csit=0; csit<nstep; csit++) {
106 &meshnumdt, &meshnumit) < 0) {
107 MESSAGE(
"ERROR : Computing step info ...");
116 geotype = geotypes[it];
118 MESSAGE(
"ERROR : read number of values ...");
123 MESSAGE(
"ERROR : memory allocation ...");
128 MESSAGE(
"ERROR : read fields values for cells ...");
144 MESSAGE(
"ERROR : close file ...");
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.
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]
int main(int argc, char **argv)
MEDC_EXPORT med_err MEDfieldComputingStepMeshInfo(const med_idt fid, const char *const fieldname, const int csit, med_int *const numdt, med_int *const numit, med_float *const dt, med_int *const meshnumdt, med_int *const meshnumit)
Cette fonction permet de lire les informations caractérisant une étape de calcul : numéro de pas de t...
#define MED_N_CELL_FIXED_GEO
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 MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
#define MED_ALL_CONSTITUENT
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 MEDfieldnComponent(const med_idt fid, const int ind)
Cette fonction lit le nombre de composantes d'un champ.