Debian Codegraph @

tests/unittests/f/Unittest_MEDfilter_2.f

raw
1 C* This file is part of MED.
2 C*
3 C* COPYRIGHT (C) 1999 - 2020 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 filter module
20 C *
21 C *****************************************************************************
22 program MEDfilter2
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_MEDfilter_2.med")
33 integer nflt
34 parameter (nflt=1)
35 integer flta(1)
36 integer*8 flt(1)
37 integer nent,nvale,scent
38 parameter (nent=10,nvale=1,scent=2)
39 C
40 C
41 C open file
42 call mfiope(fid,fname,MED_ACC_CREAT,cret)
43 print *,'Open file',cret
44 if (cret .ne. 0 ) then
45 print *,'ERROR : open file'
46 call efexit(-1)
47 endif
48 C
49 C
50 C filter creation
51 call mfrall(nflt,flt,cret)
52 print *,'Filter array allocation',cret
53 if (cret .ne. 0 ) then
54 print *,'ERROR : filter array allocation'
55 call efexit(-1)
56 endif
57 c
58 call mfrcre(fid,nent,nvale,scent,MED_ALL_CONSTITUENT,
59 & MED_FULL_INTERLACE,MED_GLOBAL_STMODE,
60 & MED_NO_PROFILE,MED_UNDEF_SIZE,flta,flt(1),
61 & cret)
62 print *,'Filter creation',cret
63 if (cret .ne. 0 ) then
64 print *,'ERROR : filter creation'
65 call efexit(-1)
66 endif
67 C
68 C
69 C filter deallocation
70 call mfrdea(nflt,flt,cret)
71 print *,'Filter array deallocation',cret
72 if (cret .ne. 0 ) then
73 print *,'ERROR : filter dearray allocation'
74 call efexit(-1)
75 endif
76 C
77 C
78 C close file
79 call mficlo(fid,cret)
80 print *,'Close file',cret
81 if (cret .ne. 0 ) then
82 print *,'ERROR : close file'
83 call efexit(-1)
84 endif
85 C
86 C
87 C
88 end
89