MED fichier: Fichier source de Unittest_MEDfilter_1.f

MED fichier

Unittest_MEDfilter_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 filter module
20 C *
21 C *****************************************************************************
22 program medfilter1
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_1.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
mfrall
subroutine mfrall(nflt, flt, cret)
Alloue un tableau de filtres de taille nfilter.
Definition: medfilter.f:44
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
mfrdea
subroutine mfrdea(nflt, flt, cret)
Desalloue un tableau de filtre de taille nfilter.
Definition: medfilter.f:60
mfrcre
subroutine mfrcre(fid, nent, nvent, ncent, cs, swm, stm, pname, fltas, flta, flt, cret)
Crée une selection d'entités grâce a un tableau d'index filterarray de taille filterarraysize....
Definition: medfilter.f:22
medfilter1
program medfilter1
Definition: Unittest_MEDfilter_1.f:22