MED fichier: f/2.3.6/test29.f

MED fichier

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

f/2.3.6/test29.f
1 C* This file is part of MED.
2 C*
3 C* COPYRIGHT (C) 1999 - 2019 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 : test29.f
21 C *
22 C * - Description : ecriture d'un joint dans un maillage MED
23 C *
24 C ******************************************************************************
25 program test29
26 C
27 implicit none
28 include 'med.hf'
29 C
30 C
31 integer*8 fid
32 integer cret, domdst
33 character*32 maa , jnt, maadst
34 character*200 des
35 integer mdim ,ncor
36 integer cor(6)
37
38 parameter(maa ="maa1",maadst="maa1", domdst=2,
39 & mdim = 3,ncor = 3 )
40 data cor /1,2,3,4,5,6/, jnt / "joint"/
41 data des / "joint avec le sous-domaine 2" /
42
43
44
45 C ** Creation du fichier test29.med **
46 call efouvr(fid,'test29.med',med_lecture_ecriture, cret)
47 print *,cret
48 if (cret .ne. 0 ) then
49 print *,'Erreur creation du fichier'
50 call efexit(-1)
51 endif
52
53
54 C ** Creation du maillage **
55 call efmaac(fid,maa,mdim,med_non_structure,
56 & 'Un maillage pour test29',cret)
57 print *,cret
58 if (cret .ne. 0 ) then
59 print *,'Erreur creation du maillage'
60 call efexit(-1)
61 endif
62
63 C ** Creation du joint **
64 call efjntc(fid,maa,jnt,des,domdst,maadst,cret)
65 print *,cret
66 if (cret .ne. 0 ) then
67 print *,'Erreur creation joint'
68 call efexit(-1)
69 endif
70
71
72 C ** Ecriture de la correspondance Noeud, Noeud **
73 call efjnte(fid,maa,jnt,cor,ncor,
74 & med_noeud,0,med_noeud,0,
75 & cret)
76 print *,cret
77 if (cret .ne. 0 ) then
78 print *,'Erreur ecriture correspondance (Noeud,Noeud)'
79 call efexit(-1)
80 endif
81
82
83 C ** Ecriture de la correspondance Noeud, TRIA3 **
84 call efjnte(fid,maa,jnt,cor,ncor,
85 & med_noeud,0,med_maille,med_tria3,
86 & cret)
87 print *,cret
88 if (cret .ne. 0 ) then
89 print *,'Erreur ecriture correspondance (Noeud,Tria3)'
90 call efexit(-1)
91 endif
92
93 C ** Fermeture du fichier **
94 call efferm (fid,cret)
95 print *,cret
96 if (cret .ne. 0 ) then
97 print *,'Erreur fermeture du fichier'
98 call efexit(-1)
99 endif
100 C
101 end