Replace minmod3 with the proper limiter() function.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2013-12-12 12:41:55 -02:00
parent 45f80a0dc7
commit 0dc7b24c43
3 changed files with 8 additions and 49 deletions

View File

@ -2433,8 +2433,8 @@ module boundaries
use coordinates , only : ng, im, ih, ib, ie, ieu &
, nd, jm, jh, jb, je, jeu &
, nh, km, kh, kb, ke, keu
use interpolations, only : minmod3
use equations , only : nv
use interpolations, only : limiter
implicit none
@ -2711,16 +2711,16 @@ module boundaries
dul = u(q,i ,j,k) - u(q,i-1,j,k)
dur = u(q,i+1,j,k) - u(q,i ,j,k)
dux = 0.25d0 * minmod3(dul, dur)
dux = limiter(0.25d+00, dul, dur)
dul = u(q,i,j ,k) - u(q,i,j-1,k)
dur = u(q,i,j+1,k) - u(q,i,j ,k)
duy = 0.25d0 * minmod3(dul, dur)
duy = limiter(0.25d+00, dul, dur)
#if NDIMS == 3
dul = u(q,i,j,k ) - u(q,i,j,k-1)
dur = u(q,i,j,k+1) - u(q,i,j,k )
duz = 0.25d0 * minmod3(dul, dur)
duz = limiter(0.25d+00, dul, dur)
#endif /* NDIMS == 3 */
#if NDIMS == 2

View File

@ -57,7 +57,6 @@ module interpolations
public :: initialize_interpolations, finalize_interpolations
public :: reconstruct, limiter
public :: fix_positivity
public :: minmod3
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
!
@ -519,46 +518,6 @@ module interpolations
!
!===============================================================================
!
! subroutine MINMOD3:
! ------------------
!
! Function returns the minimum module value among two arguments and their
! average.
!
! Arguments:
!
! a, b - two real values;
!
!
!===============================================================================
!
real(kind=8) function minmod3(a, b)
! local variables are not implicit by default
!
implicit none
! input arguments
!
real(kind=8), intent(in) :: a, b
!
!-------------------------------------------------------------------------------
!
! calculate the minimal module value
!
minmod3 = (sign(1.0d+00, a) + sign(1.0d+00, b)) &
* min(abs(a), abs(b), 2.5d-01 * abs(a + b))
! return the value
!
return
!-------------------------------------------------------------------------------
!
end function minmod3
!
!===============================================================================
!
! subroutine FIX_POSITIVITY:
! -------------------------
!

View File

@ -1044,8 +1044,8 @@ module mesh
use blocks , only : block_meta, block_data, nchild
use coordinates , only : ng, nh, in, jn, kn, im, jm, km
use coordinates , only : ib, ie, jb, je, kb, ke
use interpolations, only : minmod3
use equations , only : nv
use interpolations, only : limiter
implicit none
@ -1123,16 +1123,16 @@ module mesh
dul = pdata%u(p,i ,j,k) - pdata%u(p,i-1,j,k)
dur = pdata%u(p,i+1,j,k) - pdata%u(p,i ,j,k)
dux = 0.125d0 * minmod3(dul, dur)
dux = limiter(0.25d+00, dul, dur)
dul = pdata%u(p,i,j ,k) - pdata%u(p,i,j-1,k)
dur = pdata%u(p,i,j+1,k) - pdata%u(p,i,j ,k)
duy = 0.125d0 * minmod3(dul, dur)
duy = limiter(0.25d+00, dul, dur)
#if NDIMS == 3
dul = pdata%u(p,i,j,k ) - pdata%u(p,i,j,k-1)
dur = pdata%u(p,i,j,k+1) - pdata%u(p,i,j,k )
duz = 0.125d0 * minmod3(dul, dur)
duz = limiter(0.25d+00, dul, dur)
#endif /* NDIMS == 3 */
#if NDIMS == 2