31 character*20 labmpc(*)
32 character*81 set(*),noset
33 character*132 textpart(16)
35 integer ipompc(*),nodempc(3,*),nmpc,nmpc_,mpcfree,istep,istat,
36 & n,i,j,ii,key,nterm,number,nk,inotr(2,*),ntrans,node,ndir,
37 & mpcfreeold,ikmpc(*),ilmpc(*),id,idof,itr,iline,ipol,inl,
38 & ipoinp(2,*),inp(3,*),ipoinpc(0:*),impcstart,impcend,i1,
39 & istartset(*),iendset(*),ialset(*),nset,k,l,m,index1,ipos,
40 & impc,nodempcref(3,*),ikmpcref(*),memmpcref_,mpcfreeref,
41 & maxlenmpcref,memmpc_,maxlenmpc
43 real*8 coefmpc(*),co(3,*),trab(7,*),a(3,3),x,coefmpcref(*)
46 if(textpart(m)(1:9).eq.
'REMOVEALL')
then 49 write(*,*)
'*ERROR reading *EQUATION' 50 write(*,*)
' removing equations is not allowed' 51 write(*,*)
' in the first step' 59 if(nodempc(3,index1).eq.0)
then 60 nodempc(3,index1)=mpcfree
64 index1=nodempc(3,index1)
71 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
74 elseif(textpart(m)(1:6).eq.
'REMOVE')
then 77 write(*,*)
'*ERROR reading *EQUATION' 78 write(*,*)
' removing equations is not allowed' 79 write(*,*)
' in the first step' 84 if(ikmpcref(i).ne.ikmpc(i))
then 85 write(*,*)
'*ERROR reading *EQUATION' 86 write(*,*)
' The dependent terms in some' 87 write(*,*)
' of the nonlinear equations have' 88 write(*,*)
' changed since the start of the' 89 write(*,*)
' calculation. Removing equations' 90 write(*,*)
' does not work' 100 maxlenmpc=maxlenmpcref
105 nodempc(j,i)=nodempcref(j,i)
107 coefmpc(i)=coefmpcref(i)
111 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
112 & ipoinp,inp,ipoinpc)
113 if((istat.lt.0).or.(key.eq.1))
return 115 read(textpart(2)(1:10),
'(i10)',iostat=istat) impcstart
116 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
119 if(textpart(3)(1:1).eq.
' ')
then 122 read(textpart(3)(1:10),
'(i10)',iostat=istat) impcend
123 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
127 read(textpart(1)(1:10),
'(i10)',iostat=istat) l
129 if((l.gt.nk).or.(l.le.0))
then 130 write(*,*)
'*ERROR reading *BOUNDARY:' 131 write(*,*)
' node ',l,
' is not defined' 134 do i1=impcstart,impcend
136 call nident(ikmpc,idof,nmpc,id)
138 if(ikmpc(id).eq.idof)
then 140 call mpcrem(impc,mpcfree,nodempc,nmpc,
141 & ikmpc,ilmpc,labmpc,coefmpc,ipompc)
146 &
'*WARNING reading *EQUATION: MPC to remove' 147 write(*,*)
' is not defined; node:',l
148 write(*,*)
' degree of freedom:',i1
151 read(textpart(1)(1:80),
'(a80)',iostat=istat) noset
153 ipos=index(noset,
' ')
156 if(set(i).eq.noset)
exit 160 write(*,*)
'*ERROR reading *BOUNDARY: node set ',
162 write(*,*)
' has not yet been defined. ' 167 do j=istartset(i),iendset(i)
168 if(ialset(j).gt.0)
then 170 do i1=impcstart,impcend
172 call nident(ikmpc,idof,nmpc,id)
174 if(ikmpc(id).eq.idof)
then 176 call mpcrem(impc,mpcfree,nodempc,
177 & nmpc,ikmpc,ilmpc,labmpc,coefmpc,
183 &
'*WARNING reading *EQUATION: MPC to remove' 184 write(*,*)
' is not defined; node:',k
185 write(*,*)
' degree of freedom:',i1
191 if(k.ge.ialset(j-1))
exit 192 do i1=impcstart,impcend
194 call nident(ikmpc,idof,nmpc,id)
196 if(ikmpc(id).eq.idof)
then 199 & nodempc,nmpc,ikmpc,ilmpc,labmpc,
205 &
'*WARNING reading *EQUATION: MPC to remove' 207 &
' is not defined; node:',k
208 write(*,*)
' degree of freedom:',i1
218 &
'*WARNING reading *EQUATION: parameter not recognized:' 220 & textpart(m)(1:index(textpart(m),
' ')-1)
228 &
'*ERROR reading *EQUATION: *EQUATION should be placed' 229 write(*,*)
' before all step definitions' 234 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
235 & ipoinp,inp,ipoinpc)
236 if((istat.lt.0).or.(key.eq.1))
return 237 read(textpart(1)(1:10),
'(i10)',iostat=istat) nterm
240 if(nmpc.gt.nmpc_)
then 241 write(*,*)
'*ERROR reading *EQUATION: increase nmpc_' 250 call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
251 & ipoinp,inp,ipoinpc)
252 if((istat.lt.0).or.(key.eq.1))
then 253 write(*,*)
'*ERROR reading *EQUATION: mpc definition ',
255 write(*,*)
' is not complete. ' 263 read(textpart((i-1)*3+1)(1:10),
'(i10)',iostat=istat) node
264 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
266 if((node.gt.nk).or.(node.le.0))
then 267 write(*,*)
'*ERROR reading *EQUATION:' 268 write(*,*)
' node ',node,
' is not defined' 272 read(textpart((i-1)*3+2)(1:10),
'(i10)',iostat=istat) ndir
273 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
282 elseif(ndir.eq.8)
then 284 elseif(ndir.eq.11)
then 287 write(*,*)
'*ERROR reading *EQUATION:' 288 write(*,*)
' direction',ndir,
' is not defined' 292 read(textpart((i-1)*3+3)(1:20),
'(f20.0)',iostat=istat) x
293 if(istat.gt.0)
call inputerror(inpc,ipoinpc,iline,
300 elseif(inotr(1,node).eq.0)
then 306 if((itr.eq.0).or.(ndir.eq.0).or.(ndir.eq.4))
then 307 nodempc(1,mpcfree)=node
308 nodempc(2,mpcfree)=ndir
315 call nident(ikmpc,idof,nmpc-1,id)
317 if(ikmpc(id).eq.idof)
then 319 & (ikmpc(id))/8+1,ikmpc(id)-8*((ikmpc(id))/8)
332 mpcfree=nodempc(3,mpcfree)
333 if(mpcfree.eq.0)
then 335 &
'*ERROR reading *EQUATION: increase memmpc_' 352 if(number.gt.3) number=1
353 idof=8*(node-1)+number
354 call nident(ikmpc,idof,nmpc-1,id)
356 if(ikmpc(id).eq.idof)
then 360 if(dabs(a(number,ndir)).lt.1.d-5) cycle
365 &
'*ERROR reading *EQUATION: SPC in node' 366 write(*,*) node,
' in transformed coordinates' 367 write(*,*)
' cannot be converted in MPC: all' 368 write(*,*)
' DOFs in the node are used as' 369 write(*,*)
' dependent nodes in other MPCs' 386 if(number.gt.3) number=1
387 if(dabs(a(number,ndir)).lt.1.d-5) cycle
388 nodempc(1,mpcfree)=node
389 nodempc(2,mpcfree)=number
390 coefmpc(mpcfree)=x*a(number,ndir)
392 mpcfree=nodempc(3,mpcfree)
393 if(mpcfree.eq.0)
then 395 &
'*ERROR reading *EQUATION: increase memmpc_' 405 nodempc(3,mpcfreeold)=0
411 100
format(/,
'*ERROR reading *EQUATION: the DOF corresponding to',
412 & /,
'node ',i10,
' in direction',i1,
' is detected on',
413 & /,
'the dependent side of two different MPC''s')
subroutine mpcrem(i, mpcfree, nodempc, nmpc, ikmpc, ilmpc, labmpc, coefmpc, ipompc)
Definition: mpcrem.f:21
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