36 INTEGER,
PARAMETER :: dp = kind(1.0d0)
38 INTEGER,
INTENT (INOUT) :: ifail
51 REAL (DP) :: rho(
solver%nrho)
56 REAL (DP) :: dy(
solver%nrho)
61 REAL (DP) :: g(
solver%nrho), h
64 REAL (DP) :: v(2), u(2), w(2)
71 REAL (DP) :: x(
solver%nrho)
73 REAL (DP) :: sol(
solver%nrho)
74 REAL (DP) :: dsol(
solver%nrho)
77 REAL (DP) :: cs(
solver%nrho)
79 REAL (DP) :: vs(2), us(2), ws(2)
96 equation_loop1:
DO idim = 1, ndim
98 flag =
solver%EQ_FLAG(idim)
101 IF (flag.EQ.0) goto 20
109 rho_loop1:
DO irho=1,nrho
110 rho(irho) =
solver%RHO(irho)
112 y(irho) =
solver%Y(idim,irho)
113 dy(irho) =
solver%DY(idim,irho)
114 ym(irho) =
solver%YM(idim,irho)
116 a(irho) =
solver%A(idim,irho)
117 b(irho) =
solver%B(idim,irho)
118 c(irho) =
solver%C(idim,irho)
119 d(irho) =
solver%D(idim,irho)
120 e(irho) =
solver%E(idim,irho)
121 f(irho) =
solver%F(idim,irho)
122 g(irho) =
solver%G(idim,irho)
159 rho_loop2:
DO i = 2,n
161 as(i) = -e(i)/d(i) + dd(i)/d(i)
162 bs(i) = a(i)*c(i)/h/d(i) + c(i)*g(i)/d(i) + de(i)/d(i)
163 cs(i) = c(i)/d(i) * (f(i) + b(i)*ym(i)/h)
182 CALL
solutn7(x,n, vs,us,ws, as,bs,cs, sol,dsol)
186 rho_loop3:
DO irho = 1,nrho
189 y(irho) = y(irho)*(1.d0-amix) + sol(irho)*amix
190 dy(irho) = dy(irho)*(1.d0-amix) + dsol(irho)*amix
195 solver%Y(idim,irho) = y(irho)
196 solver%DY(idim,irho) = dy(irho)
207 END DO equation_loop1
234 SUBROUTINE solutn7 (RHO,N, V,U,W, A,B,F, Y,DY)
249 REAL (R8) rho(n),h(n+1),a(n),b(n),f(n),y(n),dy(n),lam(10001,2)
250 REAL (R8) u(2),v(2),w(2)
251 REAL (R8) y0(n),y1(10001,2,2)
252 REAL (R8) et(2,2),mu(2),det
253 REAL (R8) c(n),d(n),g(2),x
259 h(i) = rho(i+1)-rho(i)
265 det = a(i)**2/4.d0+b(i)
268 lam(i,k) = -a(i)/2.d0-(-1)**k*dsqrt(det)
272 y1(i,k,l) = dexp(dmin1(200.d0,(-1)**l*lam(i,k) &
279 c(3) = v(1)/(v(1)-h(3)*u(1))
280 d(3) = h(3)*w(1)/(h(3)*u(1)-v(1))
290 et(k,m) = -(-1)**m*(lam(j,m)-lam(i,k) &
291 -(lam(j,l)-lam(i,k))*y1(j,l,l) &
292 /y1(j,m,l))/(lam(j,1)-lam(j,2))
295 mu(m) = -(-1)**m*(y0(i)-y0(j))/y1(i,l,m) &
296 *(lam(j,m)-lam(j,l)*y1(j,l,l) &
297 /y1(j,m,l))/(lam(j,1)-lam(j,2))
300 det = et(1,2)*et(2,1)-et(1,1)*et(2,2) &
301 *y1(i,l,1)/y1(i,2,1) &
308 g(m) = y1(i+(-1)**m,l,l)/y1(i,l,m)* &
309 (et(m,l)-y1(i,l,l)/y1(i,m,l) &
312 dy(i) = dy(i)+lam(i,m)* &
313 (mu(m)*y1(i,l,l)/y1(i,m,l)* &
314 et(l,l)-mu(l)*et(l,m))/det
315 cdy(i,m) = (et(m,l)*lam(i,l)- &
316 y1(i,l,l)/y1(i,m,l)*et(l,l)*lam(i,m))/det
319 x = (mu(1)*(y1(i,2,2)/y1(i,1,2) &
320 *et(2,2)-et(1,2))+mu(2)*(y1(i,1,1) &
321 /y1(i,2,1)*et(1,1)-et(2,1)))/det- &
322 y0(i-1)*g(1)-y0(i+1)*g(2)+y0(i)
323 c(i+1) = g(2)/(1.d0-g(1)*c(i))
324 d(i+1) = (g(1)*d(i)+x)/(1.d0-g(1)*c(i))
328 y(n) = (h(n-1)*w(2)+v(2)*d(n)) &
329 /(h(n-1)*u(2)+v(2)-v(2)*c(n))
332 y(i-1) = c(i)*y(i)+d(i)
341 dy(i) = dy(i)+(y(j)-y0(j))*y1(j,l,l)/y1(i,l,m)*cdy(i,m)
345 dy(2)=(y(3)-y(3))/h(2)
346 dy(n)=(y(n)-y(n-1))/h(n-1)
369 INTEGER,
PARAMETER :: dp = kind(1.0d0)
376 REAL (DP) :: h(n),dy2(n)
383 dy1(i)=((y(i+1)-y(i))*h(i-1)/h(i)+(y(i)-y(i-1))*h(i)/h(i-1)) &
385 dy2(i)=2.d0*((y(i-1)-y(i))/h(i-1)+(y(i+1)-y(i))/h(i)) &
389 dy1(1)=dy1(2)-dy2(2)*h(1)
390 dy1(n)=dy1(n-1)+dy2(n-1)*h(n-1)
412 REAL *8 h(n), r(n), f(n)
419 f(1) = ((f(2)*r(4)/h(2)+f(4)*r(2)/h(3))*r(3) &
420 -f(3)*(r(2)/h(2)+r(4)/h(3))*r(2)*r(4)/r(3)) &
subroutine solutn7(RHO, N, V, U, W, A, B, F, Y, DY)
subroutine axis7(n, r, f)
subroutine solution7(SOLVER, ifail)
This subroutine is prepared to solve single transport equation in standardised form adopted by the ET...
subroutine derivn7(N, X, Y, DY1)