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