diff options
-rw-r--r-- | param.ccl | 3 | ||||
-rw-r--r-- | src/GRHydro_PreLoop.F90 | 9 | ||||
-rw-r--r-- | src/GRHydro_Scalars.F90 | 2 | ||||
-rw-r--r-- | src/GRHydro_TVDReconstruct.F90 | 32 | ||||
-rw-r--r-- | src/make.code.defn | 1 |
5 files changed, 19 insertions, 28 deletions
@@ -116,10 +116,7 @@ keyword recon_vars "Which type of variables to reconstruct" keyword tvd_limiter "Which slope limiter to use" { "minmod" :: "Minmod" - "vanleerMC" :: "Van Leer MC - Ian" "vanleerMC2" :: "Van Leer MC - Luca" - "minmod2" :: "Minmod - Ian" - "minmod3" :: "Minmod - Luca (or vice versa). Expect I've made a typo" "Superbee" :: "Superbee" } "minmod" diff --git a/src/GRHydro_PreLoop.F90 b/src/GRHydro_PreLoop.F90 index bd15d1d..819bc0e 100644 --- a/src/GRHydro_PreLoop.F90 +++ b/src/GRHydro_PreLoop.F90 @@ -39,9 +39,6 @@ subroutine GRHydro_Scalar_Setup(CCTK_ARGUMENTS) DECLARE_CCTK_FUNCTIONS MINMOD = .false. - MINMOD2 = .false. - MINMOD3 = .false. - MC1 = .false. MC2 = .false. SUPERBEE = .false. HLLE = .false. @@ -49,12 +46,6 @@ subroutine GRHydro_Scalar_Setup(CCTK_ARGUMENTS) if (CCTK_EQUALS(tvd_limiter,"minmod")) then MINMOD = .true. - else if (CCTK_EQUALS(tvd_limiter,"minmod2")) then - MINMOD2 = .true. - else if (CCTK_EQUALS(tvd_limiter,"minmod3")) then - MINMOD3 = .true. - else if (CCTK_EQUALS(tvd_limiter,"vanleerMC")) then - MC1 = .true. else if (CCTK_EQUALS(tvd_limiter,"vanleerMC2")) then MC2 = .true. else if (CCTK_EQUALS(tvd_limiter,"Superbee")) then diff --git a/src/GRHydro_Scalars.F90 b/src/GRHydro_Scalars.F90 index e62671a..37d4626 100644 --- a/src/GRHydro_Scalars.F90 +++ b/src/GRHydro_Scalars.F90 @@ -16,7 +16,7 @@ implicit none - LOGICAL :: MINMOD, MINMOD2, MINMOD3, MC1, MC2, SUPERBEE, PPM3, PPM4 + LOGICAL :: MINMOD, MC2, SUPERBEE, PPM3, PPM4 LOGICAL :: ANALYTICAL LOGICAL :: FAST LOGICAL :: HLLE, LLF diff --git a/src/GRHydro_TVDReconstruct.F90 b/src/GRHydro_TVDReconstruct.F90 index 9abc8f2..526999d 100644 --- a/src/GRHydro_TVDReconstruct.F90 +++ b/src/GRHydro_TVDReconstruct.F90 @@ -79,22 +79,26 @@ subroutine tvdreconstruct(nx, ny, nz, xoffset, yoffset, zoffset, & dloc = orig(i+xoffset, j+yoffset, k+zoffset) - orig(i, j, k) if (MINMOD) then - delta = minmod_func(dupw,dloc) + delta = minmod_func(dupw,dloc) else if (MC2) then -!!$ This is an alternative equivalent implementation -!!$ of vanLeeer MC slopelimiter - if (dupw*dloc < 0.d0) then - delta=0.d0 - else - delta=sign(min(2.d0*abs(dupw),2.d0*abs(dloc),& - 0.5d0*(abs(dupw)+abs(dloc))),dupw+dloc) - end if +!!$ This is the van Leer MC slope limiter + if (dupw*dloc < 0.d0) then + delta=0.d0 + else + delta=sign(min(2.d0*abs(dupw),2.d0*abs(dloc),& + 0.5d0*(abs(dupw)+abs(dloc))),dupw+dloc) + end if + else if (SUPERBEE) then + if (dupw*dloc < 0.d0) then + delta=0.d0 + else + delta=sign(max(min(2.d0*abs(dupw),abs(dloc)),& + min(2.d0*abs(dloc),abs(dupw))),dupw+dloc) + end if else - delta = 0.5d0*(dupw + dloc) - if (abs(dupw) < myfloor ) dupw = myfloor*sign(1.d0, dupw) - if (abs(dloc) < myfloor ) dloc = myfloor*sign(1.d0, dloc) - ratio = dupw / dloc - call slopelimiter(ratio, delta) + call CCTK_WARN(0, "Type of limiter not recognized") + ! NOTREACHED + delta = 0d0 end if hdelta = 0.5d0 * delta bextm(i, j, k) = orig(i, j, k) - hdelta diff --git a/src/make.code.defn b/src/make.code.defn index 395ff82..25b0aa1 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -35,7 +35,6 @@ SRCS = Utils.F90 \ GRHydro_RoeSolver.F90 \ GRHydro_Scalars.F90 \ GRHydro_Shift.F90 \ - GRHydro_SlopeLimiter.F90 \ GRHydro_Source.F90 \ GRHydro_Startup.F90 \ GRHydro_TVDReconstruct.F90 \ |