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 - 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 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 fid
30  character*64 fname
31  parameter(fname = "Unittest_MEDfilter_1.med")
32  integer nflt
33  parameter(nflt=1)
34  integer flta(1)
35  integer*8 flt(1)
36  integer nent,nvale,scent
37  parameter(nent=10,nvale=1,scent=2)
38 C
39 C
40 C open file
41  call mfiope(fid,fname,med_acc_creat,cret)
42  print *,'Open file',cret
43  if (cret .ne. 0 ) then
44  print *,'ERROR : open file'
45  call efexit(-1)
46  endif
47 C
48 C
49 C filter creation
50  call mfrall(nflt,flt,cret)
51  print *,'Filter array allocation',cret
52  if (cret .ne. 0 ) then
53  print *,'ERROR : filter array allocation'
54  call efexit(-1)
55  endif
56 c
57  call mfrcre(fid,nent,nvale,scent,med_all_constituent,
58  & med_full_interlace,med_global_stmode,
59  & med_no_profile,med_undef_size,flta,flt(1),
60  & cret)
61  print *,'Filter creation',cret
62  if (cret .ne. 0 ) then
63  print *,'ERROR : filter creation'
64  call efexit(-1)
65  endif
66 C
67 C
68 C filter deallocation
69  call mfrdea(nflt,flt,cret)
70  print *,'Filter array deallocation',cret
71  if (cret .ne. 0 ) then
72  print *,'ERROR : filter dearray allocation'
73  call efexit(-1)
74  endif
75 C
76 C
77 C close file
78  call mficlo(fid,cret)
79  print *,'Close file',cret
80  if (cret .ne. 0 ) then
81  print *,'ERROR : close file'
82  call efexit(-1)
83  endif
84 C
85 C
86 C
87  end
88 
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
Definition: medfile.f:80
program medfilter1
subroutine mfrdea(nflt, flt, cret)
Desalloue un tableau de filtre de taille nfilter.
Definition: medfilter.f:59
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. Initialisé en sortie de fonction, le filtre filter sera utilisé pour lire/écrire des valeurs associées à ces entités. Ces valeurs peuvent être des coordonnées, des connectivités des valeurs de champs résultats mais aussi des numéros de familles, des noms ou numéros optionnels.
Definition: medfilter.f:22
subroutine mfrall(nflt, flt, cret)
Alloue un tableau de filtres de taille nfilter.
Definition: medfilter.f:43
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
Definition: medfile.f:41