45 character*16 axname(2), unname(2)
49 real*8,
dimension(:),
allocatable :: coords
54 integer,
dimension(:),
allocatable :: index
56 integer,
dimension(:),
allocatable :: conity
60 integer coocha, geotra
62 parameter(mname =
"2D unstructured mesh")
63 parameter(finame =
"UsesCase_MEDmesh_13.med")
66 call mfiope(fid, finame, med_acc_rdonly, cret)
67 if (cret .ne. 0 )
then 68 print *,
'ERROR : open file' 73 call mmhmin(fid, mname, sdim, mdim, mtype, mdesc, dtunit, stype, nstep, atype, axname, unname, cret)
74 if (cret .ne. 0 )
then 75 print *,
'Read mesh informations' 78 print *,
"mesh name =", mname
79 print *,
"space dim =", sdim
80 print *,
"mesh dim =", mdim
81 print *,
"mesh type =", mtype
82 print *,
"mesh description =", mdesc
83 print *,
"dt unit = ", dtunit
84 print *,
"sorting type =", stype
85 print *,
"number of computing step =", nstep
86 print *,
"coordinates axis type =", atype
87 print *,
"coordinates axis name =", axname
88 print *,
"coordinates axis units =", unname
91 call mmhnme(fid,mname,med_no_dt,med_no_it,med_node,med_point1,med_coordinate,med_no_cmode,coocha,geotra,nnodes,cret)
92 if (cret .ne. 0 )
then 93 print *,
'Read number of nodes ...' 96 print *,
"Number of nodes =", nnodes
103 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_polygon,med_index_node,med_nodal,coocha,geotra,isize,cret)
104 if (cret .ne. 0 )
then 105 print *,
'Read number of polygon ...' 109 print *,
"Number of polygons =", npoly
112 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_polygon,med_connectivity,med_nodal,coocha,geotra,cosize,cret)
113 if (cret .ne. 0 )
then 114 print *,
'Read connectivity size ...' 117 print *,
"Read connectivity size ...", cosize
120 allocate (coords(nnodes*sdim),stat=cret)
121 if (cret .ne. 0)
then 122 print *,
'Memory allocation' 126 call mmhcor(fid,mname,med_no_dt,med_no_it,med_full_interlace,coords,cret)
127 if (cret .ne. 0 )
then 128 print *,
'Read nodes coordinates ...' 131 print *,
"Read nodes coordinates ...", coords
136 allocate (index(isize),stat=cret)
137 if (cret .ne. 0)
then 138 print *,
'Memory allocation' 142 allocate (conity(cosize),stat=cret)
143 if (cret .ne. 0)
then 144 print *,
'Memory allocation' 148 call mmhpgr(fid,mname,med_no_dt,med_no_it,med_cell,med_nodal,index,conity,cret)
149 if (cret .ne. 0 )
then 150 print *,
'Read polygon connectivity ...' 153 print *,
"Read polygon connectivity ...", conity
162 if (cret .ne. 0 )
then 163 print *,
'ERROR : close file' subroutine mfiope(fid, name, access, cret)
subroutine mmhmin(fid, name, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
subroutine mficlo(fid, cret)
subroutine mmhcor(fid, name, numdt, numit, swm, coo, cret)
subroutine mmhpgr(fid, name, numdt, numit, entype, cmode, index, con, cret)
program usescase_medmesh_14
subroutine mmhnme(fid, name, numdt, numit, entype, geotype, datype, cmode, chgt, tsf, n, cret)