MED fichier
Unittest_MEDinterp_1.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 medinterp1
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 character *64 name1
34 parameter(name1="Interpolation family name")
35 integer gtype1
36 parameter(gtype1=med_tria3)
37 integer cnode1
38 parameter(cnode1=med_false)
39 integer nvar1,maxd1,nmaxc1
40 parameter(nvar1=2,maxd1=1,nmaxc1=3)
41 integer ncoef1,ncoef2,ncoef3
42 parameter(ncoef1=3,ncoef2=1,ncoef3=1)
43 integer power1(6),power2(2),power3(2)
44 data power1 / 0,0, 1,0, 0,1 /
45 data power2 / 1,0 /
46 data power3 / 0,1 /
47 real*8 coef1(3), coef2(1), coef3(1)
48 data coef1 / 1., -1., -1. /
49 data coef2 / 1. /
50 data coef3 / 1. /
51C
52C
53C file creation
54 call mfiope(fid,fname,med_acc_creat,cret)
55 print *,'Open file',cret
56 if (cret .ne. 0 ) then
57 print *,'ERROR : file creation'
58 call efexit(-1)
59 endif
60C
61C
62C interpolation function family creation
63 call mipcre(fid,name1,gtype1,cnode1,nvar1,
64 & maxd1,nmaxc1,cret)
65 print *,'interpolation creation',cret
66 if (cret .ne. 0 ) then
67 print *,'ERROR : interpolation creation'
68 call efexit(-1)
69 endif
70C
71C
72C functions creation
73 call mipbfw(fid,name1,1,ncoef1,power1,coef1,cret)
74 print *,'function creation',cret
75 if (cret .ne. 0 ) then
76 print *,'ERROR : function creation'
77 call efexit(-1)
78 endif
79c
80 call mipbfw(fid,name1,2,ncoef2,power2,coef2,cret)
81 print *,'function creation',cret
82 if (cret .ne. 0 ) then
83 print *,'ERROR : function creation'
84 call efexit(-1)
85 endif
86c
87 call mipbfw(fid,name1,3,ncoef3,power3,coef3,cret)
88 print *,'function creation',cret
89 if (cret .ne. 0 ) then
90 print *,'ERROR : function creation'
91 call efexit(-1)
92 endif
93C
94C
95C close file
96 call mficlo(fid,cret)
97 print *,'Close file',cret
98 if (cret .ne. 0 ) then
99 print *,'ERROR : close file'
100 call efexit(-1)
101 endif
102C
103C
104C
105 end
106
program medinterp1
subroutine mfiope(fid, name, access, cret)
Definition medfile.f:42
subroutine mficlo(fid, cret)
Definition medfile.f:82
subroutine mipbfw(fid, name, it, nc, pw, co, cret)
Definition medinterp.f:38
subroutine mipcre(fid, name, gtype, cnode, nvar, maxd, nmaxc, cret)
Definition medinterp.f:19