diff options
author | Erik Schnetter <schnetter@aei.mpg.de> | 2005-08-11 17:03:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@aei.mpg.de> | 2005-08-11 17:03:00 +0000 |
commit | ec18c577b5d1dfe5ea5c66848037ebc2768d5155 (patch) | |
tree | 544f8ff775472d8aab31bbacd05ccd351cce9496 /Carpet/CarpetInterp/src | |
parent | b25c601534316a9ecc751041d8c2caf6f09fb15d (diff) |
CarpetInterp: Correct time interpolation stencils
darcs-hash:20050811170351-891bb-b7c586cb8494f23fac7254f169a1a2aeec523f97.gz
Diffstat (limited to 'Carpet/CarpetInterp/src')
-rw-r--r-- | Carpet/CarpetInterp/src/interp.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc index 7562c835f..83c35002b 100644 --- a/Carpet/CarpetInterp/src/interp.cc +++ b/Carpet/CarpetInterp/src/interp.cc @@ -1091,7 +1091,7 @@ namespace CarpetInterp { default: assert (0); } - break; + break; case 1: switch (num_timelevels) { @@ -1113,8 +1113,8 @@ namespace CarpetInterp { break; default: assert (0); - } - break; + } + break; default: assert (0); @@ -1150,19 +1150,19 @@ namespace CarpetInterp { const InterpolationTimes & t, CCTK_REAL t0 ) { - at(0) = (1 - t[1]) / (t[0] - t[1]); - at(1) = (1 - t[0]) / (t[1] - t[0]); + at(0) = 1 / (t[0] - t[1]); + at(1) = 1 / (t[1] - t[0]); } void for_1st_deriv_quadratic_3_pt_interp_2nd_order ( const InterpolationTimes & t, CCTK_REAL t0 ) { - at(0) = ((1 - t[1]) * (t0 - t[2]) + (t0 - t[1]) * (1 - t[2])) + at(0) = ((t0 - t[2]) + (t0 - t[1])) / ((t[0] - t[1]) * (t[0] - t[2])); - at(1) = ((1 - t[0]) * (t0 - t[2]) + (t0 - t[0]) * (1 - t[2])) + at(1) = ((t0 - t[2]) + (t0 - t[0])) / ((t[1] - t[0]) * (t[1] - t[2])); - at(2) = ((1 - t[0]) * (t0 - t[1]) + (t0 - t[0]) * (1 - t[1])) + at(2) = ((t0 - t[1]) + (t0 - t[0])) / ((t[2] - t[0]) * (t[2] - t[1])); } @@ -1170,9 +1170,9 @@ namespace CarpetInterp { const InterpolationTimes & t, CCTK_REAL t0 ) { - at(0) = 2 * (1 - t[1]) * (1 - t[2]) / ((t[0] - t[1]) * (t[0] - t[2])); - at(1) = 2 * (1 - t[0]) * (1 - t[2]) / ((t[1] - t[0]) * (t[1] - t[2])); - at(2) = 2 * (1 - t[0]) * (1 - t[1]) / ((t[2] - t[0]) * (t[2] - t[1])); + at(0) = 2 / ((t[0] - t[1]) * (t[0] - t[2])); + at(1) = 2 / ((t[1] - t[0]) * (t[1] - t[2])); + at(2) = 2 / ((t[2] - t[0]) * (t[2] - t[1])); } }; |