f/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*64 maa
00033         character*200 des
00034         integer nmaa, mdim ,nnoe,type,sdim
00035         character*16 nomcoo(2)   
00036         character*16 unicoo(2)
00037         character(16)  :: dtunit
00038         integer nstep, stype, atype,chgt,tsf
00039         integer numglb(100),i
00040 
00041 
00042 C  ** Ouverture du fichier test31.med **
00043         call mfiope(fid,'test31.med',MED_ACC_RDONLY, cret)
00044         print '(I1)',cret
00045         if (cret .ne. 0 ) then
00046            print *,'Erreur ouverture du fichier test31.med'
00047            call efexit(-1)
00048         endif      
00049 
00050 C ** lecture des infos pour le premier maillage
00051 
00052         call mmhmii(fid,1,maa,sdim,mdim,type,des,dtunit,
00053      &              stype,nstep,atype,nomcoo,unicoo,cret)
00054         print '(I1)',cret
00055         if (cret .ne. 0 ) then
00056            print *,'Erreur acces au premier maillage'
00057            call efexit(-1)
00058         endif      
00059 
00060         nnoe = 0
00061         call mmhnme(fid,maa,MED_NO_DT,MED_NO_IT,MED_NODE,MED_NONE,
00062      &              MED_COORDINATE,MED_NO_CMODE,chgt,tsf,nnoe,cret)  
00063         if (cret .ne. 0 ) then
00064            print *,'Erreur acces au nombre de noeud du premier maillage'
00065            call efexit(-1)
00066         endif      
00067 
00068 
00069          print '(A,I1,A,A4,A,I1,A,I4)','maillage '
00070      &        ,0,' de nom ',maa,' et de dimension ',mdim,
00071      &        ' comportant le nombre de noeud ',nnoe
00072 
00073 
00074 C ** lecture de la numerotation globale
00075          call  mmhgnr(fid,maa,MED_NO_DT,MED_NO_IT,MED_NODE,MED_NONE, 
00076      &                numglb,cret)
00077 
00078         if (cret .ne. 0 ) then
00079            print *,'Erreur lecture numerotation globale '
00080            call efexit(-1)
00081         endif      
00082 
00083 
00084 C ** Ecriture à l'ecran des numeros globaux
00085 
00086          do i=1,min(nnoe,100)
00087             print '(A,I3,A,I4)',
00088      &   'Numero global du noeud ',i,' : ',numglb(i)
00089          enddo
00090 
00091 
00092 C ** Fermeture du fichier                                **
00093         call mficlo(fid,cret)
00094         print '(I1)',cret
00095         if (cret .ne. 0 ) then
00096            print *,'Erreur fermeture du fichier'
00097            call efexit(-1)
00098         endif      
00099 C     
00100         end

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