29 integer nterms,i,j,iy,kflag,n
31 real*8 ratio(20),pneigh(3,*),pnode(3),a,xi,et,xig,etg,p(3),
32 & dummy,ze,zeg,omg,omh,omr,opg,oph,opr,dx(3),al,
33 & tpgphpr,tmgphpr,tmgmhpr,tpgmhpr,tpgphmr,tmgphmr,tmgmhmr,tpgmhmr,
34 & omgopg,omhoph,omropr,omgmopg,omhmoph,omrmopr
36 intent(in) xig,etg,zeg,pneigh,pnode,
39 intent(inout) ratio,a,p
51 call dsort(dx,iy,n,kflag)
52 if(dx(3).gt.1.d-30)
then 67 ratio(1)=1.d0-xi-et-ze
71 elseif(nterms.eq.6)
then 74 if(xi+et.gt.1.d0)
then 86 ratio(1)=0.5d0*a *(1.d0-ze)
87 ratio(2)=0.5d0*xi*(1.d0-ze)
88 ratio(3)=0.5d0*et*(1.d0-ze)
89 ratio(4)=0.5d0*a *(1.d0+ze)
90 ratio(5)=0.5d0*xi*(1.d0+ze)
91 ratio(6)=0.5d0*et*(1.d0+ze)
92 elseif(nterms.eq.8)
then 106 ratio(1)=omg*omh*omr/8.d0
107 ratio(2)=opg*omh*omr/8.d0
108 ratio(3)=opg*oph*omr/8.d0
109 ratio(4)=omg*oph*omr/8.d0
110 ratio(5)=omg*omh*opr/8.d0
111 ratio(6)=opg*omh*opr/8.d0
112 ratio(7)=opg*oph*opr/8.d0
113 ratio(8)=omg*oph*opr/8.d0
114 elseif(nterms.eq.10)
then 121 call dsort(dx,iy,n,kflag)
122 if(dx(3).gt.1.d-30)
then 138 ratio( 1)=(2.d0*a-1.d0)*a
139 ratio( 2)=xi*(2.d0*xi-1.d0)
140 ratio( 3)=et*(2.d0*et-1.d0)
141 ratio( 4)=ze*(2.d0*ze-1.d0)
148 elseif(nterms.eq.15)
then 151 if(xi+et.gt.1.d0)
then 162 ratio(1)=-0.5*a*(1.0-ze)*(2.0*xi+2.0*et+ze)
163 ratio(2)=0.5*xi*(1.0-ze)*(2.0*xi-2.0-ze)
164 ratio(3)=0.5*et*(1.0-ze)*(2.0*et-2.0-ze)
165 ratio(4)=-0.5*a*(1.0+ze)*(2.0*xi+2.0*et-ze)
166 ratio(5)=0.5*xi*(1.0+ze)*(2.0*xi-2.0+ze)
167 ratio(6)=0.5*et*(1.0+ze)*(2.0*et-2.0+ze)
168 ratio(7)=2.0*xi*a*(1.0-ze)
169 ratio(8)=2.0*xi*et*(1.0-ze)
170 ratio(9)=2.0*et*a*(1.0-ze)
171 ratio(10)=2.0*xi*a*(1.0+ze)
172 ratio(11)=2.0*xi*et*(1.0+ze)
173 ratio(12)=2.0*et*a*(1.0+ze)
174 ratio(13)= a*(1.0-ze*ze)
175 ratio(14)=xi*(1.0-ze*ze)
176 ratio(15)=et*(1.0-ze*ze)
177 elseif(nterms.eq.20)
then 199 omgmopg=(omg-opg)/4.d0
200 omhmoph=(omh-oph)/4.d0
201 omrmopr=(omr-opr)/4.d0
205 ratio( 1)=-omg*omh*omr*tpgphpr/8.d0
206 ratio( 2)=-opg*omh*omr*tmgphpr/8.d0
207 ratio( 3)=-opg*oph*omr*tmgmhpr/8.d0
208 ratio( 4)=-omg*oph*omr*tpgmhpr/8.d0
209 ratio( 5)=-omg*omh*opr*tpgphmr/8.d0
210 ratio( 6)=-opg*omh*opr*tmgphmr/8.d0
211 ratio( 7)=-opg*oph*opr*tmgmhmr/8.d0
212 ratio( 8)=-omg*oph*opr*tpgmhmr/8.d0
213 ratio( 9)=omgopg*omh*omr
214 ratio(10)=omhoph*opg*omr
215 ratio(11)=omgopg*oph*omr
216 ratio(12)=omhoph*omg*omr
217 ratio(13)=omgopg*omh*opr
218 ratio(14)=omhoph*opg*opr
219 ratio(15)=omgopg*oph*opr
220 ratio(16)=omhoph*omg*opr
221 ratio(17)=omropr*omg*omh
222 ratio(18)=omropr*opg*omh
223 ratio(19)=omropr*opg*oph
224 ratio(20)=omropr*omg*oph
226 write(*,*)
'*ERROR in distattach: case with ',nterms
227 write(*,*)
' terms is not covered' 236 p(i)=p(i)+ratio(j)*pneigh(i,j)
242 a=(pnode(1)-p(1))**2+(pnode(2)-p(2))**2+(pnode(3)-p(3))**2
subroutine dsort(dx, iy, n, kflag)
Definition: dsort.f:6