SCHEMES: Let user control the high order flux correction - corrected.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
7578f1e9f2
commit
f36979d74a
@ -58,6 +58,10 @@ module schemes
|
||||
!
|
||||
logical , save :: states_4vec = .false.
|
||||
|
||||
! high order fluxes
|
||||
!
|
||||
logical , save :: high_order_flux = .false.
|
||||
|
||||
! interfaces for procedure pointers
|
||||
!
|
||||
abstract interface
|
||||
@ -132,6 +136,7 @@ module schemes
|
||||
!
|
||||
character(len=64) :: solver = "HLL"
|
||||
character(len=64) :: statev = "primitive"
|
||||
character(len=64) :: flux = "off"
|
||||
!
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
@ -561,6 +566,17 @@ module schemes
|
||||
|
||||
end select
|
||||
|
||||
! flag for higher order flux correction
|
||||
!
|
||||
call get_parameter("high_order_flux", flux)
|
||||
|
||||
select case(trim(flux))
|
||||
case ("on", "ON", "t", "T", "y", "Y", "true", "TRUE", "yes", "YES")
|
||||
high_order_flux = .true.
|
||||
case default
|
||||
high_order_flux = .false.
|
||||
end select
|
||||
|
||||
#ifdef PROFILE
|
||||
! stop accounting time for module initialization/finalization
|
||||
!
|
||||
@ -654,6 +670,11 @@ module schemes
|
||||
call print_section(verbose, "Schemes")
|
||||
call print_parameter(verbose, "Riemann solver" , name_sol)
|
||||
call print_parameter(verbose, "state variables", name_sts)
|
||||
if (high_order_flux) then
|
||||
call print_parameter(verbose, "high order flux correction", "on" )
|
||||
else
|
||||
call print_parameter(verbose, "high order flux correction", "off")
|
||||
end if
|
||||
end if
|
||||
|
||||
!-------------------------------------------------------------------------------
|
||||
@ -1003,7 +1024,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -1175,7 +1196,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -1489,7 +1510,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -1690,7 +1711,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -1864,7 +1885,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -2215,7 +2236,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -2626,7 +2647,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -3042,7 +3063,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -3267,7 +3288,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -3624,7 +3645,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -3950,7 +3971,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -4611,7 +4632,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -4847,7 +4868,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -5224,7 +5245,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -5472,7 +5493,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -5897,7 +5918,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
@ -6305,7 +6326,7 @@ module schemes
|
||||
|
||||
! calculate and add high-order corrections, if required
|
||||
!
|
||||
if (order > 2) then
|
||||
if (high_order_flux .and. order > 2) then
|
||||
f2(:,2:n-1) = (2.0d+00 * f(:,2:n-1) - (f(:,3:n) + f(:,1:n-2))) / 2.4d+01
|
||||
f2(:,1 ) = 0.0d+00
|
||||
f2(:, n ) = 0.0d+00
|
||||
|
Loading…
x
Reference in New Issue
Block a user