Go to the source code of this file.
|
subroutine | distattach (xig, etg, pneigh, pnode, a, p, ratio, nterms) |
|
◆ distattach()
subroutine distattach |
( |
real*8, intent(in) |
xig, |
|
|
real*8, intent(in) |
etg, |
|
|
real*8, dimension(3,*), intent(in) |
pneigh, |
|
|
real*8, dimension(3), intent(in) |
pnode, |
|
|
real*8, intent(inout) |
a, |
|
|
real*8, dimension(3), intent(inout) |
p, |
|
|
real*8, dimension(9), intent(inout) |
ratio, |
|
|
integer, intent(in) |
nterms |
|
) |
| |
30 real*8 ratio(9),pneigh(3,*),pnode(3),a,xi,et,xig,etg,p(3),
31 & xip,xim,etp,etm,xim2,etm2,a2,xi2,et2
33 intent(in) xig,etg,pneigh,pnode,nterms
35 intent(inout) ratio,a,p
38 if(xig+etg.le.0.d0)
then 39 ratio(2)=(xig+1.d0)/2.d0
40 ratio(3)=(etg+1.d0)/2.d0
42 ratio(2)=(1.d0-etg)/2.d0
43 ratio(3)=(1.d0-xig)/2.d0
45 ratio(1)=1.d0-ratio(2)-ratio(3)
46 elseif(nterms.eq.4)
then 55 elseif(nterms.eq.6)
then 56 if(xig+etg.le.0.d0)
then 68 ratio(2)=xi*(xi2-1.d0)
69 ratio(3)=et*(et2-1.d0)
73 elseif(nterms.eq.8)
then 86 ratio(1)=xim*etm*(-xig-etp)
87 ratio(2)=xip*etm*(xig-etp)
88 ratio(3)=xip*etp*(xig-etm)
89 ratio(4)=xim*etp*(-xig-etm)
91 write(*,*)
'*ERROR in distattach: case with ',nterms
92 write(*,*)
' terms is not covered' 101 p(i)=p(i)+ratio(j)*pneigh(i,j)
107 a=(pnode(1)-p(1))**2+(pnode(2)-p(2))**2+(pnode(3)-p(3))**2