MED fichier: f/2.3.6/test12.f

MED fichier

- Documentation MED
- Guides d'utilisation
- Guides de référence

f/2.3.6/test12.f
1 C* This file is part of MED.
2 C*
3 C* COPYRIGHT (C) 1999 - 2017 EDF R&D, CEA/DEN
4 C* MED is free software: you can redistribute it and/or modify
5 C* it under the terms of the GNU Lesser General Public License as published by
6 C* the Free Software Foundation, either version 3 of the License, or
7 C* (at your option) any later version.
8 C*
9 C* MED is distributed in the hope that it will be useful,
10 C* but WITHOUT ANY WARRANTY; without even the implied warranty of
11 C* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 C* GNU Lesser General Public License for more details.
13 C*
14 C* You should have received a copy of the GNU Lesser General Public License
15 C* along with MED. If not, see <http://www.gnu.org/licenses/>.
16 C*
17
18
19 C ******************************************************************************
20 C * - Nom du fichier : test12.f
21 C *
22 C * - Description : ecriture d'une equivalence dans un maillage MED
23 C *
24 C ******************************************************************************
25 program test12
26 C
27 implicit none
28 include 'med.hf'
29 C
30 C
31 integer cret,fid
32 character*32 maa , equ
33 character*200 des
34 integer mdim ,ncor
35 integer cor(6)
36
37 parameter(maa ="maa1",mdim = 3,ncor = 3 )
38 data cor /1,2,3,4,5,6/, equ / "equivalence"/
39 data des / "equivalence sur les mailles MED_TRIA3" /
40
41 C ** Creation du fichier test12.med **
42 call efouvr(fid,'test12.med',med_lecture_ecriture, cret)
43 print *,cret
44 if (cret .ne. 0 ) then
45 print *,'Erreur creation du fichier'
46 call efexit(-1)
47 endif
48
49
50 C ** Creation du maillage **
51 call efmaac(fid,maa,mdim,med_non_structure,
52 & 'Un maillage pour test12',cret)
53 print *,cret
54 if (cret .ne. 0 ) then
55 print *,'Erreur creation du maillage'
56 call efexit(-1)
57 endif
58
59 C ** Creation de l'equivalence **
60 call efequc(fid,maa,equ,des,cret)
61 print *,cret
62 if (cret .ne. 0 ) then
63 print *,'Erreur creation equivalence'
64 call efexit(-1)
65 endif
66
67 C ** Ecriture des correspondances sur les mailles MED_TRIA3 **
68 call efeque(fid,maa,equ,cor,ncor,
69 & med_maille,med_tria3,cret)
70 print *,cret
71 if (cret .ne. 0 ) then
72 print *,'Erreur ecriture de correspondances'
73 call efexit(-1)
74 endif
75
76 C ** Fermeture du fichier **
77 call efferm (fid,cret)
78 print *,cret
79 if (cret .ne. 0 ) then
80 print *,'Erreur fermeture du fichier'
81 call efexit(-1)
82 endif
83 C
84 end