MED fichier
Unittest_MEDsupportMesh_1.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 support mesh module
20C *
21C *****************************************************************************
23C
24 implicit none
25 include 'med.hf'
26C
27C
28 integer cret
29 integer*8 fid
30
31 character*64 fname
32 parameter(fname = "Unittest_MEDsupportMesh_1.med")
33 character*64 smname1
34 integer sdim1,mdim1
35 parameter(sdim1=2, mdim1=2)
36 integer sdim2,mdim2
37 parameter(sdim2=3,mdim2=2)
38 parameter(smname1 = "supportMesh1")
39 character*64 smname2
40 parameter(smname2 = "supportMesh2")
41 character*200 description1
42 parameter(description1="support mesh1 description")
43 character*200 description2
44 parameter(description2="support mesh2 description")
45 character*16 nomcoo2d(2)
46 character*16 unicoo2d(2)
47 data nomcoo2d /"x","y"/, unicoo2d /"cm","cm"/
48 character*16 nomcoo3d(3)
49 character*16 unicoo3d(3)
50 data nomcoo3d /"x","y","z"/, unicoo3d /"cm","cm","cm"/
51 integer atype1, atype2
52 parameter(atype1=med_cartesian, atype2=med_cartesian)
53 integer nsmesh, i
54 character*64 smname
55 character*16 aunit(3), aname(3)
56 character*200 description
57 integer sdim, mdim, atype
58C
59C
60C file creation
61 call mfiope(fid,fname,med_acc_creat,cret)
62 print *,'Open file',cret
63 if (cret .ne. 0 ) then
64 print *,'ERROR : file creation'
65 call efexit(-1)
66 endif
67C
68C
69C support mesh creation : 2D
70 call msmcre(fid,smname1,sdim1,mdim1,description1,
71 & med_cartesian,nomcoo2d,unicoo2d,cret)
72 print *,'Support mesh creation : 2D space dimension',cret
73 if (cret .ne. 0 ) then
74 print *,'ERROR : support mesh creation'
75 call efexit(-1)
76 endif
77C
78C
79C support mesh creation : 3D space diminsion
80 call msmcre(fid,smname2,sdim2,mdim2,description2,
81 & med_cartesian,nomcoo3d,unicoo3d,cret)
82 print *,'Support mesh creation : 3D space dimension ',cret
83 if (cret .ne. 0 ) then
84 print *,'ERROR : support mesh creation'
85 call efexit(-1)
86 endif
87C
88C
89C close file
90 call mficlo(fid,cret)
91 print *,'Close file',cret
92 if (cret .ne. 0 ) then
93 print *,'ERROR : close file'
94 call efexit(-1)
95 endif
96C
97C
98C
99 end
100
program medsupportmesh1
subroutine mfiope(fid, name, access, cret)
Definition medfile.f:42
subroutine mficlo(fid, cret)
Definition medfile.f:82
subroutine msmcre(fid, maa, sdim, mdim, des, atype, aname, aunit, cret)
Definition medsupport.f:20