aboutsummaryrefslogtreecommitdiff
path: root/Examples/Euler/src
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2011-12-15 19:03:44 +0100
committerIan Hinder <ian.hinder@aei.mpg.de>2011-12-15 19:03:44 +0100
commit227ea812f7f17c04762944e71860c3ff696250d6 (patch)
treea9378b89be164c146bbace1e320b8e6820071606 /Examples/Euler/src
parent7bbffe843d3a60b2f3432e492700cf4d1f3ff7eb (diff)
Regenerate hydro examples
Diffstat (limited to 'Examples/Euler/src')
-rw-r--r--Examples/Euler/src/euler_initial_shock.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/Examples/Euler/src/euler_initial_shock.cc b/Examples/Euler/src/euler_initial_shock.cc
index b8fe537..d20ce9a 100644
--- a/Examples/Euler/src/euler_initial_shock.cc
+++ b/Examples/Euler/src/euler_initial_shock.cc
@@ -114,17 +114,17 @@ static void euler_initial_shock_Body(cGH const * restrict const cctkGH, int cons
/* Precompute derivatives */
/* Calculate temporaries and grid functions */
- CCTK_REAL rhoL = Piecewise(List(List(ToReal(rhoL0),xL < 0.5)),0. +
- ToReal(rhoR0));
+ CCTK_REAL rhoL = ToReal(rhoL0) + StepFunction(-0.5 +
+ xL)*(-ToReal(rhoL0) + ToReal(rhoR0));
- CCTK_REAL v1L = Piecewise(List(List(ToReal(vL0),xL < 0.5)),0. +
+ CCTK_REAL v1L = ToReal(vL0) + StepFunction(-0.5 + xL)*(-ToReal(vL0) +
ToReal(vR0));
CCTK_REAL v2L = 0;
CCTK_REAL v3L = 0;
- CCTK_REAL pL = Piecewise(List(List(ToReal(pL0),xL < 0.5)),0. +
+ CCTK_REAL pL = ToReal(pL0) + StepFunction(-0.5 + xL)*(-ToReal(pL0) +
ToReal(pR0));
/* Copy local copies back to grid functions */