2.3.6/test3.f

Aller à la documentation de ce fichier.
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 C ******************************************************************************
00019 C * - Nom du fichier : test3.f
00020 C *
00021 C * - Description : lecture des informations sur les maillages dans un fichier
00022 C*                  MED.
00023 C *
00024 C ******************************************************************************
00025       program test3
00026 C     
00027       implicit none
00028       include 'med.hf'
00029 C
00030 C
00031       integer       cret,fid,cres,type,cnu
00032       character*32  maa
00033       character*80  nomu
00034       character*200 desc
00035       integer       nmaa,i,mdim,edim
00036       
00037 C ** Ouverture du fichier en lecture seule
00038       call efouvr(fid,'test2.med',MED_LECTURE, cret)
00039       print *,cret
00040       if (cret .ne. 0 ) then
00041          print *,'Erreur ouverture du fichier en lecture'
00042          call efexit(-1)
00043       endif      
00044 
00045 C ** lecture du nombre de maillage                      **
00046       call efnmaa(fid,nmaa,cret)
00047       print *,cret
00048       if (cret .ne. 0 ) then
00049          print *,'Erreur lecture du nombre de maillage'
00050          call efexit(-1)
00051       endif      
00052       print *,'Nombre de maillages = ',nmaa
00053 
00054 C ** lecture des infos sur les maillages : **
00055 C ** - nom, dimension, type,description
00056 C ** - options : nom universel, dimension de l'espace
00057       do i=1,nmaa  
00058          call efmaai(fid,i,maa,mdim,type,desc,cret)
00059          edim = -1
00060          call efespl(fid,maa,edim,cres)
00061          call efunvl(fid,maa,nomu,cnu)
00062          print *,cret
00063          if (cret .ne. 0 ) then
00064             print *,'Erreur acces au maillage'
00065             call efexit(-1)
00066          endif      
00067          print '(A,I1,A,A4,A,I1,A,A65,A65)','maillage '
00068      &        ,i,' de nom ',maa,' et de dimension ',mdim,
00069      &        ' de description ',desc
00070          if (type.eq.MED_NON_STRUCTURE) then
00071             print *,'Maillage non structure'
00072          else
00073             print *,'Maillage structure'
00074          endif
00075          if (cres.eq.0) then
00076             print *,'Dimension espace ', edim
00077          else
00078             print *,'Dimension espace ', mdim
00079          endif
00080          if (cnu.eq.0) then
00081             print *,'Nom universel : ',nomu
00082          else
00083             print *,'Pas de nom universel'
00084          endif
00085       enddo         
00086          
00087 C **  fermeture du fichier
00088       call efferm (fid,cret)
00089       print *,cret
00090       if (cret .ne. 0 ) then
00091          print *,'Erreur fermeture du fichier'
00092          call efexit(-1)
00093       endif      
00094 C
00095       end 
00096 

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