30 character*20 labmpc(*),label,sideload(*)
31 character*132 textpart(16)
33 integer ipompc(*),nodempc(3,*),nmpc,nmpc_,mpcfree,istep,istat,
34 & n,i,j,ii,key,nterm,number,ntrans,ndir,indexe,
35 & mpcfreeold,ikmpc(*),ilmpc(*),id,idof,itr,iline,ipol,inl,
36 & ipoinp(2,*),inp(3,*),ipoinpc(0:*),
37 & k,m,iface,ifacel,nelem,ifaceq(8,6),ifacet(6,4),ifacew(8,5),
38 & loadid,ne,nope,nopes,ipkon(*),nload,nelemload(2,*),kon(*)
40 real*8 coefmpc(*),co(3,*),trab(7,*),a(3,3),x,cg(3)
42 data ifaceq /4,3,2,1,11,10,9,12,
43 & 5,6,7,8,13,14,15,16,
45 & 2,3,7,6,10,19,14,18,
46 & 3,4,8,7,11,20,15,19,
47 & 4,1,5,8,12,17,16,20/
48 data ifacet /1,3,2,7,6,5,
52 data ifacew /1,3,2,9,8,7,0,0,
60 &
'*WARNING reading *EQUATIONF: parameter not recognized:' 62 & textpart(m)(1:index(textpart(m),
' ')-1)
69 &
'*ERROR reading *EQUATIONF: *EQUATIONF should be placed' 70 write(*,*)
' before all step definitions' 75 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
77 if((istat.lt.0).or.(key.eq.1))
return 78 read(textpart(1)(1:10),
'(i10)',iostat=istat) nterm
81 if(nmpc.gt.nmpc_)
then 82 write(*,*)
'*ERROR reading *EQUATIONF: increase nmpc_' 91 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
93 if((istat.lt.0).or.(key.eq.1))
then 94 write(*,*)
'*ERROR reading *EQUATIONF: mpc definition ',
96 write(*,*)
' is not complete. ' 104 read(textpart((i-1)*4+1)(1:10),
'(i10)',iostat=istat)nelem
105 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
107 if((nelem.gt.ne).or.(nelem.le.0))
then 108 write(*,*)
'*ERROR reading *EQUATIONF:' 109 write(*,*)
' element ',nelem,
' is not defined' 113 read(textpart((i-1)*4+2)(2:2),
'(i1)',iostat=istat)
115 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
117 iface=10*nelem+ifacel
119 read(textpart((i-1)*4+3)(1:10),
'(i10)',iostat=istat) ndir
120 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
123 elseif(ndir.eq.4)
then 124 write(*,*)
'*ERROR in equationfs: an equation' 125 write(*,*)
' on DOF 4 is not allowed' 127 elseif(ndir.eq.5)
then 128 write(*,*)
'*ERROR in equationfs: an equation' 129 write(*,*)
' on DOF 5 is not allowed' 131 elseif(ndir.eq.6)
then 132 write(*,*)
'*ERROR in equationfs: an equation' 133 write(*,*)
' on DOF 6 is not allowed' 135 elseif(ndir.eq.8)
then 137 elseif(ndir.eq.11)
then 140 write(*,*)
'*ERROR reading *EQUATIONF:' 141 write(*,*)
' direction',ndir,
' is not defined' 145 read(textpart((i-1)*4+4)(1:20),
'(f20.0)',iostat=istat) x
146 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
155 write(label(2:2),
'(i1)') ifacel
161 itr=nelemload(2,loadid)
165 if((itr.eq.0).or.(ndir.eq.0).or.(ndir.eq.4))
then 166 nodempc(1,mpcfree)=iface
167 nodempc(2,mpcfree)=ndir
173 idof=-(8*(iface-1)+ndir)
174 call nident(ikmpc,idof,nmpc-1,id)
176 if(ikmpc(id).eq.idof)
then 178 & (ikmpc(id))/8+1,ikmpc(id)-8*((ikmpc(id))/8)
191 mpcfree=nodempc(3,mpcfree)
192 if(mpcfree.eq.0)
then 194 &
'*ERROR reading *EQUATIONF: increase memmpc_' 203 if(lakon(nelem)(4:4).eq.
'8')
then 206 elseif(lakon(nelem)(4:4).eq.
'4')
then 209 elseif(lakon(nelem)(4:4).eq.
'6')
then 229 & co(j,kon(indexe+ifaceq(k,ifacel)))
232 elseif(nope.eq.4)
then 236 & co(j,kon(indexe+ifacet(k,ifacel)))
243 & co(j,kon(indexe+ifacew(k,ifacel)))
267 if(number.gt.3) number=1
268 idof=-(8*(iface-1)+number)
269 call nident(ikmpc,idof,nmpc-1,id)
271 if(ikmpc(id).eq.idof)
then 275 if(dabs(a(number,ndir)).lt.1.d-5) cycle
280 &
'*ERROR reading *EQUATIONF: MPC on face' 281 write(*,*) ifacel,
' of element',nelem
282 write(*,*)
' in transformed coordinates' 283 write(*,*)
' cannot be converted in MPC: all' 284 write(*,*)
' DOFs in the node are used as' 285 write(*,*)
' dependent nodes in other MPCs' 302 if(number.gt.3) number=1
303 if(dabs(a(number,ndir)).lt.1.d-5) cycle
304 nodempc(1,mpcfree)=iface
305 nodempc(2,mpcfree)=number
306 coefmpc(mpcfree)=x*a(number,ndir)
308 mpcfree=nodempc(3,mpcfree)
309 if(mpcfree.eq.0)
then 311 &
'*ERROR reading *EQUATIONF: increase memmpc_' 321 nodempc(3,mpcfreeold)=0
327 100
format(/,
'*ERROR reading *EQUATIONF: the DOF corresponding to',
328 & /,
'iface ',i1,
' of element',i10,
' in direction',
329 & i5,
' is detected on',
330 & /,
'the dependent side of two different MPC''s')
subroutine getnewline(inpc, textpart, istat, n, key, iline, ipol, inl, ipoinp, inp, ipoinpc)
Definition: getnewline.f:21
subroutine nident(x, px, n, id)
Definition: nident.f:26