29 integer fid, nmesh, imesh, naxis, igeo, geotyp, nelt
30 character(64) :: mname, gtname
31 character(200) :: desc
32 character(16) :: dtunit
33 integer nstep, mdim, sdim, stype, mtype, atype
34 integer coocha, geotra, nnodes, ngeo
35 character(16),
dimension(:),
allocatable :: aname
36 character(16),
dimension (:),
allocatable :: aunit
37 real*8,
dimension(:),
allocatable :: ncoord
39 integer,
dimension(:),
allocatable :: connectivity
42 call mfiope(fid,
'UsesCase_MEDmesh_1.med',med_acc_rdonly, cret)
43 if (cret .ne. 0 )
then 44 print *,
'ERROR : open file' 49 call mmhnmh(fid,nmesh,cret)
50 if (cret .ne. 0 )
then 51 print *,
'Read how many mesh' 54 print *,
'Number of mesh = ',nmesh
58 print *,
'mesh iterator =',imesh
61 call mmhnax(fid,imesh,naxis,cret)
62 if (cret .ne. 0 )
then 63 print *,
'Read number of axis in the mesh' 66 print *,
'Number of axis in the mesh = ',naxis
68 allocate ( aname(naxis), aunit(naxis) ,stat=cret )
70 print *,
'Memory allocation' 74 call mmhmii(fid, imesh, mname, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
75 if (cret .ne. 0 )
then 76 print *,
'Read mesh informations' 79 print *,
"mesh name =", mname
80 print *,
"space dim =", sdim
81 print *,
"mesh dim =", mdim
82 print *,
"mesh type =", mtype
83 print *,
"mesh description =", desc
84 print *,
"dt unit = ", dtunit
85 print *,
"sorting type =", stype
86 print *,
"number of computing step =", nstep
87 print *,
"coordinates axis type =", atype
88 print *,
"coordinates axis name =", aname
89 print *,
"coordinates axis units =", aunit
90 deallocate(aname, aunit)
93 call mmhnme(fid,mname,med_no_dt,med_no_it,med_node,med_no_geotype,med_coordinate,med_no_cmode,coocha,geotra,nnodes,cret)
94 if (cret .ne. 0 )
then 95 print *,
'Read how many nodes in the mesh' 98 print *,
"number of nodes in the mesh =", nnodes
101 allocate ( ncoord(nnodes*2) ,stat=cret )
103 print *,
'Memory allocation' 107 call mmhcor(fid,mname,med_no_dt,med_no_it,med_full_interlace,ncoord,cret)
108 if (cret .ne. 0 )
then 109 print *,
'Nodes coordinates' 112 print *,
"Nodes coordinates =", ncoord
116 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_geo_all,med_connectivity,med_nodal,coocha,geotra,ngeo,cret)
117 if (cret .ne. 0 )
then 118 print *,
'Read number of geometrical types for cells' 121 print *,
"number of geometrical types for cells =", ngeo
125 print *,
'mesh iterator =',imesh
128 call mmheni(fid,mname,med_no_dt,med_no_it,med_cell,igeo,gtname,geotyp,cret)
129 if (cret .ne. 0 )
then 130 print *,
'Read geometry type' 133 print *,
"Geometry type =", geotyp
136 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,geotyp,med_connectivity,med_nodal,coocha,geotra,nelt,cret)
137 if (cret .ne. 0 )
then 138 print *,
'Read number of cells in the geotype' 141 print *,
"number of cells in the geotype =", nelt
144 allocate ( connectivity(nelt*4) ,stat=cret )
146 print *,
'Memory allocation - connectivity' 151 call mmhcyr(fid,mname,med_no_dt,med_no_it,med_cell,geotyp,med_nodal,med_full_interlace,connectivity,cret)
152 if (cret .ne. 0 )
then 153 print *,
'Connectivity' 156 print *,
"Connectivity =", connectivity
157 deallocate(connectivity)
164 if (cret .ne. 0 )
then 165 print *,
'ERROR : close file' subroutine mficlo(fid, cret)
subroutine mmhcor(fid, name, numdt, numit, swm, coo, cret)
subroutine mmhcyr(fid, name, numdt, numit, entype, geotype, cmode, swm, con, cret)
subroutine mmheni(fid, name, numdt, numit, entype, it, geoname, geotype, cret)
subroutine mmhmii(fid, it, name, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
program usescase_medmesh_3
subroutine mmhnme(fid, name, numdt, numit, entype, geotype, datype, cmode, chgt, tsf, n, cret)
subroutine mfiope(fid, name, access, cret)
subroutine mmhnmh(fid, n, cret)
subroutine mmhnax(fid, it, naxis, cret)