29 logical fixed,rottracoupling
31 character*1 type,typeboun(*)
32 character*20 labmpc(*),label
34 integer nodeboun(*),ndirboun(*),node,is,ie,nboun,nboun_,i,j,
35 & iamboun(*),iamplitude,nam,ipompc(*),nodempc(3,*),nmpc,nmpc_,
36 & mpcfree,inotr(2,*),ntrans,ikboun(*),ilboun(*),ikmpc(*),
37 & ilmpc(*),itr,idof,newnode,number,id,idofnew,idnew,nk,nk_,
38 & mpcfreenew,nmethod,iperturb,ii,nodetrue,mi(*),three,kflag,
39 & iy(3),inumber,irotnode(11),irotdof(11)
41 real*8 xboun(*),val,coefmpc(*),trab(7,*),a(3,3),co(3,*),
42 & vold(0:mi(2),*),dx(3)
46 elseif(inotr(1,node).eq.0)
then 55 rottracoupling=.false.
56 if((ie.ge.4).and.(ie.le.6))
then 65 call nident(ikmpc,idof,nmpc,id)
67 if(ikmpc(id).eq.idof)
then 68 if(labmpc(ilmpc(id))(1:14).eq.
'ROTTRACOUPLING')
then 71 & nodempc(1,nodempc(3,ipompc(ilmpc(id))))
73 & nodempc(2,nodempc(3,ipompc(ilmpc(id))))
88 if((itr.eq.0).or.(ii.eq.0).or.(ii.gt.3))
then 92 if(rottracoupling)
then 111 elseif(ii.eq.11)
then 114 write(*,*)
'*ERROR in bounadd: unknown DOF: ',
120 if((fixed).and.(i.lt.5))
then 123 write(*,*)
'*ERROR in bounadd: parameter FIXED cannot' 124 write(*,*)
' be used for rotations' 128 call nident(ikboun,idof,nboun,id)
130 if(ikboun(id).eq.idof)
then 132 if(typeboun(j).ne.type) cycle loop
134 if(nam.gt.0) iamboun(j)=iamplitude
139 if(nboun.gt.nboun_)
then 140 write(*,*)
'*ERROR in bounadd: increase nboun_' 143 if((nmethod.eq.4).and.(iperturb.le.1))
then 144 write(*,*)
'*ERROR in bounadd: in a modal dynamic step' 145 write(*,*)
' new SPCs are not allowed' 152 if(nam.gt.0) iamboun(nboun)=iamplitude
157 ikboun(j)=ikboun(j-1)
158 ilboun(j)=ilboun(j-1)
179 elseif(ii.eq.11)
then 182 write(*,*)
'*ERROR in bounadd: unknown DOF: ',
186 if((fixed).and.(i.lt.5))
then 189 write(*,*)
'*ERROR in bounadd: parameter FIXED cannot' 190 write(*,*)
' be used for rotations' 193 if(inotr(2,node).ne.0)
then 194 newnode=inotr(2,node)
195 idofnew=8*(newnode-1)+i
196 call nident(ikboun,idofnew,nboun,idnew)
198 if(ikboun(idnew).eq.idofnew)
then 201 if(typeboun(j).ne.type) cycle
205 if(nam.gt.0) iamboun(j)=iamplitude
213 if((nmethod.eq.4).and.(iperturb.le.1))
then 214 write(*,*)
'*ERROR in bounadd: in a modal dynamic step' 215 write(*,*)
' new SPCs are not allowed' 220 write(*,*)
'*ERROR in bounadd: increase nk_' 224 inotr(2,node)=newnode
225 idofnew=8*(newnode-1)+i
231 vold(j,newnode)=vold(j,node)
245 call dsort(dx,iy,three,kflag)
248 idof=8*(node-1)+number
249 call nident(ikmpc,idof,nmpc,id)
251 if(ikmpc(id).eq.idof) cycle
253 if(dabs(a(number,i)).lt.1.d-5) cycle
255 if(nmpc.gt.nmpc_)
then 256 write(*,*)
'*ERROR in bounadd: increase nmpc_' 276 if(inumber.gt.3)
then 277 write(*,*)
'*ERROR in bounadd' 278 write(*,*)
' SPC in node',node
279 write(*,*)
' and local direction',ii
280 write(*,*)
' cannot be applied: all' 281 write(*,*)
' degrees of freedom have' 282 write(*,*)
' been used by other MPCs' 283 write(*,*)
' or the coefficient is' 284 write(*,*)
' too small' 291 if(inumber.gt.3) inumber=1
294 if(dabs(a(number,i)).lt.1.d-30) cycle
295 nodempc(1,mpcfree)=node
296 nodempc(2,mpcfree)=number
297 coefmpc(mpcfree)=a(number,i)
298 mpcfree=nodempc(3,mpcfree)
299 if(mpcfree.eq.0)
then 300 write(*,*)
'*ERROR in bounadd: increase memmpc_' 304 nodempc(1,mpcfree)=newnode
306 coefmpc(mpcfree)=-1.d0
307 mpcfreenew=nodempc(3,mpcfree)
308 if(mpcfreenew.eq.0)
then 309 write(*,*)
'*ERROR in bounadd: increase nmpc_' 318 if(nboun.gt.nboun_)
then 319 write(*,*)
'*ERROR in bounadd: increase nboun_' 322 nodeboun(nboun)=newnode
326 if(nam.gt.0) iamboun(nboun)=iamplitude
330 do j=nboun,idnew+2,-1
331 ikboun(j)=ikboun(j-1)
332 ilboun(j)=ilboun(j-1)
334 ikboun(idnew+1)=idofnew
335 ilboun(idnew+1)=nboun
subroutine nident(x, px, n, id)
Definition: nident.f:26
subroutine dsort(dx, iy, n, kflag)
Definition: dsort.f:6