44 character*16 axname(2), unname(2)
48 real*8,
dimension(:),
allocatable :: coords
53 integer,
dimension(:),
allocatable :: index
55 integer,
dimension(:),
allocatable :: conity
59 integer coocha, geotra
61 parameter(mname =
"2D unstructured mesh")
62 parameter(finame =
"UsesCase_MEDmesh_13.med")
65 call mfiope(fid, finame, med_acc_rdonly, cret)
66 if (cret .ne. 0 )
then
67 print *,
'ERROR : open file'
72 call mmhmin(fid, mname, sdim, mdim, mtype, mdesc, dtunit, stype, nstep, atype, axname, unname, cret)
73 if (cret .ne. 0 )
then
74 print *,
'Read mesh informations'
77 print *,
"mesh name =", mname
78 print *,
"space dim =", sdim
79 print *,
"mesh dim =", mdim
80 print *,
"mesh type =", mtype
81 print *,
"mesh description =", mdesc
82 print *,
"dt unit = ", dtunit
83 print *,
"sorting type =", stype
84 print *,
"number of computing step =", nstep
85 print *,
"coordinates axis type =", atype
86 print *,
"coordinates axis name =", axname
87 print *,
"coordinates axis units =", unname
90 call mmhnme(fid,mname,med_no_dt,med_no_it,med_node,med_point1,med_coordinate,med_no_cmode,coocha,geotra,nnodes,cret)
91 if (cret .ne. 0 )
then
92 print *,
'Read number of nodes ...'
95 print *,
"Number of nodes =", nnodes
102 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_polygon,med_index_node,med_nodal,coocha,geotra,isize,cret)
103 if (cret .ne. 0 )
then
104 print *,
'Read number of polygon ...'
108 print *,
"Number of polygons =", npoly
111 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_polygon,med_connectivity,med_nodal,coocha,geotra,cosize,cret)
112 if (cret .ne. 0 )
then
113 print *,
'Read connectivity size ...'
116 print *,
"Read connectivity size ...", cosize
119 allocate (coords(nnodes*sdim),stat=cret)
120 if (cret .ne. 0)
then
121 print *,
'Memory allocation'
125 call mmhcor(fid,mname,med_no_dt,med_no_it,med_full_interlace,coords,cret)
126 if (cret .ne. 0 )
then
127 print *,
'Read nodes coordinates ...'
130 print *,
"Read nodes coordinates ...", coords
135 allocate (index(isize),stat=cret)
136 if (cret .ne. 0)
then
137 print *,
'Memory allocation'
141 allocate (conity(cosize),stat=cret)
142 if (cret .ne. 0)
then
143 print *,
'Memory allocation'
147 call mmhpgr(fid,mname,med_no_dt,med_no_it,med_cell,med_nodal,index,conity,cret)
148 if (cret .ne. 0 )
then
149 print *,
'Read polygon connectivity ...'
152 print *,
"Read polygon connectivity ...", conity
161 if (cret .ne. 0 )
then
162 print *,
'ERROR : close file'
subroutine mmhmin(fid, name, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
Cette routine permet de lire les informations relatives à un maillage en précisant son nom...
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
subroutine mmhcor(fid, name, numdt, numit, swm, coo, cret)
Cette routine permet de lire dans un maillage le tableau des coordonnées des noeuds, selon une séquence de calcul donnée.
subroutine mmhnme(fid, name, numdt, numit, entype, geotype, datype, cmode, chgt, tsf, n, cret)
Cette routine permet de lire le nombre d'entités dans un maillage pour une séquence de calcul donnée...
program usescase_medmesh_14
subroutine mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.
subroutine mmhpgr(fid, name, numdt, numit, entype, cmode, index, con, cret)
Cette routine permet la lecture des connectivités de polygones.