17 #define _a 0.446948490915965
18 #define _b 0.091576213509771
19 #define _p1 0.11169079483905
20 #define _p2 0.0549758718227661
35 #define MODE_ACCES MED_ACC_RDWR
37 #define MODE_ACCES MED_ACC_RDEXT
39 #define MODE_ACCES MED_ACC_CREAT
42 #ifndef USER_INTERLACE
43 #define USER_INTERLACE MED_FULL_INTERLACE
46 #define USER_MODE MED_COMPACT_STMODE
48 int main (
int argc,
char **argv)
61 char * lien_maa2 =
"./testfoo.med";
74 med_float refcoo1[12] = { -1.0,1.0, -1.0,-1.0, 1.0,-1.0, -1.0,0.0, 0.0,-1.0, 0.0,0.0 };
79 2*_b-1, 1-4*
_a, 2*_a-1, 2*_a-1, 1-4*
_a, 2*_a-1, 2*_a-1 };
84 med_float valr1_1[1*6*2] = {0.0,1.0, 2.0,3.0, 10.0,11.0, 12.0,13.0, 20.0,21.0, 22.0,23.0};
88 med_float gscoo1_2[6] = { -2.0/3,1.0/3, -2.0/3,-2.0/3, 1.0/3,-2.0/3 };
89 med_float wg1_2[3] = { 2.0/3, 2.0/3, 2.0/3 };
92 med_float valr1_2[2*3*2] = {0.0,1.0, 2.0,3.0, 10.0,11.0, 12.0,13.0, 20.0,21.0, 22.0,23.0};
93 med_float valr1_2p[2*3*2] = { 12.0,13.0, 20.0,21.0, 22.0,23.0};
97 med_float valr1_3[2*3*2] = {0.0,1.0, 2.0,3.0, 10.0,11.0, 12.0,13.0, 20.0,21.0, 22.0,23.0};
98 med_float valr1_3p[2*2*2] = { 2.0,3.0, 10.0,11.0 };
107 med_int valr2[5*3 ] = {0,1,2, 10,11,12, 20,21,22, 30,31,32, 40,41,42};
108 med_int valr2p[3*3 ] = {0,1,2, 20,21,22, 40,41,42};
115 med_int profil2[3] = { 1, 3, 5 };
127 med_int valr3[5*4*2] = {0,1, 10,11, 20,21, 30,31,
128 40,41, 50,51, 60,61, 70,71,
129 80,81, 90,91, 100,101, 110,111,
130 120,121, 130,131, 140,141, 150,151,
131 160,161, 170,171, 180,181, 190,191};
132 med_int valr3p[3*4*2] = {0,1, 10,11, 20,21, 30,31,
133 80,81, 90,91, 100,101, 110,111,
134 160,161, 170,171, 180,181, 190,191};
145 MESSAGE(
"Erreur à l'ouverture du fichier : ");
187 ngauss1_1, gscoo1_1, wg1_1,
189 MESSAGE(
"Erreur à la création du modèle n°1 : ");
SSCRUTE(gauss1_1);
195 ngauss1_2, gscoo1_2, wg1_2,
197 MESSAGE(
"Erreur à la création du modèle n°1 : ");
SSCRUTE(gauss1_2);
205 gauss1_1,
USER_INTERLACE, 2, _nent1_1, (
unsigned char*)valr1_1 ) < 0) {
206 MESSAGE(
"Erreur à l'écriture du champ : ");
217 gauss1_1,
USER_INTERLACE, 1, _nent1_1, (
unsigned char*)valr1_1 ) < 0) {
218 MESSAGE(
"Erreur à l'écriture du champ : ");
228 gauss1_2,
USER_INTERLACE, 1, _nent1_2, (
unsigned char*)valr1_2 ) < 0) {
229 MESSAGE(
"Erreur à l'écriture du champ : ");
241 gauss1_1,
USER_INTERLACE, 2, _nent1_1, (
unsigned char*)valr1_1 ) < 0) {
242 MESSAGE(
"Erreur à l'écriture du champ : ");
253 gauss1_2,
USER_INTERLACE, 1, _nent1_2, (
unsigned char*)valr1_2 ) < 0) {
254 MESSAGE(
"Erreur à l'écriture du champ : ");
263 MESSAGE(
"Erreur à l'écriture du profil : ");
270 MESSAGE(
"Erreur à l'écriture du profil : ");
282 MESSAGE(
"Erreur à l'écriture du champ : ");
294 MESSAGE(
"Erreur à l'écriture du champ : ");
303 MESSAGE(
"Erreur à l'écriture du champ : ");
316 MESSAGE(
"Erreur à l'écriture du champ : ");
325 MESSAGE(
"Erreur à l'écriture du champ : ");
334 MESSAGE(
"Erreur à l'écriture du champ : ");
343 MESSAGE(
"Erreur à l'écriture du profil : ");
351 MESSAGE(
"Erreur à l'écriture du champ : ");
367 MESSAGE(
"Erreur à l'écriture du champ : ");
375 MESSAGE(
"Erreur à l'écriture du champ : ");
383 MESSAGE(
"Erreur à l'écriture du champ : ");
MEDC_EXPORT med_err MEDfileClose(med_idt fid)
Fermeture d'un fichier MED.
#define MED_NO_MESH_SUPPORT
#define MED_NO_INTERPOLATION
#define MED_ALLENTITIES_PROFILE
#define MED_NO_LOCALIZATION
#define ISCRUTE_int(entier)
#define MED_ALL_CONSTITUENT
MEDC_EXPORT med_err MEDlinkWr(const med_idt fid, const char *const meshname, const char *const link)
Cette routine permet d'écrire un lien dans un fichier MED.
MEDC_EXPORT med_err MEDfieldValueWr(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_float dt, const med_entity_type entitype, const med_geometry_type geotype, const med_switch_mode switchmode, const med_int componentselect, const med_int nentity, const unsigned char *const value)
Cette fonction permet d'écrire les valeurs d'un champ définies sur des entités d'un maillage pour une...
MEDC_EXPORT med_err MEDfieldValueWithProfileWr(const med_idt fid, const char *const fieldname, const med_int numdt, const med_int numit, const med_float dt, const med_entity_type entitype, const med_geometry_type geotype, const med_storage_mode storagemode, const char *const profilename, const char *const localizationname, const med_switch_mode switchmode, const med_int componentselect, const med_int nentity, const unsigned char *const value)
Cette fonction permet d'écrire les valeurs d'un champ définies sur des entités d'un maillage pour une...
MEDC_EXPORT med_err MEDprofileWr(const med_idt fid, const char *const profilename, const med_int profilesize, const med_int *const profilearray)
Cette routine permet d'écrire un profil dans un fichier MED.
MEDC_EXPORT med_err MEDmeshCr(const med_idt fid, const char *const meshname, const med_int spacedim, const med_int meshdim, const med_mesh_type meshtype, const char *const description, const char *const dtunit, const med_sorting_type sortingtype, const med_axis_type axistype, const char *const axisname, const char *const axisunit)
Cette routine permet de créer un maillage dans un fichier.
MEDC_EXPORT med_err MEDlocalizationWr(const med_idt fid, const char *const localizationname, const med_geometry_type geotype, const med_int spacedimension, const med_float *const elementcoordinate, const med_switch_mode switchmode, const med_int nipoint, const med_float *const ipointcoordinate, const med_float *const weight, const char *const geointerpname, const char *const ipointstructmeshname)
Cette routine permet l'écriture d'une localisation localizationname de points d'intégration dans/auto...
MEDC_EXPORT med_idt MEDfileVersionOpen(const char *const filename, const med_access_mode accessmode, const med_int major, const med_int minor, const med_int release)
Ouverture d'un fichier MED en indiquant la version du modèle à utiliser en cas de création d'un nouve...
MEDC_EXPORT med_err MEDfieldCr(const med_idt fid, const char *const fieldname, const med_field_type fieldtype, const med_int ncomponent, const char *const componentname, const char *const componentunit, const char *const dtunit, const char *const meshname)
Cette fonction crée un champ dans un fichier.
int main(int argc, char **argv)