MED fichier
Unittest_MEDlocalization_3.f
Aller à la documentation de ce fichier.
1C* This file is part of MED.
2C*
3C* COPYRIGHT (C) 1999 - 2020 EDF R&D, CEA/DEN
4C* MED is free software: you can redistribute it and/or modify
5C* it under the terms of the GNU Lesser General Public License as published by
6C* the Free Software Foundation, either version 3 of the License, or
7C* (at your option) any later version.
8C*
9C* MED is distributed in the hope that it will be useful,
10C* but WITHOUT ANY WARRANTY; without even the implied warranty of
11C* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12C* GNU Lesser General Public License for more details.
13C*
14C* You should have received a copy of the GNU Lesser General Public License
15C* along with MED. If not, see <http://www.gnu.org/licenses/>.
16C*
17
18C******************************************************************************
19C * Tests for localization module
20C *
21C *****************************************************************************
22 program medloc3
23C
24 implicit none
25 include 'med.hf'
26C
27C
28 integer cret
29 integer*8 fid
30
31 character*64 fname,lname1,giname1,isname1
32 character*64 giname,isname
33 parameter(fname="Unittest_MEDlocalization_1.med")
34 integer it,n,nloc
35 parameter(nloc=1)
36 parameter(giname1=med_no_interpolation)
37 parameter(isname1=med_no_mesh_support)
38 integer gtype1,sdim1,nip1
39 integer gtype,sdim,nip
40 parameter(gtype1=med_tria3)
41 parameter(sdim1=2)
42 parameter(nip1=3)
43 integer sgtype,sgtype1
44 parameter(sgtype1=med_undef_geotype)
45 integer nsmc, nsmc1
46 parameter(nsmc1=0)
47C
48C
49C open file
50 call mfiope(fid,fname,med_acc_rdonly,cret)
51 print *,cret
52 if (cret .ne. 0 ) then
53 print *,'ERROR : open file'
54 call efexit(-1)
55 endif
56C
57C
58C number of localization
59 call mlcnlc(fid,n,cret)
60 print *,cret
61 if ((cret .ne. 0) .or.
62 & (n .ne. nloc) )then
63 print *,'ERROR : number of localization'
64 call efexit(-1)
65 endif
66C
67C
68C informations bt iteration
69 do it=1,n
70 call mlclci(fid,it,lname1,gtype,sdim,nip,
71 & giname,isname,nsmc,sgtype,cret)
72 print *,cret
73 if (cret .ne. 0 ) then
74 print *,'ERROR : read information'
75 call efexit(-1)
76 endif
77c
78 if ((gtype .ne. gtype1) .or.
79 & (sdim .ne. sdim1) .or.
80 & (nip .ne. nip1) .or.
81 & (giname .ne. giname1) .or.
82 & (isname .ne. isname1) .or.
83 & (nsmc .ne. nsmc1) .or.
84 & (sgtype .ne. sgtype1) ) then
85 print *,cret
86 print *,'ERROR : read information'
87 call efexit(-1)
88 endif
89 enddo
90C
91C
92C close file
93 call mficlo(fid,cret)
94 print *,cret
95 if (cret .ne. 0 ) then
96 print *,'ERROR : close file'
97 call efexit(-1)
98 endif
99C
100C
101C
102 end
103
program medloc3
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
Definition medfile.f:42
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
Definition medfile.f:82
subroutine mlcnlc(fid, n, cret)
Cette routine permet de lire le nombre de localisations de points d'intégration contenues dans un fic...
subroutine mlclci(fid, it, lname, gtype, sdim, nip, giname, isname, nsmc, sgtype, cret)
Cette routine permet d'obtenir la description de la localisation de points d'intégration n° localizat...