f/2.3.6/test32.f

00001 C*  This file is part of MED.
00002 C*
00003 C*  COPYRIGHT (C) 1999 - 2015  EDF R&D, CEA/DEN
00004 C*  MED is free software: you can redistribute it and/or modify
00005 C*  it under the terms of the GNU Lesser General Public License as published by
00006 C*  the Free Software Foundation, either version 3 of the License, or
00007 C*  (at your option) any later version.
00008 C*
00009 C*  MED is distributed in the hope that it will be useful,
00010 C*  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 C*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 C*  GNU Lesser General Public License for more details.
00013 C*
00014 C*  You should have received a copy of the GNU Lesser General Public License
00015 C*  along with MED.  If not, see <http://www.gnu.org/licenses/>.
00016 C*
00017 
00018 
00019 C ******************************************************************************
00020 C * - Nom du fichier : test32.f
00021 C *
00022 C * - Description : lecture nominale d'une numerotation globale dans un maillage MED
00023 C *
00024 C ******************************************************************************
00025         program test32
00026 C     
00027         implicit none
00028         include 'med.hf'
00029 C
00030 C
00031         integer cret,fid
00032         character*32 maa
00033         character*200 des
00034         integer nmaa, mdim ,  nnoe,type
00035         
00036         integer numglb(100),i
00037 
00038 
00039 C  ** Ouverture du fichier test31.med **
00040         call efouvr(fid,'test31.med',MED_LECTURE, cret)
00041         print '(I1)',cret
00042         if (cret .ne. 0 ) then
00043            print *,'Erreur ouverture du fichier test31.med'
00044            call efexit(-1)
00045         endif      
00046 
00047   
00048 C ** lecture du nombre de maillage                      **
00049         
00050         call efnmaa(fid,nmaa,cret)
00051         print '(I1)',cret
00052         if (cret .ne. 0 ) then
00053            print *,'Erreur lecture du nombre de maillage'
00054            call efexit(-1)
00055         endif      
00056         print '(A,I1)','Nombre de maillages = ',nmaa
00057 
00058 C ** lecture des infos pour le premier maillage
00059 
00060 
00061         call efmaai(fid,1,maa,mdim,type,des,cret)
00062         print '(I1)',cret
00063         if (cret .ne. 0 ) then
00064            print *,'Erreur acces au premier maillage'
00065            call efexit(-1)
00066         endif      
00067 
00068         nnoe = 0
00069         call efnema(fid,maa,MED_COOR,MED_NOEUD,0,0,nnoe,cret)   
00070         if (cret .ne. 0 ) then
00071            print *,'Erreur acces au nombre de noeud du premier maillage'
00072            call efexit(-1)
00073         endif      
00074 
00075 
00076          print '(A,I1,A,A4,A,I1,A,I4)','maillage '
00077      &        ,0,' de nom ',maa,' et de dimension ',mdim,
00078      &        ' comportant le nombre de noeud ',nnoe
00079 
00080 
00081 C ** lecture de la numerotation globale
00082 
00083          call efgnml(fid,maa,numglb,min(nnoe,100),MED_NOEUD,0,cret)
00084 
00085         if (cret .ne. 0 ) then
00086            print *,'Erreur lecture numerotation globale '
00087            call efexit(-1)
00088         endif      
00089 
00090 
00091 C ** Ecriture à l'ecran des numeros globaux
00092 
00093          do i=1,min(nnoe,100)
00094             print '(A,I3,A,I4)',
00095      &   'Numero global du noeud ',i,' : ',numglb(i)
00096          enddo
00097 
00098 
00099 C ** Fermeture du fichier                                **
00100         call efferm (fid,cret)
00101         print '(I1)',cret
00102         if (cret .ne. 0 ) then
00103            print *,'Erreur fermeture du fichier'
00104            call efexit(-1)
00105         endif      
00106 C     
00107         end

Généré le Thu Oct 8 14:26:16 2015 pour MED fichier par  doxygen 1.6.1