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