39 logical fixed,composite,beam
41 character*1 type,typeboun(*)
43 character*20 labmpc(*),label
45 integer nk,nk_,iponoel(*),inoel(3,*),iponoelmax,kon(*),ipkon(*),
46 & ne,iponor(2,*),knor(*),rig(*),iperturb,ipompc(*),nodempc(3,*),
47 & nmpc,nmpc_,mpcfree,ikmpc(*),ilmpc(*),ikboun(*),ilboun(*),nboun,
48 & nboun_,nodeboun(*),ndirboun(*),iamboun(*),nam,ntrans,inotr(2,*),
49 & isol,istep,idummy,mi(*),icomposite,ielmat(mi(3),*),nkold,
50 & i,ndepnodes,index,nexp,nnor,nel,ielem,indexe,j,iel(100),idmpc,
51 & jl(100),ial(100),ifi(100),idepnodes(800),indexx,k,l,ifix,nemin,
52 & jact,ixfree,ikfree,node,nelshell,irefnode,idof,id,mpcfreeold,
53 & irotnode,imax,iamplitude,nmethod,ithermal(2),iexpnode,idim
55 real*8 co(3,*),thicke(mi(3),*),offset(2,*),xnor(*),tinc,tper,tmin,
56 & tmax,ctrl(*),coefmpc(*),xboun(*),trab(7,*),vold(0:mi(2),*),
57 & xno(3,100),xta(3,100),xn1(3,100),thl1(100),thl2(100),
58 & off1(100),off2(100),xi,et,coloc6(2,6),coloc8(2,8),xl(3,8),
59 & dd,xnoref(3),dot,coloc3(3),dot1,dot2,dmax,val,coloc2(2),
62 data coloc2 /-1.d0,1.d0/
63 data coloc3 /-1.d0,0.d0,1.d0/
64 data coloc6 /0.d0,0.d0,1.d0,0.d0,0.d0,1.d0,0.5d0,0.d0,
65 & 0.5d0,0.5d0,0.d0,0.5d0/
66 data coloc8 /-1.d0,-1.d0,1.d0,-1.d0,1.d0,1.d0,-1.d0,1.d0,
67 & 0.d0,-1.d0,1.d0,0.d0,0.d0,1.d0,-1.d0,0.d0/
98 if((lakon(ielem)(1:1).ne.
'B').and.
99 & (lakon(ielem)(1:1).ne.
'T'))
then 100 if(lakon(ielem)(1:1).eq.
'S') nnor=1
104 write(*,*)
'*ERROR in gen3dnor: more than 100' 105 write(*,*)
' shell elements share the' 106 write(*,*)
' same node' 112 thl1(nel)=thicke(1,indexe+j)
117 thl1(nel)=thl1(nel)+thicke(k,indexe+j)
120 off1(nel)=offset(1,ielem)
134 indexx=iponor(1,indexe+jl(j))
137 xno(k,j)=xnor(indexx+k)
147 if((lakon(iel(j))(2:2).eq.
'3').or.
148 & (lakon(iel(j))(4:4).eq.
'3'))
then 158 elseif((lakon(iel(j))(2:2).eq.
'4').or.
159 & (lakon(iel(j))(4:4).eq.
'4'))
then 169 elseif((lakon(iel(j))(2:2).eq.
'6').or.
170 & (lakon(iel(j))(4:4).eq.
'6'))
then 180 elseif((lakon(iel(j))(2:2).eq.
'8').or.
181 & (lakon(iel(j))(4:4).eq.
'8'))
then 193 dd=dsqrt(xno(1,j)**2+xno(2,j)**2+xno(3,j)**2)
194 if(dd.lt.1.d-10)
then 195 write(*,*)
'*ERROR in gen3dnor: size of estimated' 196 write(*,*)
' shell normal in node ',i,
198 write(*,*)
' is smaller than 1.e-10' 220 if(ial(j).ne.0) cycle
230 if(iel(j).lt.nemin)
then 236 if(nemin.eq.ne+1)
exit 240 xnoref(j)=xno(j,jact)
252 if(ial(j).eq.2) cycle
256 dot=xno(1,j)*xnoref(1)+xno(2,j)*xnoref(2)+
259 if(dot.gt.0.939693d0)
then 260 if((dabs(thl1(j)-thl1(jact)).lt.1.d-10)
262 & (dabs(off1(j)-off1(jact)).lt.1.d-10)
264 & (lakon(iel(j))(1:1).ne.
'M').and.
265 & (lakon(iel(jact))(1:1).ne.
'M').and.
266 & ((lakon(iel(j))(1:3).eq.lakon(iel(jact))(1:3))
268 & ((lakon(iel(j))(1:1).eq.
'S').and.
269 & (lakon(iel(jact))(1:1).eq.
'S'))))
272 if(dot.lt.0.999962d0) nnor=2
275 if((lakon(iel(j))(1:1).eq.
'S').and.
276 & (lakon(iel(jact))(1:1).eq.
'S'))
then 282 if(dot.gt.-0.999962)
then 285 write(*,*)
'*INFO in gen3dnor: in some 286 & nodes opposite normals are defined' 291 if(dot.gt.0.999962d0)
then 292 if((dabs(thl1(j)-thl1(jact)).lt.1.d-10)
294 & (dabs(off1(j)-off1(jact)).lt.1.d-10)
296 & (lakon(iel(j))(1:1).ne.
'M').and.
297 & (lakon(iel(jact))(1:1).ne.
'M').and.
298 & ((lakon(iel(j))(1:3).eq.lakon(iel(jact))(1:3))
300 & ((lakon(iel(j))(1:1).eq.
'S').and.
301 & (lakon(iel(jact))(1:1).eq.
'S'))))
307 if((lakon(iel(j))(1:1).eq.
'S').and.
308 & (lakon(iel(jact))(1:1).eq.
'S'))
then 314 if(dot.gt.-0.999962)
then 317 write(*,*)
'*INFO in gen3dnor: in some 318 & nodes opposite normals are defined' 335 xnoref(k)=xnoref(k)+xno(k,j)
339 dd=dsqrt(xnoref(1)**2+xnoref(2)**2+xnoref(3)**2)
340 if(dd.lt.1.d-10)
then 341 write(*,*)
'*ERROR in gen3dnor: size of' 342 write(*,*)
' estimated shell normal is' 343 write(*,*)
' smaller than 1.e-10' 347 xnoref(j)=xnoref(j)/dd
354 if(icomposite.eq.1)
then 358 if(ielmat(2,ielem).ne.0)
then 373 iponor(1,ipkon(iel(j))+jl(j))=ixfree
374 elseif(j.ne.jact)
then 375 iponor(1,ipkon(iel(j))+jl(j))=
376 & iponor(1,ipkon(iel(jact))+jl(jact))
378 iponor(2,ipkon(iel(j))+jl(j))=ikfree
387 xnor(ixfree+j)=xnoref(j)
395 write(*,*)
'*ERROR in gen3dnor: increase nk_' 404 if((lakon(iel(jact))(2:2).ne.
'P').and.
405 & (lakon(iel(jact))(2:2).ne.
'A').and.
406 & (lakon(iel(jact))(1:1).ne.
'M'))
then 407 idepnodes(ndepnodes+1)=nk
408 ndepnodes=ndepnodes+1
411 if (lakon(iel(jact))(1:1).ne.
'M')
then 415 idepnodes(ndepnodes+1)=nk
416 ndepnodes=ndepnodes+1
423 & nmpc_,mpcfree,ikmpc,ilmpc,labmpc,nk,
437 write(*,*)
'*ERROR in gen3dnor: increase nk_' 457 if((lakon(ielem)(1:1).eq.
'B').or.
458 & (lakon(ielem)(1:1).eq.
'T'))
then 459 if(lakon(ielem)(1:1).eq.
'B')
then 467 write(*,*)
'*ERROR in gen3dnor: more than 100' 468 write(*,*)
' beam/shell elements share' 469 write(*,*)
' the same node' 475 thl1(nel)=thicke(1,indexe+j)
476 thl2(nel)=thicke(2,indexe+j)
477 off1(nel)=offset(1,ielem)
478 off2(nel)=offset(2,ielem)
483 if(nel.ge.nelshell)
then 492 if((lakon(iel(j))(3:3).eq.
'1').or.
493 & (lakon(iel(j))(4:4).eq.
'2'))
then 509 xta(k,j)=(xl(k,2)-xl(k,1))/2.d0
527 xta(k,j)=(xi-0.5d0)*xl(k,1)-2.d0*xi*xl(k,2)+
532 dd=dsqrt(xta(1,j)**2+xta(2,j)**2+xta(3,j)**2)
533 if(dd.lt.1.d-10)
then 534 write(*,*)
'*ERROR in gen3dnor: size of estimated' 535 write(*,*)
' beam tangent in node ',i,
' element ' 537 write(*,*)
' is smaller than 1.e-10' 547 if(iponor(1,indexe+jl(j)).ge.0)
then 548 indexx=iponor(1,indexe+jl(j))
549 if(dabs(xnor(indexx+4)**2+xnor(indexx+5)**2+
550 & xnor(indexx+6)**2-1.d0).lt.1.d-5)
then 552 xno(k,j)=xnor(indexx+3+k)
559 xn1(k,j)=xnor(indexx+k)
570 xno(1,j)=xta(2,j)*xn1(3,j)-xta(3,j)*xn1(2,j)
571 xno(2,j)=xta(3,j)*xn1(1,j)-xta(1,j)*xn1(3,j)
572 xno(3,j)=xta(1,j)*xn1(2,j)-xta(2,j)*xn1(1,j)
573 dd=dsqrt(xno(1,j)**2+xno(2,j)**2+xno(3,j)**2)
574 if(dd.lt.1.d-10)
then 575 write(*,*)
'*ERROR in gen3dnor: size of estimated' 576 write(*,*)
' beam normal in 2-direction in node ' 577 &,i,
' element ',iel(j)
578 write(*,*)
' is smaller than 1.e-10' 596 if(ial(j).ne.0) cycle
606 if(iel(j).lt.nemin)
then 612 if(nemin.eq.ne+1)
exit 619 xnoref(j)=xno(j,jact)
632 dot1=xno(1,j)*xnoref(1)+xno(2,j)*xnoref(2)+
634 dot2=xta(1,j)*xta(1,jact)+xta(2,j)*xta(2,jact)+
635 & xta(3,j)*xta(3,jact)
637 if((dot1.gt.0.939693d0).and.
638 & (dot2.gt.0.939693d0))
then 639 if((dabs(thl1(j)-thl1(jact)).lt.1.d-10)
641 & (dabs(thl2(j)-thl2(jact)).lt.1.d-10)
643 & (dabs(off1(j)-off1(jact)).lt.1.d-10)
645 & (dabs(off2(j)-off2(jact)).lt.1.d-10)
647 & (lakon(iel(j))(1:1).ne.
'T').and.
648 & (lakon(iel(jact))(1:1).ne.
'T').and.
649 & (lakon(iel(j))(8:8).eq.lakon(iel(jact))(8:8)))
653 if((dot1.gt.0.999962d0).and.
654 & (dot2.gt.0.999962d0))
then 655 if((dabs(thl1(j)-thl1(jact)).lt.1.d-10)
657 & (dabs(thl2(j)-thl2(jact)).lt.1.d-10)
659 & (dabs(off1(j)-off1(jact)).lt.1.d-10)
661 & (dabs(off2(j)-off2(jact)).lt.1.d-10)
663 & (lakon(iel(j))(1:1).ne.
'T').and.
664 & (lakon(iel(jact))(1:1).ne.
'T').and.
665 & (lakon(iel(j))(8:8).eq.lakon(iel(jact))(8:8)))
681 xnoref(k)=xnoref(k)+xno(k,j)
690 if((ial(j).eq.1).and.(j.ne.jact))
then 692 xta(k,jact)=xta(k,jact)+xta(k,j)
696 dd=dsqrt(xta(1,jact)**2+xta(2,jact)**2+xta(3,jact)**2)
697 if(dd.lt.1.d-10)
then 698 write(*,*)
'*ERROR in gen3dnor: size of mean' 699 write(*,*)
' beam tangent is smaller than 1.e-10' 703 xta(k,jact)=xta(k,jact)/dd
709 dd=xnoref(1)*xta(1,jact)+xnoref(2)*xta(2,jact)+
710 & xnoref(3)*xta(3,jact)
712 xnoref(j)=xnoref(j)-dd*xta(j,jact)
714 dd=dsqrt(xnoref(1)**2+xnoref(2)**2+xnoref(3)**2)
715 if(dd.lt.1.d-10)
then 716 write(*,*)
'*ERROR in gen3dnor: size of' 717 write(*,*)
' estimated beam normal is' 718 write(*,*)
' smaller than 1.e-10' 722 xnoref(j)=xnoref(j)/dd
727 xn1(1,jact)=xnoref(2)*xta(3,jact)-xnoref(3)*xta(2,jact)
728 xn1(2,jact)=xnoref(3)*xta(1,jact)-xnoref(1)*xta(3,jact)
729 xn1(3,jact)=xnoref(1)*xta(2,jact)-xnoref(2)*xta(1,jact)
739 iponor(1,ipkon(iel(j))+jl(j))=ixfree
741 iponor(1,ipkon(iel(j))+jl(j))=
742 & iponor(1,ipkon(iel(jact))+jl(jact))
744 iponor(2,ipkon(iel(j))+jl(j))=ikfree
749 xnor(ixfree+j)=xn1(j,jact)
752 xnor(ixfree+3+j)=xnoref(j)
755 if(lakon(iel(jact))(1:1).ne.
'T')
then 762 write(*,*)
'*ERROR in gen3dnor: increase nk_' 766 idepnodes(ndepnodes+k)=nk
768 ndepnodes=ndepnodes+8
777 write(*,*)
'*ERROR in gen3dnor: increase nk_' 789 & -thl1(jact)*xn1(j,jact)*(.5d0+off1(jact))
790 & +thl2(jact)*xnoref(j)*(.5d0-off2(jact))
795 & -thl1(jact)*xn1(j,jact)*(.5d0+off1(jact))
796 & -thl2(jact)*xnoref(j)*(.5d0+off2(jact))
801 & +thl1(jact)*xn1(j,jact)*(.5d0-off1(jact))
802 & -thl2(jact)*xnoref(j)*(.5d0+off2(jact))
807 & +thl1(jact)*xn1(j,jact)*(.5d0-off1(jact))
808 & +thl2(jact)*xnoref(j)*(.5d0-off2(jact))
814 & nmpc_,mpcfree,ikmpc,ilmpc,labmpc,nk,
815 & ithermal,i,nodeboun,ndirboun,ikboun,ilboun,
816 & nboun,nboun_,typeboun,xboun,xta,jact,co,
817 & knor,ntrans,inotr,trab,vold,mi,nmethod,nk_,
818 & nam,iperturb,ikfree,iamboun)
845 if(ithermal(2).ne.2)
then 859 call nident(ikmpc,idof,nmpc,id)
861 if(nmpc.gt.nmpc_)
then 863 &
'*ERROR in rigidmpc: increase nmpc_' 877 nodempc(1,mpcfree)=node
879 coefmpc(mpcfree)=1.d0
880 mpcfree=nodempc(3,mpcfree)
881 nodempc(1,mpcfree)=irefnode
883 coefmpc(mpcfree)=-1.d0
885 mpcfree=nodempc(3,mpcfree)
886 nodempc(3,mpcfreeold)=0
896 write(*,*)
'*ERROR in rigidbodies: increase nk_' 903 write(*,*)
'*ERROR in rigidbodies: increase nk_' 908 call knotmpc(ipompc,nodempc,coefmpc,irefnode,
910 & labmpc,nmpc,nmpc_,mpcfree,ikmpc,ilmpc,nk,nk_,
911 & nodeboun,ndirboun,ikboun,ilboun,nboun,nboun_,
912 & idepnodes,typeboun,co,xboun,istep,k,
913 & ndepnodes,idim,e1,e2,t1)
920 if(ithermal(2).ge.2)
then 924 call nident(ikmpc,idof,nmpc,id)
926 if(nmpc.gt.nmpc_)
then 928 &
'*ERROR in gen3dnor: increase nmpc_' 942 nodempc(1,mpcfree)=node
944 coefmpc(mpcfree)=1.d0
945 mpcfree=nodempc(3,mpcfree)
946 nodempc(1,mpcfree)=irefnode
948 coefmpc(mpcfree)=-1.d0
950 mpcfree=nodempc(3,mpcfree)
951 nodempc(3,mpcfreeold)=0
955 if((nnor.eq.1).and.(ithermal(2).ne.2))
then 964 if(dabs(xnoref(j)).gt.dmax)
then 972 if(dabs(1.d0-dmax).lt.1.d-3)
then 974 if(nam.gt.0) iamplitude=0
981 call nident(ikmpc,idof,nmpc,idmpc)
983 if((idmpc.le.0).or.(ikmpc(idmpc).ne.idof))
then 984 call bounadd(irotnode,imax,imax,val,nodeboun,
985 & ndirboun,xboun,nboun,nboun_,iamboun,
986 & iamplitude,nam,ipompc,nodempc,coefmpc,
987 & nmpc,nmpc_,mpcfree,inotr,trab,ntrans,
988 & ikboun,ilboun,ikmpc,ilmpc,co,nk,nk_,labmpc,
989 &
type,typeboun,nmethod,iperturb,fixed,vold,
1000 call nident(ikboun,idof,nboun,id)
1001 call nident(ikmpc,idof,nmpc,idmpc)
1002 if(((idmpc.gt.0).and.(ikmpc(idmpc).eq.idof)).or.
1003 & ((id.gt.0).and.(ikboun(id).eq.idof)).or.
1004 & (dabs(xnoref(imax)).lt.1.d-2))
then 1008 if(imax.gt.3) imax=imax-3
1021 idof=8*(irotnode-1)+imax
1022 call nident(ikmpc,idof,nmpc,id)
1024 if(nmpc.gt.nmpc_)
then 1026 &
'*ERROR in gen3dnor: increase nmpc_' 1030 ipompc(nmpc)=mpcfree
1040 nodempc(1,mpcfree)=irotnode
1041 nodempc(2,mpcfree)=imax
1042 coefmpc(mpcfree)=xnoref(imax)
1043 mpcfree=nodempc(3,mpcfree)
1045 if(imax.gt.3) imax=imax-3
1046 nodempc(1,mpcfree)=irotnode
1047 nodempc(2,mpcfree)=imax
1048 coefmpc(mpcfree)=xnoref(imax)
1049 mpcfree=nodempc(3,mpcfree)
1051 if(imax.gt.3) imax=imax-3
1052 nodempc(1,mpcfree)=irotnode
1053 nodempc(2,mpcfree)=imax
1054 coefmpc(mpcfree)=xnoref(imax)
1056 mpcfree=nodempc(3,mpcfree)
1057 nodempc(3,mpcfreeold)=0
subroutine knotmpc(ipompc, nodempc, coefmpc, irefnode, irotnode, iexpnode, labmpc, nmpc, nmpc_, mpcfree, ikmpc, ilmpc, nk, nk_, nodeboun, ndirboun, ikboun, ilboun, nboun, nboun_, idepnodes, typeboun, co, xboun, istep, k, ndepnodes, idim, e1, e2, t1)
Definition: knotmpc.f:24
#define max(a, b)
Definition: cascade.c:32
subroutine gen3dtruss(ipompc, nodempc, coefmpc, nmpc, nmpc_, mpcfree, ikmpc, ilmpc, labmpc, nk, ithermal, i, nodeboun, ndirboun, ikboun, ilboun, nboun, nboun_, typeboun, xboun, xta, jact, co, knor, ntrans, inotr, trab, vold, mi, nmethod, nk_, nam, iperturb, indexk, iamboun)
Definition: gen3dtruss.f:24
subroutine norshell8(xi, et, xl, xnor)
Definition: norshell8.f:20
subroutine norshell4(xi, et, xl, xnor)
Definition: norshell4.f:20
subroutine gen3membrane(ipompc, nodempc, coefmpc, nmpc, nmpc_, mpcfree, ikmpc, ilmpc, labmpc, nk, ithermal, i)
Definition: gen3dmembrane.f:21
subroutine norshell6(xi, et, xl, xnor)
Definition: norshell6.f:20
subroutine nident(x, px, n, id)
Definition: nident.f:26
subroutine bounadd(node, is, ie, val, nodeboun, ndirboun, xboun, nboun, nboun_, iamboun, iamplitude, nam, ipompc, nodempc, coefmpc, nmpc, nmpc_, mpcfree, inotr, trab, ntrans, ikboun, ilboun, ikmpc, ilmpc, co, nk, nk_, labmpc, type, typeboun, nmethod, iperturb, fixed, vold, nodetrue, mi, label)
Definition: bounadd.f:24
subroutine norshell3(xi, et, xl, xnor)
Definition: norshell3.f:20