MED fichier

Unittest_MEDinterp_1.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 medinterp1
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 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. /
51 C
52 C
53 C 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
60 C
61 C
62 C 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
70 C
71 C
72 C 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
79 c
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
86 c
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
93 C
94 C
95 C 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
102 C
103 C
104 C
105 end
106
medinterp1
program medinterp1
Definition: Unittest_MEDinterp_1.f:22
mficlo
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
Definition: medfile.f:82
mfiope
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
Definition: medfile.f:42
mipcre
subroutine mipcre(fid, name, gtype, cnode, nvar, maxd, nmaxc, cret)
Cette routine permet de créer une nouvelle fonction d'interpolation polynômiale nommée interpname.
Definition: medinterp.f:19
mipbfw
subroutine mipbfw(fid, name, it, nc, pw, co, cret)
Cette routine permet l'écriture d'une fonction de base/forme de l'interpolation interpname.
Definition: medinterp.f:38