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