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;
65 med_int nconstatt, *nvaratt=NULL;
74 MESSAGE(
"ERROR : open file ...");
79 MESSAGE(
"ERROR : file mounting ...");
84 MESSAGE(
"ERROR : file mounting ...");
89 MESSAGE(
"ERROR : file mounting ...");
99 MESSAGE(
"ERROR : How many fields in the file ...");
106 for (i=0; i<nfield; i++) {
109 MESSAGE(
"ERROR : number of field component ...");
113 if ((componentname = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
114 MESSAGE(
"ERROR : memory allocation ...");
118 if ((componentunit = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
119 MESSAGE(
"ERROR : memory allocation ...");
123 if (
MEDfieldInfo(fid, i+1, fieldname, meshname, &localmesh, &fieldtype,
124 componentname, componentunit, dtunit, &nstep) < 0) {
125 MESSAGE(
"ERROR : Field info ...");
137 &geotransformation)) < 0) {
138 MESSAGE(
"ERROR : number of nodes ...");
144 for (it=0; it<nmodels; it++) {
146 supportmeshname, &entitype, &nnode, &ncell,
147 &geocelltype, &nconstatt, &anyprofile, nvaratt+it) < 0) {
148 MESSAGE(
"ERROR : struct element models information ...");
157 for (csit=0; csit<nstep; csit++) {
160 MESSAGE(
"ERROR : Computing step info ...");
167 for (it=0; it<nmodels; it++) {
168 geotype = *(geotypes+it);
174 profilename, localizationname)) < 0) {
175 MESSAGE(
"ERROR : read number of profile ");
182 for (pit=0; pit<nprofile; pit++) {
186 localizationname, &nintegrationpoint)) < 0) {
187 MESSAGE(
"ERROR : read number of values with a profile ...");
192 if ((values = (
med_float *) malloc(
sizeof(
med_float)*nvalues*ncomponent*nintegrationpoint)) == NULL) {
193 MESSAGE(
"ERROR : memory allocation ...");
199 (
unsigned char*) values) < 0) {
200 MESSAGE(
"ERROR : read fields values for cells ...");
222 MESSAGE(
"ERROR : file unmounting ...");
227 MESSAGE(
"ERROR : file unmounting ...");
233 MESSAGE(
"ERROR : file unmounting ...");
239 MESSAGE(
"ERROR : close file ...");
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 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,...
MEDC_EXPORT med_err MEDstructElementInfo(const med_idt fid, const int mit, char *const modelname, med_geometry_type *const mgeotype, med_int *const modeldim, char *const supportmeshname, med_entity_type *const sentitytype, med_int *const snnode, med_int *const sncell, med_geometry_type *const sgeotype, med_int *const nconstantattribute, med_bool *const anyprofile, med_int *const nvariableattribute)
Cette routine décrit les caractéristiques d'un modèle d'élément de structure par itération.
int main(int argc, char **argv)
MEDC_EXPORT med_idt MEDfileObjectsMount(const med_idt fid, const char *const filename, const med_class medclass)
Cette routine permet de monter dans le fichier courant un type de données (exemples les maillages,...
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_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_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,...
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
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 ...
#define MED_ALL_CONSTITUENT
MEDC_EXPORT med_err MEDfileObjectsUnmount(const med_idt fid, const med_idt mid, const med_class medclass)
Une fois le démontage effectué, les données précédemment montées ne sont plus accessibles.
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_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.