aboutsummaryrefslogtreecommitdiff
path: root/src/Dissipation_4_3_min_err_coeff.F90
diff options
context:
space:
mode:
authordiener <diener@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2005-12-06 17:20:11 +0000
committerdiener <diener@f69c4107-0314-4c4f-9ad4-17e986b73f4a>2005-12-06 17:20:11 +0000
commit74de5846f7ddeb3bf181b3205f6539b4f0081705 (patch)
tree70bbe4f8269d32fadb6526eb58f810837d64a018 /src/Dissipation_4_3_min_err_coeff.F90
parent2f50e2f41868514ac23f5948caa4210607cf8917 (diff)
Added a new boolean parameter "scale_with_h" that allows the user to
choose to scale the dissipation with the grid spacing h. This results formally in the loss of one order of convergence. The default value is "no". git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/SummationByParts/trunk@52 f69c4107-0314-4c4f-9ad4-17e986b73f4a
Diffstat (limited to 'src/Dissipation_4_3_min_err_coeff.F90')
-rw-r--r--src/Dissipation_4_3_min_err_coeff.F9025
1 files changed, 19 insertions, 6 deletions
diff --git a/src/Dissipation_4_3_min_err_coeff.F90 b/src/Dissipation_4_3_min_err_coeff.F90
index b4b6ba3..dc4178d 100644
--- a/src/Dissipation_4_3_min_err_coeff.F90
+++ b/src/Dissipation_4_3_min_err_coeff.F90
@@ -4,7 +4,8 @@
#include "cctk_Parameters.h"
-subroutine dissipation_4_3_opt (var, lsh, gsh, lbnd, bb, gsize, delta, epsdisl, dfl, rhs)
+subroutine dissipation_4_3_opt (var, lsh, gsh, lbnd, bb, gsize, &
+ delta, epsilon, dfl, rhs)
implicit none
@@ -17,7 +18,7 @@ subroutine dissipation_4_3_opt (var, lsh, gsh, lbnd, bb, gsize, delta, epsdisl,
CCTK_INT, dimension(6), intent(in) :: bb
CCTK_INT, dimension(3), intent(in) :: gsize
CCTK_REAL, dimension(3), intent(in) :: delta
- CCTK_REAL, intent(in) :: epsdisl, dfl
+ CCTK_REAL, intent(in) :: epsilon, dfl
CCTK_REAL :: zero = 0.0
integer, parameter :: wp = kind(zero)
@@ -28,6 +29,7 @@ subroutine dissipation_4_3_opt (var, lsh, gsh, lbnd, bb, gsize, delta, epsdisl,
CCTK_INT :: il, ir, jl, jr, kl, kr
ni = lsh(1); nj = lsh(2); nk = lsh(3)
+
allocate ( a(ni,ni), d(ni,ni), b(ni,ni), h(ni,ni) )
a = zero; d = zero; b = zero; h = zero;
@@ -39,7 +41,11 @@ subroutine dissipation_4_3_opt (var, lsh, gsh, lbnd, bb, gsize, delta, epsdisl,
a = - transpose ( matmul ( h, matmul ( transpose(d), matmul ( b, d ) ) ) )
- idel = epsdisl / 16.0_wp
+ if ( scale_with_h > 0 ) then
+ idel = epsilon / ( 16 * delta(1) )
+ else
+ idel = epsilon / 16
+ end if
if ( bb(1) == 0 ) then
il = 1 + gsize(1)
@@ -132,7 +138,11 @@ subroutine dissipation_4_3_opt (var, lsh, gsh, lbnd, bb, gsize, delta, epsdisl,
a = - transpose ( matmul ( h, matmul ( transpose(d), matmul ( b, d ) ) ) )
- idel = epsdisl / 16.0_wp
+ if ( scale_with_h > 0 ) then
+ idel = epsilon / ( 16 * delta(2) )
+ else
+ idel = epsilon / 16
+ end if
if ( bb(3) == 0 ) then
jl = 1 + gsize(2)
@@ -226,8 +236,11 @@ subroutine dissipation_4_3_opt (var, lsh, gsh, lbnd, bb, gsize, delta, epsdisl,
a = - transpose ( matmul ( h, matmul ( transpose(d), matmul ( b, d ) ) ) )
- idel = epsdisl / 16.0_wp
-
+ if ( scale_with_h > 0 ) then
+ idel = epsilon / ( 16 * delta(3) )
+ else
+ idel = epsilon / 16
+ end if
if ( bb(5) == 0 ) then
kl = 1 + gsize(3)