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
68 integer ncatt1,profile1,nvatt1
76 integer mgtype,mdim,setype,snnode,sncell
77 integer sgtype,ncatt,nvatt,profile
78 character*64 smname,mname
82 call mfiope(fid,fname,med_acc_rdonly,cret)
83 print *,
'Open file',cret
84 if (cret .ne. 0 )
then
85 print *,
'ERROR : file creation'
92 print *,
'Read number of struct model',nsmr,cret
93 if (cret .ne. 0 )
then
94 print *,
'ERROR : number of struct model'
97 if (nsmr .ne. nsm)
then
98 print *,
'ERROR : number of struct model'
106 call msesei(fid,it,mname,mgtype,mdim,smname,
107 & setype,snnode,sncell,sgtype,
108 & ncatt,profile,nvatt,cret)
109 print *,
'Read information about struct element',cret
110 if (cret .ne. 0 )
then
111 print *,
'ERROR : information about struct element'
116 if ( (mname .ne. mname1) .or.
117 & (mgtype .ne. mtype1) .or.
118 & (mdim .ne. dim1) .or.
119 & (smname .ne. smname1) .or.
120 & (setype .ne. setype1) .or.
121 & (snnode .ne. nnode1) .or.
122 & (sncell .ne. ncell1) .or.
123 & (sgtype .ne. sgtype1) .or.
124 & (ncatt .ne. ncatt1) .or.
125 & (profile .ne. profile1) .or.
126 & (nvatt .ne. nvatt1)
128 print *,
'ERROR : information about struct element'
134 if ( (mname .ne. mname2) .or.
135 & (mgtype .ne. mtype2) .or.
136 & (mdim .ne. dim2) .or.
137 & (smname .ne. smname2) .or.
138 & (setype .ne. setype2) .or.
139 & (snnode .ne. nnode2) .or.
140 & (sncell .ne. ncell1) .or.
141 & (sgtype .ne. sgtype2) .or.
142 & (ncatt .ne. ncatt1) .or.
143 & (profile .ne. profile1) .or.
144 & (nvatt .ne. nvatt1)
146 print *,
'ERROR : information about struct element '
152 if ( (mname .ne. mname3) .or.
153 & (mgtype .ne. mtype3) .or.
154 & (mdim .ne. dim3) .or.
155 & (smname .ne. smname2) .or.
156 & (setype .ne. setype3) .or.
157 & (snnode .ne. nnode2) .or.
158 & (sncell .ne. ncell2) .or.
159 & (sgtype .ne. sgtype3) .or.
160 & (ncatt .ne. ncatt1) .or.
161 & (profile .ne. profile1) .or.
162 & (nvatt .ne. nvatt1)
164 print *,
'ERROR : information about struct element'
173 call msesen(fid,mtype1,mname,cret)
174 print *,
'Read struct element name from the type',cret
175 if (cret .ne. 0 )
then
176 print *,
'ERROR : struct element name from the type'
179 if (mname .ne. mname1)
then
180 print *,
'ERROR : struct element name from the type'
184 call msesen(fid,mtype2,mname,cret)
185 print *,
'Read struct element name from the type',cret
186 if (cret .ne. 0 )
then
187 print *,
'ERROR : struct element name from the type'
190 if (mname .ne. mname2)
then
191 print *,
'ERROR : struct element name from the type'
195 call msesen(fid,mtype3,mname,cret)
196 print *,
'Read struct element name from the type',cret
197 if (cret .ne. 0 )
then
198 print *,
'ERROR : struct element name from the type'
201 if (mname .ne. mname3)
then
202 print *,
'ERROR : struct element name from the type'
209 print *,
'Close file',cret
210 if (cret .ne. 0 )
then
211 print *,
'ERROR : close file'