MED fichier
Unittest_MEDsupportMesh_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 support mesh module
20 C *
21 C *****************************************************************************
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_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
58 C
59 C
60 C 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
67 C
68 C
69 C 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
77 C
78 C
79 C 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
87 C
88 C
89 C 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
96 C
97 C
98 C
99  end
100 
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
medsupportmesh1
program medsupportmesh1
Definition: Unittest_MEDsupportMesh_1.f:22
msmcre
subroutine msmcre(fid, maa, sdim, mdim, des, atype, aname, aunit, cret)
Cette routine permet de créer un maillage support.
Definition: medsupport.f:20