32 integer sdim, mdim, stype, mtype, atype
33 integer axis, isize, entype, nquad4
38 character*16 axname(2)
40 character*16 unname(2)
42 character*16 cnames(8)
46 parameter(fname =
"UsesCase_MEDmesh_4.med")
47 parameter(mdesc =
"A 2D structured mesh")
48 parameter(mname =
"2D structured mesh")
49 parameter(sdim = 2, mdim = 2)
50 parameter(stype=med_sort_dtit, mtype=med_structured_mesh)
51 parameter(atype=med_cartesian_grid)
55 data axname /
"x" ,
"y"/
56 data unname /
"cm",
"cm"/
57 data cnames /
"CELL_1",
"CELL_2",
61 data cooxaxis /1.,2.,3.,4.,5./
62 data cooyaxis /1.,2.,3./
66 call mfiope(fid,fname,med_acc_creat,cret)
67 if (cret .ne. 0 )
then
68 print *,
'ERROR : file creation'
74 call mmhcre(fid, mname, sdim, mdim, mtype,mdesc,
75 & dtunit, stype, atype, axname, unname, cret)
76 if (cret .ne. 0 )
then
77 print *,
'ERROR : mesh creation'
83 call mmhgtw(fid,mname,med_cartesian_grid,cret)
84 if (cret .ne. 0 )
then
85 print *,
'ERROR : write grid type'
93 call mmhgcw(fid,mname,med_no_dt,med_no_it,dt,
94 & axis,isize,cooxaxis,cret)
95 if (cret .ne. 0 )
then
96 print *,
'ERROR : write X coordinates'
101 call mmhgcw(fid,mname,med_no_dt,med_no_it,dt,
102 & axis,isize,cooyaxis,cret)
103 if (cret .ne. 0 )
then
104 print *,
'ERROR : write Y coordinates'
111 call mmheaw(fid,mname,med_no_dt,med_no_it,med_cell,med_quad4,
112 & nquad4,cnames,cret)
113 if (cret .ne. 0 )
then
114 print *,
'ERROR : write names for elements'
120 call mfacre(fid,mname,med_no_name,0,0,med_no_group,cret)
121 if (cret .ne. 0 )
then
122 print *,
'ERROR : create family 0'
129 if (cret .ne. 0 )
then
130 print *,
'ERROR : close file'
program usescase_medmesh_4
subroutine mfacre(fid, name, fname, fnum, ngro, gname, cret)
subroutine mfiope(fid, name, access, cret)
subroutine mficlo(fid, cret)
subroutine mmhgtw(fid, name, gtype, cret)
subroutine mmhcre(fid, name, sdim, mdim, mtype, desc, dtunit, stype, atype, aname, aunit, cret)
subroutine mmheaw(fid, mname, numdt, numit, entype, geotype, n, ename, cret)
subroutine mmhgcw(fid, name, numdt, numit, dt, axis, size, index, cret)