30 character*20 labmpc(*)
31 character*81 set(*),elset,noset
32 character*132 textpart(16)
34 integer ipompc(*),nodempc(3,*),nmpc,nmpc_,mpcfree,istep,istat,
36 & mpcfreeold,ikmpc(*),ilmpc(*),id,idof,iline,ipol,inl,
37 & ipoinp(2,*),inp(3,*),ipoinpc(0:*),irefnode,
38 & k,ipos,kon(*),ipkon(*),nset,idir,newmpc,
39 & istartset(*),iendset(*),ialset(*),indexm,ielem
41 real*8 coefmpc(*),co(3,*),weight,totweight
45 if(textpart(i)(1:6).eq.
'ELSET=')
then 46 elset=textpart(i)(7:86)
51 write(*,*)
'*WARNING reading *DISTRIBUTING COUPLING:' 52 write(*,*)
' parameter not recognized:' 54 & textpart(i)(1:index(textpart(i),
' ')-1)
56 &
"*DISTRIBUTING COUPLING%")
60 if(elset(1:1).eq.
' ')
then 61 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 62 write(*,*)
' no element set given' 64 &
"*DISTRIBUTING COUPLING%")
70 if(set(i).eq.elset)
exit 73 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 74 write(*,*)
' element set ',elset(1:ipos-1),
82 if(istartset(i).ne.iendset(i))
then 83 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 84 write(*,*)
' element set ',elset(1:ipos-1),
85 &
' contains more than one element' 91 ielem=ialset(istartset(i))
92 if(lakon(ielem)(1:7).ne.
'DCOUP3D')
then 93 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 94 write(*,*)
' element ',ielem,
' is not a' 95 write(*,*)
' DCOUP3D element' 101 irefnode=kon(ipkon(ielem)+1)
108 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
109 & ipoinp,inp,ipoinpc)
110 if((istat.lt.0).or.(key.eq.1))
exit 112 read(textpart(1)(1:10),
'(i10)',iostat=istat) node
115 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 116 write(*,*)
' node ',node,
' is not defined' 124 call nident(ikmpc,idof,nmpc,id)
126 if(ikmpc(id).eq.idof)
then 127 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 128 write(*,*)
' dof 1 of node ',node,
135 if(nmpc.gt.nmpc_)
then 136 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 137 write(*,*)
' increase nmpc_' 158 read(textpart(2)(1:20),
'(f20.0)',iostat=istat) weight
159 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
160 &
"*DISTRIBUTING COUPLING%")
161 totweight=totweight+weight
165 nodempc(1,mpcfree)=node
167 coefmpc(mpcfree)=weight
168 mpcfree=nodempc(3,mpcfree)
174 read(textpart(1)(1:80),
'(a80)',iostat=istat) noset
175 read(textpart(2)(1:20),
'(f20.0)',iostat=istat) weight
176 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
177 &
"*DISTRIBUTING COUPLING%")
179 ipos=index(noset,
' ')
182 if(set(i).eq.noset)
exit 186 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 187 write(*,*)
' node set ',noset
188 write(*,*)
' has not yet been defined. ' 190 &
"*DISTRIBUTING COUPLING%")
193 do j=istartset(i),iendset(i)
194 if(ialset(j).gt.0)
then 196 totweight=totweight+weight
200 call nident(ikmpc,idof,nmpc,id)
202 if(ikmpc(id).eq.idof)
then 204 &
'*ERROR reading *DISTRIBUTING COUPLING:' 205 write(*,*)
' dof 1 of node ',node,
212 if(nmpc.gt.nmpc_)
then 214 &
'*ERROR reading *DISTRIBUTING COUPLING:' 215 write(*,*)
' increase nmpc_' 236 nodempc(1,mpcfree)=node
238 coefmpc(mpcfree)=weight
239 mpcfree=nodempc(3,mpcfree)
245 if(node.ge.ialset(j-1))
exit 246 totweight=totweight+weight
250 nodempc(1,mpcfree)=node
252 coefmpc(mpcfree)=weight
253 mpcfree=nodempc(3,mpcfree)
262 nodempc(1,mpcfree)=irefnode
264 coefmpc(mpcfree)=-totweight
266 mpcfree=nodempc(3,mpcfree)
267 nodempc(3,mpcfreeold)=0
274 node=nodempc(1,indexm)
277 call nident(ikmpc,idof,nmpc,id)
279 if(ikmpc(id).eq.idof)
then 280 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 281 write(*,*)
' dof',idir,
' of node ',node,
288 if(nmpc.gt.nmpc_)
then 289 write(*,*)
'*ERROR reading *DISTRIBUTING COUPLING:' 290 write(*,*)
' increase nmpc_' 307 nodempc(1,mpcfree)=nodempc(1,indexm)
308 nodempc(2,mpcfree)=idir
309 coefmpc(mpcfree)=coefmpc(indexm)
310 if(nodempc(3,indexm).eq.0)
then 312 mpcfree=nodempc(3,mpcfree)
313 nodempc(3,mpcfreeold)=0
316 mpcfree=nodempc(3,mpcfree)
317 indexm=nodempc(3,indexm)
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