MED fichier
f/2.3.6/test33.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 : test33.f
21 C *
22 C * - Description : lecture d'une numerotation globale inexistante dans un maillage MED
23 C *
24 C ******************************************************************************
25  program test33
26 
27 C
28  implicit none
29  include 'med.hf'
30 C
31 C
32  integer*8 fid
33  integer cret
34  character*32 maa
35  character*200 desc
36  integer nmaa,mdim,type,narr
37  integer numglb(100)
38 
39 
40 
41 
42 C ** Ouverture du fichier test31.med **
43  call efouvr(fid,'test31.med',med_lecture, cret)
44  print '(I1)',cret
45  if (cret .ne. 0 ) then
46  print *,'Erreur ouverture du fichier test31.med'
47  call efexit(-1)
48  endif
49 
50 
51 C ** lecture du nombre de maillage **
52 
53  call efnmaa(fid,nmaa,cret)
54  print '(I1)',cret
55  if (cret .ne. 0 ) then
56  print *,'Erreur lecture du nombre de maillage'
57  call efexit(-1)
58  endif
59  print '(A,I2)','Nombre de maillages = ',nmaa
60 
61 C ** lecture des infos pour le premier maillage
62 
63 
64  call efmaai(fid,1,maa,mdim,type,desc,cret)
65  print '(I1)',cret
66  if (cret .ne. 0 ) then
67  print *,'Erreur acces au premier maillage'
68  call efexit(-1)
69  endif
70 
71  call efnema(fid,maa,med_conn,med_arete,med_seg2,med_desc
72  1 ,narr,cret)
73  if (cret .ne. 0 ) then
74  print *,'Erreur acces au nombre d''arretes',
75  & ' du premier maillage'
76  call efexit(-1)
77  endif
78 
79 
80  print '(A,I1,A,A4,A,I1,A,I4)','maillage '
81  & ,0,' de nom ',maa,' et de dimension ',mdim,
82  & ' comportant le nombre d''arretes ',narr
83 
84 
85 C ** lecture de la numerotation globale liée aux arretes
86 
87  call efgnml(fid,maa,numglb,max(narr,100),
88  & med_arete,med_tria3,cret)
89 
90  if (cret .ge. 0 ) then
91  print '(A)','Erreur lecture numerotation globale ARRETE'
92  print '(A)','cette numerotation devait etre inexistante '
93  call efexit(-1)
94  endif
95 
96 
97 C ** Fermeture du fichier **
98  call efferm (fid,cret)
99  print '(I1)',cret
100  if (cret .ne. 0 ) then
101  print *,'Erreur fermeture du fichier'
102  call efexit(-1)
103  endif
104 C
105  end