35 character*132 textpart(16)
36 character*81 objectset(4,*)
38 integer istep,istat,n,key,i,iline,ipol,inl,ipoinp(2,*),
39 & inp(3,*),ipoinpc(0:*),nener,nobject,k,ipos
41 real*8 rho,stress,rel,abs
44 write(*,*)
'*ERROR reading *CONSTRAINT: *CONSTRAINT 45 &can only be used within a SENSITIVITY STEP' 52 write(*,*)
'*ERROR reading *CONSTRAINT' 53 write(*,*)
' at least 1 objective function' 54 write(*,*)
' must be defined ' 62 write(*,*)
'*ERROR reading *CONSTRAINT' 63 write(*,*)
' more than 1 objective function' 64 write(*,*)
' defined while constraints are ' 65 write(*,*)
' present. Reduce the number of ' 66 write(*,*)
' objectives to 1 or remove all ' 67 write(*,*)
' the constraints ' 74 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
81 if(textpart(1)(1:12).eq.
'DISPLACEMENT')
then 83 objectset(1,nobject)(1:12)=
'DISPLACEMENT' 85 objectset(1,nobject)(k:k)=
' ' 91 read(textpart(2)(1:80),
'(a80)',iostat=istat)
92 & objectset(3,nobject)(1:80)
93 objectset(3,nobject)(81:81)=
' ' 94 ipos=index(objectset(3,nobject),
' ')
95 if(ipos.ne.1) objectset(3,nobject)(ipos:ipos)=
'N' 101 read(textpart(3)(1:2),
'(a2)') consttype
102 if((consttype.ne.
'LE').and.
103 & (consttype.ne.
'GE'))
then 104 write(*,*)
'*ERROR reading *CONSTRAINT' 105 write(*,*)
' type of constraint must be' 106 write(*,*)
' LE or GE' 110 objectset(1,nobject)(19:20)=textpart(3)(1:2)
116 read(textpart(4)(1:20),
'(f20.0)',iostat=istat) rel
117 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
119 objectset(1,nobject)(41:60)=textpart(4)(1:20)
125 read(textpart(5)(1:20),
'(f20.0)',iostat=istat) abs
126 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
129 objectset(1,nobject)(61:80)=textpart(5)(1:20)
135 elseif(textpart(1)(1:14).eq.
'EIGENFREQUENCY')
then 137 objectset(1,nobject)(1:14)=
'EIGENFREQUENCY' 139 objectset(1,nobject)(k:k)=
' ' 145 read(textpart(3)(1:2),
'(a2)') consttype
146 if((consttype.ne.
'LE').and.
147 & (consttype.ne.
'GE'))
then 148 write(*,*)
'*ERROR reading *CONSTRAINT' 149 write(*,*)
' type of constraint must be' 150 write(*,*)
' LE or GE' 154 objectset(1,nobject)(19:20)=textpart(3)(1:2)
159 elseif(textpart(1)(1:4).eq.
'MASS')
then 161 objectset(1,nobject)(1:4)=
'MASS' 163 objectset(1,nobject)(k:k)=
' ' 169 read(textpart(2)(1:80),
'(a80)',iostat=istat)
170 & objectset(3,nobject)(1:80)
171 objectset(3,nobject)(81:81)=
' ' 172 ipos=index(objectset(3,nobject),
' ')
173 if(ipos.ne.1) objectset(3,nobject)(ipos:ipos)=
'E' 179 read(textpart(3)(1:2),
'(a2)') consttype
180 if((consttype.ne.
'LE').and.
181 & (consttype.ne.
'GE'))
then 182 write(*,*)
'*ERROR reading *CONSTRAINT' 183 write(*,*)
' type of constraint must be' 184 write(*,*)
' LE or GE' 188 objectset(1,nobject)(19:20)=textpart(3)(1:2)
194 read(textpart(4)(1:20),
'(f20.0)',iostat=istat) rel
195 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
197 objectset(1,nobject)(41:60)=textpart(4)(1:20)
203 read(textpart(5)(1:20),
'(f20.0)',iostat=istat) abs
204 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
207 objectset(1,nobject)(61:80)=textpart(5)(1:20)
213 elseif(textpart(1)(1:11).eq.
'SHAPEENERGY')
then 215 objectset(1,nobject)(1:11)=
'SHAPEENERGY' 217 objectset(1,nobject)(k:k)=
' ' 223 read(textpart(2)(1:80),
'(a80)',iostat=istat)
224 & objectset(3,nobject)(1:80)
225 objectset(3,nobject)(81:81)=
' ' 226 ipos=index(objectset(3,nobject),
' ')
227 if(ipos.ne.1) objectset(3,nobject)(ipos:ipos)=
'E' 234 read(textpart(3)(1:2),
'(a2)') consttype
235 if((consttype.ne.
'LE').and.
236 & (consttype.ne.
'GE'))
then 237 write(*,*)
'*ERROR reading *CONSTRAINT' 238 write(*,*)
' type of constraint must be' 239 write(*,*)
' LE or GE' 243 objectset(1,nobject)(19:20)=textpart(3)(1:2)
249 read(textpart(4)(1:20),
'(f20.0)',iostat=istat) rel
250 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
252 objectset(1,nobject)(41:60)=textpart(4)(1:20)
258 read(textpart(5)(1:20),
'(f20.0)',iostat=istat) abs
259 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
262 objectset(1,nobject)(61:80)=textpart(5)(1:20)
268 elseif(textpart(1)(1:6).eq.
'STRESS')
then 270 objectset(1,nobject)(1:6)=
'STRESS' 272 objectset(1,nobject)(k:k)=
' ' 278 read(textpart(2)(1:80),
'(a80)',iostat=istat)
279 & objectset(3,nobject)(1:80)
280 objectset(3,nobject)(81:81)=
' ' 281 ipos=index(objectset(3,nobject),
' ')
282 if(ipos.ne.1) objectset(3,nobject)(ipos:ipos)=
'N' 288 read(textpart(3)(1:2),
'(a2)') consttype
289 if((consttype.ne.
'LE').and.
290 & (consttype.ne.
'GE'))
then 291 write(*,*)
'*ERROR reading *CONSTRAINT' 292 write(*,*)
' type of constraint must be' 293 write(*,*)
' LE or GE' 297 objectset(1,nobject)(19:20)=textpart(3)(1:2)
303 read(textpart(4)(1:20),
'(f20.0)',iostat=istat) rel
304 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
306 objectset(1,nobject)(41:60)=textpart(4)(1:20)
312 read(textpart(5)(1:20),
'(f20.0)',iostat=istat) abs
313 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
316 objectset(1,nobject)(61:80)=textpart(5)(1:20)
323 read(textpart(6)(1:20),
'(f20.0)',iostat=istat) rho
324 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
327 write(*,*)
'*ERROR reading *OBJECTIVE' 328 write(*,*)
' first Kreisselmeier-Steinhauser' 329 write(*,*)
' parameter rho cannot be less' 334 objectset(2,nobject)(41:60)=textpart(6)(1:20)
340 read(textpart(7)(1:20),
'(f20.0)',iostat=istat) stress
341 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
343 if(stress.le.0.d0)
then 344 write(*,*)
'*ERROR reading *OBJECTIVE' 345 write(*,*)
' the target stress in the' 346 write(*,*)
' Kreisselmeier-Steinhauser function' 347 write(*,*)
' must be strictly positive' 351 objectset(2,nobject)(61:80)=textpart(7)(1:20)
356 elseif(textpart(1)(1:9).eq.
'THICKNESS')
then 358 objectset(1,nobject)(1:9)=
'THICKNESS' 360 objectset(1,nobject)(k:k)=
' ' 366 read(textpart(2)(1:80),
'(a80)',iostat=istat)
367 & objectset(3,nobject)(1:80)
368 objectset(3,nobject)(81:81)=
' ' 369 ipos=index(objectset(3,nobject),
' ')
370 if(ipos.ne.1) objectset(3,nobject)(ipos:ipos)=
'N' 376 read(textpart(3)(1:2),
'(a2)') consttype
377 if((consttype.ne.
'LE').and.
378 & (consttype.ne.
'GE'))
then 379 write(*,*)
'*ERROR reading *CONSTRAINT' 380 write(*,*)
' type of constraint must be' 381 write(*,*)
' LE or GE' 385 objectset(1,nobject)(19:20)=textpart(3)(1:2)
391 read(textpart(4)(1:80),
'(a80)',iostat=istat)
392 & objectset(4,nobject)(1:80)
393 objectset(4,nobject)(81:81)=
' ' 394 ipos=index(objectset(4,nobject),
' ')
395 if(ipos.ne.1) objectset(4,nobject)(ipos:ipos)=
'N' 401 read(textpart(5)(1:20),
'(f20.0)',iostat=istat) abs
402 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
405 write(*,*)
'*ERROR reading *OBJECTIVE' 406 write(*,*)
' the acceptable wall thickness' 407 write(*,*)
' value must be strictly positive' 411 objectset(1,nobject)(61:80)=textpart(5)(1:20)
414 write(*,*)
'*ERROR reading *CONSTRAINT' 415 write(*,*)
' constraint function not known' 420 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
421 & ipoinp,inp,ipoinpc)
422 if((istat.lt.0).or.(key.eq.1))
exit subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21