[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 528)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Wed May 29 11:35:01 CDT 2013
User: rhaas
Date: 2013/05/29 11:35 AM
Modified:
/trunk/src/
GRHydro_MP5Reconstruct.F90
Log:
GRHydro: MP5: Make epsilon parameter scale dependent on reconstructed field.
From: Christian Reisswig <reisswig at scriwalker.(none)>
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_MP5Reconstruct.F90
Delta lines: +5 -2
===================================================================
--- trunk/src/GRHydro_MP5Reconstruct.F90 2013-05-29 16:34:58 UTC (rev 527)
+++ trunk/src/GRHydro_MP5Reconstruct.F90 2013-05-29 16:35:01 UTC (rev 528)
@@ -48,7 +48,7 @@
logical, dimension(nx) :: excise
logical :: normal_m5
- CCTK_REAL :: vl, vmp, djm1, dj, djp1, dm4jph, dm4jmh, vul, vav, vmd, vlc, vmin, vmax
+ CCTK_REAL :: vl, vmp, djm1, dj, djp1, dm4jph, dm4jmh, vul, vav, vmd, vlc, vmin, vmax, vnorm
! sign requires its arguments to be of identical KIND
CCTK_REAL, parameter :: one = 1d0
@@ -89,6 +89,9 @@
end if
if (normal_m5) then
+
+ vnorm = sqrt(v(i-2)**2 + v(i-1)**2 + v(i)**2 + v(i+1)**2 + v(i+2)**2)
+
#define MINMOD(x,y) \
0.5d0*(sign(one,x) + sign(one,y)) * min(abs(x), abs(y))
@@ -98,7 +101,7 @@
#define MP5(am2, am1, a, ap1, ap2, arecon) \
vl = (2.0d0*am2 - 13.0d0*am1 + 47.0d0*a + 27.0d0*ap1 - 3.0d0*ap2)/60.0d0 &&\
vmp = a + MINMOD( ap1-a, mp5_alpha*(a-am1) ) &&\
- if ((vl-a)*(vl-vmp) .le. mp5_eps) then &&\
+ if ((vl-a)*(vl-vmp) .le. mp5_eps*vnorm) then &&\
arecon = vl &&\
else &&\
djm1 = am2 -2.0d0*am1 + a &&\
More information about the Commits
mailing list