32 parameter(fname =
"Unittest_MEDstructElement_1.med")
33 character*64 mname1, mname2, mname3
34 parameter(mname1 =
"model name 1")
35 parameter(mname2 =
"model name 2")
36 parameter(mname3 =
"model name 3")
37 integer dim1, dim2, dim3
42 parameter(smname1=med_no_name)
44 parameter(smname2=
"support mesh name")
46 parameter(setype1=med_none)
48 parameter(setype2=med_node)
50 parameter(setype3=med_cell)
52 parameter(sgtype1=med_no_geotype)
54 parameter(sgtype2=med_no_geotype)
56 parameter(sgtype3=med_seg2)
57 integer mtype1,mtype2,mtype3
60 character*200 description1
61 parameter(description1=
"support mesh1 description")
62 character*16 nomcoo2d(2)
63 character*16 unicoo2d(2)
64 data nomcoo2d /
"x",
"y"/, unicoo2d /
"cm",
"cm"/
66 data coo / 0.0, 0.0, 1.0,1.0, 2.0,2.0 /
76 call mfiope(fid,fname,med_acc_creat,cret)
77 print *,
'Open file',cret
78 if (cret .ne. 0 )
then
79 print *,
'ERROR : file creation'
85 call msecre(fid,mname1,dim1,smname1,setype1,
86 & sgtype1,mtype1, cret)
87 print *,
'Create struct element',mtype1, cret
88 if ((cret .ne. 0) .or. (mtype1 .lt. 0) )
then
89 print *,
'ERROR : struct element creation'
95 call msmcre(fid,smname2,dim2,dim2,description1,
96 & med_cartesian,nomcoo2d,unicoo2d,cret)
97 print *,
'Support mesh creation : 2D space dimension',cret
98 if (cret .ne. 0 )
then
99 print *,
'ERROR : support mesh creation'
103 call mmhcow(fid,smname2,med_no_dt,med_no_it,
104 & med_undef_dt,med_full_interlace,
107 call mmhcyw(fid,smname2,med_no_dt,med_no_it,
108 & med_undef_dt,med_cell,med_seg2,
109 & med_nodal,med_full_interlace,
114 call msecre(fid,mname2,dim2,smname2,setype2,
115 & sgtype2,mtype2,cret)
116 print *,
'Create struct element',mtype2, cret
117 if ((cret .ne. 0) .or. (mtype2 .lt. 0) )
then
118 print *,
'ERROR : struct element creation'
124 call msecre(fid,mname3,dim3,smname2,setype3,
125 & sgtype3,mtype3,cret)
126 print *,
'Create struct element',mtype3, cret
127 if ((cret .ne. 0) .or. (mtype3 .lt. 0) )
then
128 print *,
'ERROR : struct element creation'
135 print *,
'Close file',cret
136 if (cret .ne. 0 )
then
137 print *,
'ERROR : close file'
program medstructelement1
subroutine mfiope(fid, name, access, cret)
subroutine mficlo(fid, cret)
subroutine mmhcyw(fid, name, numdt, numit, dt, entype, geotype, cmode, swm, n, con, cret)
subroutine mmhcow(fid, name, numdt, numit, dt, swm, n, coo, cret)
subroutine msecre(fid, mname, mdim, smname, setype, sgtype, etype, cret)
subroutine msmcre(fid, maa, sdim, mdim, des, atype, aname, aunit, cret)