30 integer nmesh, imesh, naxis, igeo, geotyp, nelt
31 character(64) :: mname, gtname
32 character(200) :: desc
33 character(16) :: dtunit
34 integer nstep, mdim, sdim, stype, mtype, atype
35 integer coocha, geotra, nnodes, ngeo
36 character(16),
dimension(:),
allocatable :: aname
37 character(16),
dimension (:),
allocatable :: aunit
38 real*8,
dimension(:),
allocatable :: ncoord
40 integer,
dimension(:),
allocatable :: connectivity
43 call mfiope(fid,
'UsesCase_MEDmesh_1.med',med_acc_rdonly, cret)
44 if (cret .ne. 0 )
then
45 print *,
'ERROR : open file'
50 call mmhnmh(fid,nmesh,cret)
51 if (cret .ne. 0 )
then
52 print *,
'Read how many mesh'
55 print *,
'Number of mesh = ',nmesh
59 print *,
'mesh iterator =',imesh
62 call mmhnax(fid,imesh,naxis,cret)
63 if (cret .ne. 0 )
then
64 print *,
'Read number of axis in the mesh'
67 print *,
'Number of axis in the mesh = ',naxis
69 allocate ( aname(naxis), aunit(naxis) ,stat=cret )
71 print *,
'Memory allocation'
75 call mmhmii(fid, imesh, mname, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
76 if (cret .ne. 0 )
then
77 print *,
'Read mesh informations'
80 print *,
"mesh name =", mname
81 print *,
"space dim =", sdim
82 print *,
"mesh dim =", mdim
83 print *,
"mesh type =", mtype
84 print *,
"mesh description =", desc
85 print *,
"dt unit = ", dtunit
86 print *,
"sorting type =", stype
87 print *,
"number of computing step =", nstep
88 print *,
"coordinates axis type =", atype
89 print *,
"coordinates axis name =", aname
90 print *,
"coordinates axis units =", aunit
91 deallocate(aname, aunit)
94 call mmhnme(fid,mname,med_no_dt,med_no_it,med_node,med_no_geotype,med_coordinate,med_no_cmode,coocha,geotra,nnodes,cret)
95 if (cret .ne. 0 )
then
96 print *,
'Read how many nodes in the mesh'
99 print *,
"number of nodes in the mesh =", nnodes
102 allocate ( ncoord(nnodes*2) ,stat=cret )
104 print *,
'Memory allocation'
108 call mmhcor(fid,mname,med_no_dt,med_no_it,med_full_interlace,ncoord,cret)
109 if (cret .ne. 0 )
then
110 print *,
'Nodes coordinates'
113 print *,
"Nodes coordinates =", ncoord
117 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_geo_all,med_connectivity,med_nodal,coocha,geotra,ngeo,cret)
118 if (cret .ne. 0 )
then
119 print *,
'Read number of geometrical types for cells'
122 print *,
"number of geometrical types for cells =", ngeo
126 print *,
'mesh iterator =',imesh
129 call mmheni(fid,mname,med_no_dt,med_no_it,med_cell,igeo,gtname,geotyp,cret)
130 if (cret .ne. 0 )
then
131 print *,
'Read geometry type'
134 print *,
"Geometry type =", geotyp
137 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,geotyp,med_connectivity,med_nodal,coocha,geotra,nelt,cret)
138 if (cret .ne. 0 )
then
139 print *,
'Read number of cells in the geotype'
142 print *,
"number of cells in the geotype =", nelt
145 allocate ( connectivity(nelt*4) ,stat=cret )
147 print *,
'Memory allocation - connectivity'
152 call mmhcyr(fid,mname,med_no_dt,med_no_it,med_cell,geotyp,med_nodal,med_full_interlace,connectivity,cret)
153 if (cret .ne. 0 )
then
154 print *,
'Connectivity'
157 print *,
"Connectivity =", connectivity
158 deallocate(connectivity)
165 if (cret .ne. 0 )
then
166 print *,
'ERROR : close file'
subroutine mmhcor(fid, name, numdt, numit, swm, coo, cret)
subroutine mmhnmh(fid, n, cret)
subroutine mmhnax(fid, it, naxis, cret)
subroutine mmhnme(fid, name, numdt, numit, entype, geotype, datype, cmode, chgt, tsf, n, cret)
subroutine mmhmii(fid, it, name, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
subroutine mmhcyr(fid, name, numdt, numit, entype, geotype, cmode, swm, con, cret)
subroutine mfiope(fid, name, access, cret)
subroutine mmheni(fid, name, numdt, numit, entype, it, geoname, geotype, cret)
program usescase_medmesh_3
subroutine mficlo(fid, cret)