Go to the source code of this file.
◆ distattachline()
subroutine distattachline |
( |
real*8 |
xig, |
|
|
real*8 |
etg, |
|
|
real*8, dimension(3,*) |
pneigh, |
|
|
real*8, dimension(3) |
pnode, |
|
|
real*8, intent(inout) |
dist, |
|
|
integer |
nterms, |
|
|
real*8, dimension(3) |
xn |
|
) |
| |
32 real*8 ratio(8),pneigh(3,*),pnode(3),
dist,xi,et,xig,etg,p(3),
33 & xn(3),coeff,etm2,xim2,etm,xim,etp,xip,a2,et2,xi2,a
35 intent(in)xig,etg,pneigh,pnode,nterms,xn
40 if(xig+etg.le.0.d0)
then 41 ratio(2)=(xig+1.d0)/2.d0
42 ratio(3)=(etg+1.d0)/2.d0
44 ratio(2)=(1.d0-etg)/2.d0
45 ratio(3)=(1.d0-xig)/2.d0
47 ratio(1)=1.d0-ratio(2)-ratio(3)
48 elseif(nterms.eq.4)
then 57 elseif(nterms.eq.6)
then 58 if(xig+etg.le.0.d0)
then 70 ratio(2)=xi*(xi2-1.d0)
71 ratio(3)=et*(et2-1.d0)
75 elseif(nterms.eq.8)
then 88 ratio(1)=xim*etm*(-xig-etp)
89 ratio(2)=xip*etm*(xig-etp)
90 ratio(3)=xip*etp*(xig-etm)
91 ratio(4)=xim*etp*(-xig-etm)
93 write(*,*)
'*ERROR in distattach: case with ',nterms
94 write(*,*)
' terms is not covered' 103 p(i)=p(i)+ratio(j)*pneigh(i,j)
111 coeff=coeff+xn(i)*(p(i)-pnode(i))
113 dist=(p(1)-pnode(1)-coeff*xn(1))**2+(p(2)-pnode(2)-
114 & coeff*xn(2))**2+(p(3)-pnode(3)-coeff*xn(3))**2
static double * dist
Definition: radflowload.c:42