19 integer,
intent(in) :: ixi^
l, il^
l, idims
20 double precision,
intent(in) :: dxdim
21 double precision,
intent(in) :: w(ixi^s,1:nw)
22 double precision,
intent(inout) :: wrc(ixi^s,1:nw),wlc(ixi^s,1:nw)
24 double precision :: wmax(ixi^s,1:nw),wmin(ixi^s,1:nw)
25 double precision :: westp(ixi^s,1:nw),westm(ixi^s,1:nw)
26 double precision :: phi1(ixi^s,1:nw),phi2(ixi^s,1:nw)
27 double precision :: phi3(ixi^s,1:nw),phi4(ixi^s,1:nw)
28 double precision :: phim(ixi^s,1:nw),phip(ixi^s,1:nw),phi(ixi^s,1:nw)
29 double precision :: deltap(ixi^s,1:nw),deltam(ixi^s,1:nw)
30 double precision :: eps2
31 double precision,
parameter :: venk_omega = 1.
d-12
32 double precision,
parameter :: venk_k = 0.3d0
33 integer :: im^
l, imm^
l, imp^
l
34 integer :: ilm^
l, ilp^
l, ilpp^
l
37 immax^
d=ilmax^
d+
kr(idims,^
d);
38 ilm^
l=il^
l-
kr(idims,^
d);
39 imm^
l=im^
l-
kr(idims,^
d);
40 ilp^
l=il^
l+
kr(idims,^
d);
41 imp^
l=im^
l+
kr(idims,^
d);
42 ilpp^
l=ilp^
l+
kr(idims,^
d);
44 eps2 = (venk_k * dxdim) ** 3
46 wmax(im^s,1:nw_recon) = max(w(imm^s,1:nw_recon), w(im^s,1:nw_recon), w(imp^s,1:nw_recon))
47 wmin(im^s,1:nw_recon) = min(w(imm^s,1:nw_recon), w(im^s,1:nw_recon), w(imp^s,1:nw_recon))
49 westp(im^s,1:nw_recon) = w(im^s,1:nw_recon) + (w(imp^s,1:nw_recon) - w(imm^s,1:nw_recon)) * 0.25d0
50 westm(im^s,1:nw_recon) = w(im^s,1:nw_recon) - (w(imp^s,1:nw_recon) - w(imm^s,1:nw_recon)) * 0.25d0
58 where(westp(im^s,1:nw_recon) .gt. w(im^s,1:nw_recon))
59 deltap(im^s,1:nw_recon) = wmax(im^s,1:nw_recon) - w(im^s,1:nw_recon)
60 deltam(im^s,1:nw_recon) = westp(im^s,1:nw_recon) - w(im^s,1:nw_recon)
61 deltam(im^s,1:nw_recon) = sign(dabs(deltam(im^s,1:nw_recon)) + venk_omega, deltam(im^s,1:nw_recon))
62 phi1(im^s,1:nw_recon) = (deltap(im^s,1:nw_recon)**2 + eps2) + 2.d0 * deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon)
63 phi2(im^s,1:nw_recon) = deltap(im^s,1:nw_recon)**2 + 2.d0 * deltam(im^s,1:nw_recon)**2 + deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon) + eps2
64 phip(im^s,1:nw_recon) = phi1(im^s,1:nw_recon) / phi2(im^s, 1:nw_recon)
65 elsewhere(westp(im^s,1:nw_recon) .lt. w(im^s,1:nw_recon))
66 deltap(im^s,1:nw_recon) = wmin(im^s,1:nw_recon) - w(im^s,1:nw_recon)
67 deltam(im^s,1:nw_recon) = westp(im^s,1:nw_recon) - w(im^s,1:nw_recon)
68 deltam(im^s,1:nw_recon) = sign(dabs(deltam(im^s,1:nw_recon)) + venk_omega, deltam(im^s,1:nw_recon))
69 phi1(im^s,1:nw_recon) = (deltap(im^s,1:nw_recon)**2 + eps2) + 2.d0 * deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon)
70 phi2(im^s,1:nw_recon) = deltap(im^s,1:nw_recon)**2 + 2.d0 * deltam(im^s,1:nw_recon)**2 + deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon) + eps2
71 phip(im^s,1:nw_recon) = phi1(im^s,1:nw_recon) / phi2(im^s, 1:nw_recon)
73 phip(im^s,1:nw_recon) = one
81 where(westm(im^s,1:nw_recon) .lt. w(im^s,1:nw_recon))
82 deltap(im^s,1:nw_recon) = - (wmax(im^s,1:nw_recon) - w(im^s,1:nw_recon))
83 deltam(im^s,1:nw_recon) = westm(im^s,1:nw_recon) - w(im^s,1:nw_recon)
84 deltam(im^s,1:nw_recon) = sign(dabs(deltam(im^s,1:nw_recon)) + venk_omega, deltam(im^s,1:nw_recon))
85 phi3(im^s,1:nw_recon) = (deltap(im^s,1:nw_recon)**2 + eps2) + 2.d0 * deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon)
86 phi4(im^s,1:nw_recon) = deltap(im^s,1:nw_recon)**2 + 2.d0 * deltam(im^s,1:nw_recon)**2 + deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon) + eps2
87 phim(im^s,1:nw_recon) = phi3(im^s,1:nw_recon) / phi4(im^s, 1:nw_recon)
88 elsewhere(westm(im^s,1:nw_recon) .gt. w(im^s,1:nw_recon))
89 deltap(im^s,1:nw_recon) = - (wmin(im^s,1:nw_recon) - w(im^s,1:nw_recon))
90 deltam(im^s,1:nw_recon) = westm(im^s,1:nw_recon) - w(im^s,1:nw_recon)
91 deltam(im^s,1:nw_recon) = sign(dabs(deltam(im^s,1:nw_recon)) + venk_omega, deltam(im^s,1:nw_recon))
92 phi3(im^s,1:nw_recon) = (deltap(im^s,1:nw_recon)**2 + eps2) + 2.d0 * deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon)
93 phi4(im^s,1:nw_recon) = deltap(im^s,1:nw_recon)**2 + 2.d0 * deltam(im^s,1:nw_recon)**2 + deltap(im^s,1:nw_recon) * deltam(im^s,1:nw_recon) + eps2
94 phim(im^s,1:nw_recon) = phi3(im^s,1:nw_recon) / phi4(im^s, 1:nw_recon)
96 phim(im^s,1:nw_recon) = one
99 phi(im^s,1:nw_recon) = min(phim(im^s,1:nw_recon),phip(im^s,1:nw_recon))
101 wlc(il^s,1:nw_recon) = w(il^s,1:nw_recon) + 0.25d0 * (w(ilp^s,1:nw_recon)-w(ilm^s,1:nw_recon)) * phi(il^s,1:nw_recon)
102 wrc(il^s,1:nw_recon) = w(ilp^s,1:nw_recon) - 0.25d0 * (w(ilpp^s,1:nw_recon)-w(il^s,1:nw_recon)) * phi(ilp^s,1:nw_recon)
This module contains definitions of global parameters and variables and some generic functions/subrou...
integer, dimension(3, 3) kr
Kronecker delta tensor.
double precision, dimension(:), allocatable, parameter d
subroutine, public venklimiter(ixIL, iLL, idims, dxdim, w, wLC, wRC)