31 integer ret,USER_INTERLACE,USER_MODE
35 character*64 maa1,maa2,maa3
36 character*13 lien_maa2
37 character*16 nomcoo(3)
38 character*16 unicoo(3)
41 character*16 comp1(2), unit1(2)
42 character*16 dtunit1, nounit
47 real*8 refcoo1(12), gscoo1_1(12), wg1_1(6)
48 integer nval1_1, nent1_1
53 real*8 gscoo1_2(6), wg1_2(3)
54 integer nval1_2, nent1_2
58 integer ngauss1_3,nval1_3, nent1_3
64 character*16 comp2(3), unit2(3)
66 integer valr2(5*3), valr2p(3*3)
70 character*16 comp3(2), unit3(2)
71 integer ncomp3, nval3, nent3
72 integer valr3(5*4*2), valr3p(3*4*2)
75 character*64 nomprofil1
76 integer profil1(2) , profil2(3)
79 character*200 des0,des1,des2
81 integer oexist, dexist
86 parameter(sdim1=2, mdim1=2)
87 parameter(smname1 =
"supportMesh1")
92 parameter( a=0.446948490915965d0, b=0.091576213509771d0 )
93 parameter( p1=0.11169079483905d0, p2=0.0549758718227661d0 )
95 parameter( maa1 =
"maa1", maa2 =
"maa2", maa3 =
"maa3" )
96 parameter( lien_maa2=
"./testfoo.med" )
98 parameter( nomcha1 =
"champ reel" )
99 parameter( ncomp1 = 2 )
100 parameter( dtunit1 =
" ")
101 parameter( nounit =
" ")
103 parameter( gauss1_1 =
"Model n1" )
104 parameter( ngauss1_1 = 6 )
106 parameter( gauss1_2 =
"Model n2" )
107 parameter( ngauss1_2 = 3 )
109 parameter( ngauss1_3 = 6 )
110 parameter( nval1_3 = 6 )
112 parameter( nomcha2=
"champ entier")
113 parameter( ncomp2 = 3, nval2= 5 )
115 parameter( nomcha3=
"champ entier 3")
116 parameter( ncomp3 = 2, nval3= 5*4 )
118 parameter( nomprofil1 =
"PROFIL(champ(1))" )
121 data comp1 /
"comp1",
"comp2"/
122 data unit1 /
"unit1",
"unit2"/
126 data refcoo1 / -1.0,1.0, -1.0,-1.0, 1.0,-1.0, -1.0,0.0,
127 1 0.0,-1.0, 0.0,0.0 /
128 data valr1_1 / 0.0,1.0, 2.0,3.0, 10.0,11.0, 12.0,13.0,
129 1 20.0,21.0, 22.0,23.0/
132 data valr1_2 / 0.0,1.0, 2.0,3.0, 10.0,11.0,
133 1 12.0,13.0, 20.0,21.0, 22.0,23.0 /
134 data valr1_2p / 12.0,13.0, 20.0,21.0, 22.0,23.0 /
137 data valr1_3 / 0.0,1.0, 2.0,3.0, 10.0,11.0, 12.0,13.0,
138 1 20.0,21.0, 22.0,23.0 /
139 data valr1_3p / 2.0,3.0, 10.0,11.0 /
141 data comp2 /
"comp1",
"comp2",
"comp3"/
142 data unit2 /
"unit1",
"unit2",
"unit3"/
143 data valr2 / 0,1,2, 10,11,12, 20,21,22, 30,31,32, 40,41,42 /
144 data valr2p / 0,1,2, 20,21,22, 40,41,42 /
147 data comp3 /
"comp1",
"comp2"/
148 data unit3 /
"unit1",
"unit2"/
149 data valr3 / 0,1, 10,11, 20,21, 30,31,
150 1 40,41, 50,51, 60,61, 70,71,
151 1 80,81, 90,91, 100,101, 110,111,
152 1 120,121, 130,131, 140,141, 150,151,
153 1 160,161, 170,171, 180,181, 190,191 /
154 data valr3p / 0,1, 10,11, 20,21, 30,31,
155 1 80,81, 90,91, 100,101, 110,111,
156 1 160,161, 170,171, 180,181, 190,191 /
163 data nomcoo /
"x",
"y",
"z"/, unicoo /
"cm",
"cm",
"cm"/
188 gscoo1_2(1) = -2.0d0/3
189 gscoo1_2(2) = 1.0d0/3
190 gscoo1_2(3) = -2.0d0/3
191 gscoo1_2(4) = -2.0d0/3
192 gscoo1_2(5) = 1.0d0/3
193 gscoo1_2(6) = -2.0d0/3
199 des0 =
"un maillage pour test34"
200 des1 =
"++UN MAILLAGE POUR TEST34++"
204 call mfiope(fid,
'test34.med', med_acc_rdwr, ret)
206 if (ret .ne. 0 )
then
207 print *,
'Erreur à l''ouverture du fichier : ',
'test34.med'
213 call mfioex(fid, med_mesh, maa1, oexist, ret)
215 if (ret .ne. 0 )
then
216 print *,
'Erreur inattendue de test d''existence du maillage'
218 print *,
"Maillage maa1 existe : ",oexist
219 if (oexist .eq. med_true)
then
220 call mfiodx(fid, med_mesh, maa1, dexist, ret)
221 if (ret .ne. 0 )
then
222 print *,
'Erreur inattendue de test d''existence d''une',
223 &
' description maillage'
225 if (dexist .eq. med_false)
then
226 print *,
'Erreur d''absence anormale de la description',
227 &
' du maillage : ',maa1
233 & med_unstructured_mesh,des0,
234 &
"",med_sort_dtit,med_cartesian,nomcoo,unicoo,ret)
236 if (ret .ne. 0 )
then
237 print *,
'Erreur à la création du maillage : ', maa1
241 call mfiodx(fid, med_mesh, maa1, dexist, ret)
242 if (ret .ne. 0 )
then
243 print *,
'Erreur inattendue de test d''existence d''une',
244 &
' description maillage'
246 if (dexist .ne. med_true)
then
247 print *,
'Erreur d''absence anormale de la description',
248 &
' du maillage : ',maa1
250 call mfiodr(fid, med_mesh, maa1, des2, ret)
251 print *,
'description2 : ',des2
254 call mfiodw(fid, med_mesh, maa1, des1, ret)
255 if (ret .ne. 0 )
then
256 print *,
'Erreur inattendue d''écriture de la',
257 &
' description du maillage'
265 if (ret .ne. 0 )
then
266 print *,
'Erreur à la création du champ : ', nomcha1
268 des1=
"un champ pour test34"
269 call mfiodw(fid, med_field, nomcha1, des1, ret)
270 if (ret .ne. 0 )
then
271 print *,
'Erreur inattendue d''écriture de la',
272 &
' description de champ',nomcha1
276 call msmcre(fid,smname1,sdim1,mdim1,
277 &
'un maillage support pour test34',
278 & med_cartesian, nomcoo, unicoo, ret)
279 print *,
'Support mesh creation : 2D space dimension',ret
280 if (ret .ne. 0 )
then
281 print *,
'ERROR : support mesh creation'
284 call mfiodx(fid, med_mesh_support, smname1, dexist, ret)
285 if (ret .ne. 0 )
then
286 print *,
'Erreur inattendue de test d''existence d''une',
287 &
' description de maillage support'
289 if (dexist .ne. med_true)
then
290 print *,
'Erreur d''absence anormale de la description',
291 &
' du maillage support: ',smname1
293 call mfiodr(fid, med_mesh_support, smname1, des2, ret)
294 print *,
'description2 : ',des2
297 call mfiodw(fid, med_mesh_support, smname1,
298 &
'++un maillage support pour test34++', ret)
299 if (ret .ne. 0 )
then
300 print *,
'Erreur inattendue d''écriture de la',
301 &
' description du maillage support'
305 call msecre(fid,med_particle_name, 3, med_no_meshname,med_none
306 & ,med_none, mtype1, ret)
307 if (ret .ne. 0 )
then
308 print *,
'Erreur inattendue d''écriture de l''',
309 &
' élément de structure'
311 call mfiodw(fid, med_elstruct, med_particle_name,
312 &
'++un élément de structure pour test34++', ret)
313 if (ret .ne. 0 )
then
314 print *,
'Erreur inattendue d''écriture de la',
315 &
' description de l''élément de structure'
320 call mlclow(fid,gauss1_1,med_tria6,2,refcoo1,med_full_interlace,
321 & ngauss1_1,gscoo1_1, wg1_1,med_no_interpolation,
322 & med_no_mesh_support, ret)
324 if (ret .ne. 0 )
then
325 print *,
'Erreur à la création du modèle n°1 : ', gauss1_1
328 des1=
"une localisation de points d'intégration pour test34"
329 call mfiodw(fid, med_localization, gauss1_1,
331 if (ret .ne. 0 )
then
332 print *,
'Erreur inattendue d''écriture de la',
333 &
' description de la localisation : ',gauss1_1
339 call mpfprw(fid,nomprofil1,1,profil1,ret)
341 if (ret .ne. 0 )
then
342 print *,
'Erreur à la création du profil : ', nomprofil1
345 des1=
'un profil de champ pour test34'
346 call mfiodw(fid, med_profile, nomprofil1,
348 if (ret .ne. 0 )
then
349 print *,
'Erreur inattendue d''écriture de la',
350 &
' description de profil : ',nomprofil1
356 if (ret .ne. 0 )
then
357 print *,
'Erreur à la fermeture du fichier : '
361 print *,
"Le code retour : ",ret