MED fichier: Fichier source de Unittest_MEDinterp_3.f

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 - 2021 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*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)
47 C
48 C
49 C 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
56 C
57 C
58 C 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
69 C
70 C
71 C 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
80 c
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
92 c
93 enddo
94
95 C
96 C
97 C 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
104 C
105 C
106 C
107 end
108
mficlo
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
Definition: medfile.f:82
medinterp2
program medinterp2
Definition: Unittest_MEDinterp_2.f:22
mfiope
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
Definition: medfile.f:42
mipnip
subroutine mipnip(fid, n, cret)
Definition: medinterp.f:79
mipipi
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