26 integer(kind=intType) :: sps, nn, i, j, k, l
31 domains:
do nn = 1, ndom
43 wn(i, j, k, l) =
w(i, j, k, l)
54 pn(i, j, k) =
p(i, j, k)
115 real(kind=realtype),
parameter :: fivethird =
five *
third
119 integer(kind=intType) :: sps, nn, i, j, k, l
121 real(kind=realtype) :: tmp, unsteadyimpl, mult
122 real(kind=realtype) :: dt, currentcfl, gm1, gm53
123 real(kind=realtype) :: v2, ovr, dp, factk, ru, rv, rw
125 logical :: secondHalo, smoothResidual, correctForK
145 smoothresidual = .false.
147 smoothresidual = .true.
148 else if (mod(
rkstage, 2_inttype) == 1)
then
149 smoothresidual = .true.
151 smoothresidual = .false.
161 correctfork = .false.
164 correctfork = .false.
171 domainsupdate:
do nn = 1, ndom
203 dt = 0.8 * tmp *
dtl(i, j, k)
205 dt = tmp *
dtl(i, j, k)
220 end do spectralsteady
258 dt = tmp *
dtl(i, j, k)
259 mult = dt / (dt * unsteadyimpl *
vol(i, j, k) +
one)
273 end do spectralunsteady
284 domainsstate:
do nn = 1, ndom
292 if (smoothresidual)
then
305 gm53 =
gamma(i, j, k) - fivethird
314 v2 =
w(i, j, k,
ivx)**2 +
w(i, j, k,
ivy)**2 +
w(i, j, k,
ivz)**2
315 if (correctfork) factk = gm53 *
w(i, j, k,
itu1)
317 dp = (ovr *
p(i, j, k) + factk &
318 - gm1 * (ovr *
w(i, j, k,
irhoe) - v2)) *
dw(i, j, k,
irho) &
335 w(i, j, k,
ivx) = ovr * ru
336 w(i, j, k,
ivy) = ovr * rv
337 w(i, j, k,
ivz) = ovr * rw
341 p(i, j, k) =
pn(i, j, k) - dp
342 p(i, j, k) = max(
p(i, j, k), 1.e-4_realtype *
pinfcorr)
352 2_inttype,
kl, correctfork)
447 real(kind=realtype),
parameter :: fivethird =
five *
third
451 integer(kind=intType) :: sps, nn, i, j, k, l
453 real(kind=realtype) :: unsteadyimpl, mult
454 real(kind=realtype) :: dt, currentcfl, gm1, gm53
455 real(kind=realtype) :: v2, ovr, dp, factk, ru, rv, rw
457 logical :: secondHalo, smoothResidual, correctForK
477 smoothresidual = .false.
479 smoothresidual = .true.
480 else if (mod(
rkstage, 2_inttype) == 1)
then
481 smoothresidual = .true.
483 smoothresidual = .false.
495 domainsupdate:
do nn = 1, ndom
520 dt = -currentcfl *
dtl(i, j, k) *
vol(i, j, k)
536 end do spectralsteady
569 dt = currentcfl *
dtl(i, j, k)
570 mult = dt / (dt * unsteadyimpl *
vol(i, j, k) +
one)
571 mult = -mult *
vol(i, j, k)
585 end do spectralunsteady
596 domainsstate:
do nn = 1, ndom
616 gm53 =
gamma(i, j, k) - fivethird
625 v2 =
w(i, j, k,
ivx)**2 +
w(i, j, k,
ivy)**2 +
w(i, j, k,
ivz)**2
626 if (correctfork) factk = gm53 *
w(i, j, k,
itu1)
628 dp = (ovr *
p(i, j, k) + factk &
629 - gm1 * (ovr *
w(i, j, k,
irhoe) - v2)) *
dw(i, j, k,
irho) &
646 w(i, j, k,
ivx) = ovr * ru
647 w(i, j, k,
ivy) = ovr * rv
648 w(i, j, k,
ivz) = ovr * rw
652 p(i, j, k) =
p(i, j, k) - dp
653 p(i, j, k) = max(
p(i, j, k), 1.e-4_realtype *
pinfcorr)
663 2_inttype,
kl, correctfork)
subroutine applyallbc(secondHalo)
real(kind=realtype), dimension(:, :, :), pointer gamma
real(kind=realtype), dimension(:, :, :), pointer p
real(kind=realtype), dimension(:, :, :, :), pointer w
real(kind=realtype), dimension(:, :, :, :), pointer wn
real(kind=realtype), dimension(:, :, :, :), pointer dw
real(kind=realtype), dimension(:, :, :), pointer vol
real(kind=realtype), dimension(:, :, :), pointer dtl
real(kind=realtype), dimension(:, :, :), pointer pn
real(kind=realtype), parameter zero
real(kind=realtype), parameter third
integer(kind=inttype), parameter alwaysresaveraging
integer(kind=inttype), parameter timespectral
integer(kind=inttype), parameter unsteady
integer(kind=inttype), parameter noresaveraging
real(kind=realtype), parameter five
real(kind=realtype), parameter one
integer(kind=inttype), parameter steady
subroutine computelamviscosity(includeHalos)
subroutine computeetotblock(iStart, iEnd, jStart, jEnd, kStart, kEnd, correctForK)
real(kind=realtype) pinfcorr
integer(kind=inttype) nwf
real(kind=realtype) rhoinf
real(kind=realtype) timeref
subroutine whalo2(level, start, end, commPressure, commGamma, commViscous)
subroutine whalo1(level, start, end, commPressure, commGamma, commViscous)
integer(kind=inttype) currentlevel
integer(kind=inttype) subit
integer(kind=inttype) groundlevel
integer(kind=inttype) rkstage
real(kind=realtype), dimension(:), allocatable coeftime
logical exchangepressureearly
subroutine residualaveraging
subroutine initres(varStart, varEnd)
subroutine executerkstage
subroutine executedadistep
subroutine rungekuttasmoother
subroutine computeeddyviscosity(includeHalos)
logical function getcorrectfork()
subroutine setpointers(nn, mm, ll)