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