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