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