aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetInterp
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@aei.mpg.de>2005-08-11 17:03:00 +0000
committerErik Schnetter <schnetter@aei.mpg.de>2005-08-11 17:03:00 +0000
commit4f916398f3b46128dc4326729fc1a7408c71ea31 (patch)
tree544f8ff775472d8aab31bbacd05ccd351cce9496 /Carpet/CarpetInterp
parent9bfd4f4d2639ac9c6e91ae2dde24bf5b7c1858e0 (diff)
CarpetInterp: Correct time interpolation stencils
darcs-hash:20050811170351-891bb-b7c586cb8494f23fac7254f169a1a2aeec523f97.gz
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r--Carpet/CarpetInterp/src/interp.cc22
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]));
}
};