30 integer fid, nmesh, it, naxis
31 character(64) :: mname =
"2D unstructured mesh"
32 character(200) :: desc
33 character(16) :: dtunit
34 integer nstep, mdim, sdim, stype, mtype, atype
35 character(16),
dimension(:),
allocatable :: aname
36 character(16),
dimension (:),
allocatable :: aunit
37 real*8,
dimension(:),
allocatable :: ncoord
38 integer coocha, geotra, nnodes, ntria3, nquad4
39 integer,
dimension(:),
allocatable :: tricon
40 integer,
dimension(:),
allocatable :: quacon
43 call mfiope(fid,
'UsesCase_MEDmesh_1.med',med_acc_rdonly, cret)
44 if (cret .ne. 0 )
then
45 print *,
'ERROR : open file'
53 call mmhnan(fid,mname,naxis,cret)
54 if (cret .ne. 0 )
then
55 print *,
'Read number of axis in the mesh'
58 print *,
'Number of axis in the mesh = ',naxis
61 allocate ( aname(naxis), aunit(naxis) ,stat=cret )
63 print *,
'Memory allocation'
67 call mmhmin(fid, mname, sdim, mdim, mtype, desc, dtunit, stype, nstep, atype, aname, aunit, cret)
68 if (cret .ne. 0 )
then
69 print *,
'Read mesh informations'
72 print *,
"mesh name =", mname
73 print *,
"space dim =", sdim
74 print *,
"mesh dim =", mdim
75 print *,
"mesh type =", mtype
76 print *,
"mesh description =", desc
77 print *,
"dt unit = ", dtunit
78 print *,
"sorting type =", stype
79 print *,
"number of computing step =", nstep
80 print *,
"coordinates axis type =", atype
81 print *,
"coordinates axis name =", aname
82 print *,
"coordinates axis units =", aunit
83 deallocate(aname, aunit)
86 call mmhnme(fid,mname,med_no_dt,med_no_it,med_node,med_no_geotype,med_coordinate,med_no_cmode,coocha,geotra,nnodes,cret)
87 if (cret .ne. 0 )
then
88 print *,
'Read how many nodes in the mesh'
91 print *,
"number of nodes in the mesh =", nnodes
97 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_tria3,med_connectivity,med_nodal,coocha,geotra,ntria3,cret)
98 if (cret .ne. 0 )
then
99 print *,
'Read how many nodes in the mesh'
102 print *,
"number of triangular cells in the mesh =", ntria3
105 call mmhnme(fid,mname,med_no_dt,med_no_it,med_cell,med_quad4,med_connectivity,med_nodal,coocha,geotra,nquad4,cret)
106 if (cret .ne. 0 )
then
107 print *,
'Read how many nodes in the mesh'
110 print *,
"number of quadrangular cells in the mesh =", nquad4
113 allocate (ncoord(nnodes*2),stat=cret)
115 print *,
'Memory allocation'
119 call mmhcor(fid,mname,med_no_dt,med_no_it,med_full_interlace,ncoord,cret)
120 if (cret .ne. 0 )
then
121 print *,
'Nodes coordinates'
124 print *,
"Nodes coordinates =", ncoord
128 allocate ( tricon(ntria3 * 3) ,stat=cret )
130 print *,
'Memory allocation'
134 call mmhcyr(fid,mname,med_no_dt,med_no_it,med_cell,med_tria3,med_nodal,med_full_interlace,tricon,cret)
135 if (cret .ne. 0 )
then
136 print *,
'MED_TRIA3 connectivity'
139 print *,
"MED_TRIA3 connectivity =", tricon
142 allocate ( quacon(nquad4*4) ,stat=cret )
144 print *,
'Memory allocation'
148 call mmhcyr(fid,mname,med_no_dt,med_no_it,med_cell,med_quad4,med_nodal,med_full_interlace,quacon,cret)
149 if (cret .ne. 0 )
then
150 print *,
'MED_QUAD4 connectivity'
153 print *,
"MED_QUAD4 connectivity =", quacon
160 if (cret .ne. 0 )
then
161 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...
program usescase_medmesh_2
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...
subroutine mmhnan(fid, name, naxis, cret)
Cette routine permet de lire dans un maillage le nombre d'axes du repère des coordonnées des noeuds a...
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 mfiope(fid, name, access, cret)
Ouverture d'un fichier MED.