Unittest_MEDstructElement_11.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 * Tests for struct element module
00020 C *
00021 C *****************************************************************************
00022       program MEDstructElement11
00023 C     
00024       implicit none
00025       include 'med.hf'
00026 C
00027 C     
00028       integer cret
00029       integer fid
00030       character*64  fname
00031       parameter (fname = "Unittest_MEDstructElement_9.med")
00032       character*64  mname2
00033       parameter (mname2 = "model name 2")
00034       integer mtype2
00035       character*64 aname1, aname2, aname3
00036       parameter (aname1="integer attribute name")
00037       parameter (aname2="real attribute name")
00038       parameter (aname3="string attribute name")
00039       integer atype1,atype2,atype3
00040       parameter (atype1=MED_ATT_INT)
00041       parameter (atype2=MED_ATT_FLOAT64)
00042       parameter (atype3=MED_ATT_NAME)
00043       integer anc1,anc2,anc3
00044       parameter (anc1=2)
00045       parameter (anc2=1)
00046       parameter (anc3=2)
00047 c
00048       integer atype,anc
00049       character*64 aname
00050       integer it,natt
00051       parameter (natt=3)
00052 C 
00053 C
00054 C     open file
00055       call mfiope(fid,fname,MED_ACC_RDONLY,cret)
00056       print *,'Open file',cret
00057       if (cret .ne. 0 ) then
00058          print *,'ERROR : file creation'
00059          call efexit(-1)
00060       endif 
00061 C
00062 C
00063 C
00064       do it=1,natt
00065          call msevai(fid,mname2,it,aname,atype,anc,cret)
00066          print *,'Read informations about attribute : ',aname,cret
00067          if (cret .ne. 0) then
00068             print *,'ERROR : attribute information'
00069             call efexit(-1)
00070          endif
00071 c
00072          if (it .eq. 1) then
00073             if ( (atype .ne. atype1) .or.
00074      &           (anc .ne. anc1)
00075      &           ) then
00076                print *,'ERROR : attribute information'
00077                call efexit(-1)
00078             endif
00079          endif
00080 c
00081          if (it .eq. 2) then
00082             if ( (atype .ne. atype2) .or.
00083      &           (anc .ne. anc2)
00084      &           ) then
00085                print *,'ERROR : attribute information'
00086                call efexit(-1)
00087             endif
00088          endif
00089 c
00090          if (it .eq. 3) then
00091             if ( (atype .ne. atype3) .or.
00092      &           (anc .ne. anc3)
00093      &           ) then
00094                print *,'ERROR : attribute information'
00095                call efexit(-1)
00096             endif
00097          endif
00098 c
00099       enddo
00100 C
00101 C
00102 C     close file
00103       call mficlo(fid,cret)
00104       print *,'Close file',cret
00105       if (cret .ne. 0 ) then
00106          print *,'ERROR :  close file'
00107          call efexit(-1)
00108       endif  
00109 C
00110 C
00111 C
00112       end
00113 

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