33 character(MED_NAME_SIZE) :: mname =
""
35 character(MED_COMMENT_SIZE) :: mdesc =
""
44 character(MED_SNAME_SIZE),
dimension(:),
allocatable :: aname
45 character(MED_SNAME_SIZE),
dimension(:),
allocatable :: aunit
46 character(MED_SNAME_SIZE) :: dtunit =
""
48 real*8,
dimension(:),
allocatable :: coords
52 integer ,
dimension(:),
allocatable :: conity
55 integer coocha, geotra
62 character(MED_NAME_SIZE) :: profna =
""
69 integer,
dimension(MED_N_CELL_FIXED_GEO) :: geotps
74 geotps = med_get_cell_geometry_type
82 call mfiope(fid,
"UsesCase_MEDmesh_6.med", med_acc_rdonly, cret)
83 if (cret .ne. 0 )
then
84 print *,
"ERROR : open file"
89 call mmhnmh(fid, nmesh, cret)
90 if (cret .ne. 0 )
then
91 print *,
"ERROR : read how many mesh"
95 print *,
"nmesh :", nmesh
100 call mmhnax(fid, i, sdim, cret)
101 if (cret .ne. 0 )
then
102 print *,
"ERROR : read computation space dimension"
107 allocate ( aname(sdim), aunit(sdim) ,stat=cret )
109 print *,
"ERROR : memory allocation"
114 call mmhmii(fid, i, mname, sdim, mdim, mtype, mdesc, dtunit, stype, nstep, &
115 atype, aname, aunit, cret)
116 if (cret .ne. 0 )
then
117 print *,
"ERROR : read mesh informations"
120 print *,
"mesh name =", mname
121 print *,
"space dim =", sdim
122 print *,
"mesh dim =", mdim
123 print *,
"mesh type =", mtype
124 print *,
"mesh description =", mdesc
125 print *,
"dt unit = ", dtunit
126 print *,
"sorting type =", stype
127 print *,
"number of computing step =", nstep
128 print *,
"coordinates axis type =", atype
129 print *,
"coordinates axis name =", aname
130 print *,
"coordinates axis units =", aunit
131 deallocate(aname, aunit)
134 call mmhnme(fid, mname, med_no_dt, med_no_it, med_node, med_no_geotype, &
135 med_coordinate, med_no_cmode, coocha, geotra, nnodes, cret)
136 if (cret .ne. 0 )
then
137 print *,
"ERROR : read how many nodes in the mesh"
140 print *,
"number of nodes in the mesh =", nnodes
143 allocate (coords(nnodes*sdim),stat=cret)
145 print *,
"ERROR : memory allocation"
149 call mmhcor(fid, mname, med_no_dt, med_no_it, med_full_interlace, coords, cret)
150 if (cret .ne. 0 )
then
151 print *,
"ERROR : nodes coordinates"
154 print *,
"Nodes coordinates =", coords
158 do it=1, med_n_cell_fixed_geo
162 print *,
"geotps(it) :", geotps(it)
164 call mmhnme(fid, mname, med_no_dt, med_no_it, med_cell, geotyp, &
165 med_connectivity, med_nodal, coocha, &
167 if (cret .ne. 0 )
then
168 print *,
"ERROR : number of cells"
171 print *,
"Number of cells =", ngeo
175 if (ngeo .ne. 0)
then
176 allocate (conity(ngeo*mod(geotyp,100)), stat=cret)
178 print *,
"ERROR : memory allocation"
182 call mmhcyr(fid, mname, med_no_dt, med_no_it, med_cell, &
183 geotyp, med_nodal, med_full_interlace, &
186 print *,
"ERROR : cellconnectivity", conity
197 call mmhcsi(fid, mname, it+1, numdt, numit, dt, cret)
198 if (cret .ne. 0 )
then
199 print *,
"ERROR : computing step info"
202 print *,
"numdt =", numdt
203 print *,
"numit =", numit
207 call mmhnep(fid, mname, numdt, numit, med_node, med_no_geotype, &
208 med_coordinate, med_no_cmode, med_global_stmode, &
209 profna, profsz, coocha, geotra, nnodes, cret)
210 if (cret .ne. 0 )
then
211 print *,
"ERROR : nodes coordinates"
214 print *,
"profna =", profna
215 print *,
"coocha =", coocha
216 print *,
"geotra =", geotra
220 if (coocha == 1 .and. geotra == 1)
then
222 allocate (coords(nnodes*2),stat=cret)
224 print *,
"ERROR : memory allocation"
228 call mmhcpr(fid, mname, numdt, numit,med_global_stmode,profna, &
229 med_full_interlace,med_all_constituent, coords, cret)
230 if (cret .ne. 0 )
then
231 print *,
"ERROR : nodes coordinates"
234 print *,
"Nodes coordinates =", coords
245 if (cret .ne. 0 )
then
246 print *,
"ERROR : close file"
subroutine mficlo(fid, cret)
Fermeture d'un fichier MED.
subroutine mmhnmh(fid, n, cret)
Cette routine permet de lire le nombre de maillages dans un fichier.
subroutine mmhcpr(fid, name, numdt, numit, stm, pname, swm, dim, 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 et un profil donnés.
subroutine mmhmii(fid, it, name, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
Cette routine permet de lire les informations relatives à un maillage dans un fichier.
program usescase_medmesh_8
subroutine mmhnep(fid, name, numdt, numit, entype, geotype, datype, cmode, stmode, pname, psize, chgt, tsf, n, cret)
Cette routine permet de lire le nombre d'entités dans un maillage pour une séquence de calcul et un p...
subroutine mmhnax(fid, it, naxis, cret)
Cette routine permet de lire dans un maillage le nombre d'axes du repère des coordonnées des noeuds...
subroutine mfiope(fid, name, access, cret)
Ouverture 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...
subroutine mmhcyr(fid, name, numdt, numit, entype, geotype, cmode, swm, con, cret)
Cette routine permet de lire dans un maillage le tableau des connectivités pour un type géométrique d...
subroutine mmhcsi(fid, name, csit, numdt, numit, dt, cret)
Cette routine permet de lire les informations relatives à une séquence de calcul d'un maillage...