34 character*1 type,typeboun(*)
36 character*20 labmpc(*),label,sideload(*)
38 integer nodeboun(*),ndirboun(*),is,ie,nboun,nboun_,i,j,
39 & iamboun(*),iamplitude,nam,ipompc(*),nodempc(3,*),nmpc,nmpc_,
40 & mpcfree,ntrans,ikboun(*),ilboun(*),ikmpc(*),ipkon(*),indexe,
41 & ilmpc(*),itr,idof,newnode,number,id,idofnew,idnew,nk,nk_,
42 & mpcfreenew,nmethod,iperturb,ii,mi(*),three,kflag,
43 & iy(3),inumber,iface,nload,nelemload(2,*),nopes,kon(*),nope,
44 & nelem,loadid,ifacel,ifaceq(8,6),ifacet(6,4),ifacew(8,5)
46 real*8 xboun(*),val,coefmpc(*),trab(7,*),a(3,3),co(3,*),cg(3),
47 & vold(0:mi(2),*),dx(3),xload(2,*)
49 data ifaceq /4,3,2,1,11,10,9,12,
50 & 5,6,7,8,13,14,15,16,
52 & 2,3,7,6,10,19,14,18,
53 & 3,4,8,7,11,20,15,19,
54 & 4,1,5,8,12,17,16,20/
55 data ifacet /1,3,2,7,6,5,
59 data ifacew /1,3,2,9,8,7,0,0,
68 nelem=int(iface/10.d0)
71 write(label(2:2),
'(i1)') ifacel
77 itr=nelemload(2,loadid)
82 if((itr.eq.0).or.(ii.eq.0).or.(ii.eq.11).or.(ii.eq.8))
then 89 write(*,*)
'*ERROR in bounaddf: a boundary condition' 90 write(*,*)
' on DOF 4 is not allowed' 93 write(*,*)
'*ERROR in bounaddf: a boundary condition' 94 write(*,*)
' on DOF 5 is not allowed' 97 write(*,*)
'*ERROR in bounaddf: a boundary condition' 98 write(*,*)
' on DOF 6 is not allowed' 102 elseif(ii.eq.11)
then 105 write(*,*)
'*ERROR in bounadd: unknown DOF: ',
109 idof=-(8*(iface-1)+i)
110 call nident(ikboun,idof,nboun,id)
112 if(ikboun(id).eq.idof)
then 114 if(typeboun(j).ne.type) cycle loop
116 if(nam.gt.0) iamboun(j)=iamplitude
122 if(nboun.gt.nboun_)
then 123 write(*,*)
'*ERROR in bounadd: increase nboun_' 126 if((nmethod.eq.4).and.(iperturb.le.1))
then 127 write(*,*)
'*ERROR in bounadd: in a modal dynamic step' 128 write(*,*)
' new SPCs are not allowed' 131 nodeboun(nboun)=iface
135 if(nam.gt.0) iamboun(nboun)=iamplitude
140 ikboun(j)=ikboun(j-1)
141 ilboun(j)=ilboun(j-1)
152 if(lakon(nelem)(4:4).eq.
'8')
then 155 elseif(lakon(nelem)(4:4).eq.
'4')
then 158 elseif(lakon(nelem)(4:4).eq.
'6')
then 177 cg(j)=cg(j)+co(j,kon(indexe+ifaceq(i,ifacel)))
180 elseif(nope.eq.4)
then 183 cg(j)=cg(j)+co(j,kon(indexe+ifacet(i,ifacel)))
189 cg(j)=cg(j)+co(j,kon(indexe+ifacew(i,ifacel)))
204 write(*,*)
'*ERROR in bounaddf: a boundary condition' 205 write(*,*)
' on DOF 4 is not allowed' 208 write(*,*)
'*ERROR in bounaddf: a boundary condition' 209 write(*,*)
' on DOF 5 is not allowed' 212 write(*,*)
'*ERROR in bounaddf: a boundary condition' 213 write(*,*)
' on DOF 6 is not allowed' 217 elseif(ii.eq.11)
then 220 write(*,*)
'*ERROR in bounadd: unknown DOF: ',
224 if(int(xload(1,loadid)).ne.0)
then 225 newnode=int(xload(1,loadid))
226 idofnew=8*(newnode-1)+i
227 call nident(ikboun,idofnew,nboun,idnew)
229 if(ikboun(idnew).eq.idofnew)
then 231 if(typeboun(j).ne.type) cycle
233 if(nam.gt.0) iamboun(j)=iamplitude
241 if((nmethod.eq.4).and.(iperturb.le.1))
then 242 write(*,*)
'*ERROR in bounadd: in a modal dynamic step' 243 write(*,*)
' new SPCs are not allowed' 248 write(*,*)
'*ERROR in bounadd: increase nk_' 252 xload(1,loadid)=newnode+0.5d0
253 idofnew=8*(newnode-1)+i
267 call dsort(dx,iy,three,kflag)
270 idof=-(8*(iface-1)+number)
271 call nident(ikmpc,idof,nmpc,id)
273 if(ikmpc(id).eq.idof) cycle
275 if(dabs(a(number,i)).lt.1.d-5) cycle
277 if(nmpc.gt.nmpc_)
then 278 write(*,*)
'*ERROR in bounadd: increase nmpc_' 281 labmpc(nmpc)=
'FLUIDSPC ' 296 if(inumber.gt.3) inumber=1
298 if(dabs(a(number,i)).lt.1.d-30) cycle
299 nodempc(1,mpcfree)=iface
300 nodempc(2,mpcfree)=number
301 coefmpc(mpcfree)=a(number,i)
302 mpcfree=nodempc(3,mpcfree)
303 if(mpcfree.eq.0)
then 304 write(*,*)
'*ERROR in bounadd: increase memmpc_' 313 nodempc(1,mpcfree)=-(nboun+1)
315 coefmpc(mpcfree)=-1.d0
316 mpcfreenew=nodempc(3,mpcfree)
317 if(mpcfreenew.eq.0)
then 318 write(*,*)
'*ERROR in bounadd: increase nmpc_' 328 if(nboun.gt.nboun_)
then 329 write(*,*)
'*ERROR in bounadd: increase nboun_' 332 nodeboun(nboun)=newnode
336 if(nam.gt.0) iamboun(nboun)=iamplitude
340 do j=nboun,idnew+2,-1
341 ikboun(j)=ikboun(j-1)
342 ilboun(j)=ilboun(j-1)
344 ikboun(idnew+1)=idofnew
345 ilboun(idnew+1)=nboun
subroutine nident(x, px, n, id)
Definition: nident.f:26
subroutine dsort(dx, iy, n, kflag)
Definition: dsort.f:6