Aller à la documentation de ce fichier.
36 int main (
int argc,
char **argv) {
43 char *componentname = NULL;
44 char *componentunit = NULL;
53 med_int nprofile, pit, profilesize;
66 MESSAGE(
"ERROR : open file ...");
75 MESSAGE(
"ERROR : How many fields in the file ...");
82 for (i=0; i<nfield; i++) {
85 MESSAGE(
"ERROR : number of field component ...");
89 if ((componentname = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
90 MESSAGE(
"ERROR : memory allocation ...");
94 if ((componentunit = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
95 MESSAGE(
"ERROR : memory allocation ...");
99 if (
MEDfieldInfo(fid, i+1, fieldname, meshname, &localmesh, &fieldtype,
100 componentname, componentunit, dtunit, &nstep) < 0) {
101 MESSAGE(
"ERROR : Field info ...");
114 MESSAGE(
"ERROR : Read how many interpolation functions for the field ...");
121 for (it=0; it<ninterp; it++) {
123 MESSAGE(
"ERROR : read interpolation family name ...");
131 for (csit=0; csit<nstep; csit++) {
134 MESSAGE(
"ERROR : Computing step info ...");
143 geotype = geotypes[it];
149 profilename, localizationname)) < 0) {
150 MESSAGE(
"ERROR : read number of profile ");
157 for (pit=0; pit<nprofile; pit++) {
161 localizationname, &nintegrationpoint)) < 0) {
162 MESSAGE(
"ERROR : read number of values with a profile ...");
167 if ((values = (
med_float *) malloc(
sizeof(
med_float)*nvalues*ncomponent*nintegrationpoint)) == NULL) {
168 MESSAGE(
"ERROR : memory allocation ...");
174 (
unsigned char*) values) < 0) {
175 MESSAGE(
"ERROR : read fields values for cells ...");
191 MESSAGE(
"ERROR : close file ...");
int main(int argc, char **argv)
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_int MEDfieldnInterp(const med_idt fid, const char *const fieldname)
Cette routine renvoie le nombre de fonctions d'interpolation associées au champ résultat fieldname.
MEDC_EXPORT med_int MEDfieldnValueWithProfile(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 int profileit, const med_storage_mode storagemode, char *const profilename, med_int *const profilesize, char *const localizationname, med_int *const nintegrationpoint)
Cette fonction permet de lire le nombre de valeurs à lire dans un champ pour une étape de calcul,...
med_geometry_type MED_GET_CELL_GEOMETRY_TYPE[MED_N_CELL_FIXED_GEO+2]
MEDC_EXPORT med_err MEDfieldInterpInfo(const med_idt fid, const char *const fieldname, const int interpit, char *const interpname)
Cette routine indique le nom interpname de la interpit ème fonction d'interpolation associées au cham...
MEDC_EXPORT med_int MEDfieldnProfile(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_entity_type enttype, const med_geometry_type geotype, char *const defaultprofilename, char *const defaultlocalizationname)
Cette fonction permet de lire le nombre de profils référencés dans un champ pour une étape de calcul,...
#define MED_N_CELL_FIXED_GEO
MEDC_EXPORT med_err MEDfieldValueWithProfileRd(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_storage_mode storagemode, const char *const profilename, 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 ...
MEDC_EXPORT med_err MEDfieldComputingStepInfo(const med_idt fid, const char *const fieldname, const int csit, med_int *const numdt, med_int *const numit, med_float *const dt)
Cette fonction permet de lire les informations caractérisant une étape de calcul : numéro de pas de t...
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.