MED fichier
Unittest_MEDinterp_3.f
Aller à la documentation de ce fichier.
1 C* This file is part of MED.
2 C*
3 C* COPYRIGHT (C) 1999 - 2017 EDF R&D, CEA/DEN
4 C* MED is free software: you can redistribute it and/or modify
5 C* it under the terms of the GNU Lesser General Public License as published by
6 C* the Free Software Foundation, either version 3 of the License, or
7 C* (at your option) any later version.
8 C*
9 C* MED is distributed in the hope that it will be useful,
10 C* but WITHOUT ANY WARRANTY; without even the implied warranty of
11 C* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 C* GNU Lesser General Public License for more details.
13 C*
14 C* You should have received a copy of the GNU Lesser General Public License
15 C* along with MED. If not, see <http://www.gnu.org/licenses/>.
16 C*
17 
18 C******************************************************************************
19 C * Tests for interp module
20 C *
21 C *****************************************************************************
22  program medinterp2
23 C
24  implicit none
25  include 'med.hf'
26 C
27 C
28  integer cret
29  integer fid
30  character*64 fname
31  parameter(fname = "Unittest_MEDinterp_1.med")
32  integer n,ni
33  parameter(ni=1)
34  integer it
35  character *64 name1,name
36  parameter(name1="Interpolation family name")
37  integer gtype1,gtype
38  parameter(gtype1=med_tria3)
39  integer cnode1,cnode
40  parameter(cnode1=med_false)
41  integer nvar1,maxd1,nmaxc1
42  integer nvar,maxd,nmaxc
43  parameter(nvar1=2,maxd1=1,nmaxc1=3)
44  integer nbf,nbf1
45  parameter(nbf1=3)
46 C
47 C
48 C file creation
49  call mfiope(fid,fname,med_acc_rdonly,cret)
50  print *,'Open file',cret
51  if (cret .ne. 0 ) then
52  print *,'ERROR : file creation'
53  call efexit(-1)
54  endif
55 C
56 C
57 C number of interpolation
58  call mipnip(fid,n,cret)
59  print *,'Number of interpolation',cret
60  if (cret .ne. 0 ) then
61  print *,'ERROR : number of interpolation'
62  call efexit(-1)
63  endif
64  if (n .ne. ni) then
65  print *,'ERROR : number of interpolation'
66  call efexit(-1)
67  endif
68 C
69 C
70 C read information
71  do it=1,n
72  call mipipi(fid,it,name,gtype,cnode,
73  & nbf,nvar,maxd,nmaxc,cret)
74  print *,'interpolation information',cret
75  if (cret .ne. 0 ) then
76  print *,'ERROR : interpolation information'
77  call efexit(-1)
78  endif
79 c
80  if (it .eq. 1) then
81  if ( (gtype .ne. gtype1) .or.
82  & (cnode .ne. cnode1) .or.
83  & (nbf .ne. nbf1) .or.
84  & (nvar .ne. nvar1) .or.
85  & (maxd .ne. maxd1) .or.
86  & (nmaxc .ne. nmaxc1) ) then
87  print *,'ERROR : interpolation information'
88  call efexit(-1)
89  endif
90  endif
91 c
92  enddo
93 
94 C
95 C
96 C close file
97  call mficlo(fid,cret)
98  print *,'Close file',cret
99  if (cret .ne. 0 ) then
100  print *,'ERROR : close file'
101  call efexit(-1)
102  endif
103 C
104 C
105 C
106  end
107 
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
Definition: medfile.f:80
program medinterp2
subroutine mipnip(fid, n, cret)
Cette routine renvoie le nombre d'interpolations disponibles dans le fichier.
Definition: medinterp.f:76
subroutine mipipi(fid, it, name, gtype, cnode, nbf, nvar, maxd, nmaxc, cret)
Cette fonction informe des caractéristiques de la fonction d'interpolation n° interpit.
Definition: medinterp.f:118
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
Definition: medfile.f:41