f/2.3.6/test31.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 : test31.f
00021 C *
00022 C * - Description : ecriture d'une numerotation globale dans un maillage MED
00023 C *
00024 C ******************************************************************************
00025         program test31
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, ind
00035         integer numglb(100),i
00036 
00037 
00038 C  ** Ouverture du fichier test31.med **
00039         call efouvr(fid,'test31.med',MED_LECTURE_ECRITURE, cret)
00040         print *,cret
00041         if (cret .ne. 0 ) then
00042            print *,'Erreur ouverture du fichier test31.med'
00043            call efexit(-1)
00044         endif      
00045 
00046   
00047 C ** lecture du nombre de maillage                      **
00048         
00049         call efnmaa(fid,nmaa,cret)
00050         print *,cret
00051         if (cret .ne. 0 ) then
00052            print *,'Erreur lecture du nombre de maillage'
00053            call efexit(-1)
00054         endif      
00055         print *,'Nombre de maillages = ',nmaa
00056 
00057 C ** lecture des infos pour le premier maillage
00058         
00059         ind=1
00060         call efmaai(fid,ind,maa,mdim,type,des,cret)
00061         print *,cret
00062         if (cret .ne. 0 ) then
00063            print *,'Erreur acces au premier maillage'
00064            call efexit(-1)
00065         endif      
00066 
00067         nnoe = 0
00068         call efnema(fid,maa,MED_COOR,MED_NOEUD,0,0,nnoe,cret)   
00069         if (cret .ne. 0 ) then
00070            print *,'Erreur acces au nombre de noeud du premier maillage'
00071            call efexit(-1)
00072         endif      
00073 
00074 
00075          print '(A,I1,A,A4,A,I1,A,I4)','maillage '
00076      &        ,ind,' de nom ',maa,' et de dimension ',mdim,
00077      &        ' comportant le nombre de noeud ',nnoe
00078 
00079 C ** construction des numeros globaux
00080          
00081          if (nnoe.gt.100) nnoe=100
00082 
00083          do i=1,nnoe
00084             numglb(i)=i+100
00085          enddo
00086 
00087 C ** ecriture de la numerotation globale
00088 
00089          call efgnme(fid,maa,numglb,nnoe,MED_NOEUD,0,cret)
00090 
00091         if (cret .ne. 0 ) then
00092            print *,'Erreur ecriture numerotation globale '
00093            call efexit(-1)
00094         endif      
00095 C ** Fermeture du fichier                                **
00096         call efferm (fid,cret)
00097         print *,cret
00098         if (cret .ne. 0 ) then
00099            print *,'Erreur fermeture du fichier'
00100            call efexit(-1)
00101         endif      
00102 C     
00103         end

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