aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843>2013-10-09 17:57:23 +0000
committerhinder <hinder@4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843>2013-10-09 17:57:23 +0000
commit6aea2421a5117daece141b16fb1ef2abe2a8895b (patch)
tree12ccb772e76a9c4341f1ab81894976767be188c2
parented6f5f2fceae3e3f54438261482f26e6e1b6ce8d (diff)
integrate.cc: Add a comment on the lack of symmetry of the "midpoint" integration method
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/Multipole/trunk@103 4f5cb9a8-4dd8-4c2d-9bbd-173fa4467843
-rw-r--r--src/integrate.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/integrate.cc b/src/integrate.cc
index 1f64c29..93b61ee 100644
--- a/src/integrate.cc
+++ b/src/integrate.cc
@@ -41,6 +41,13 @@ CCTK_REAL Midpoint2DIntegral(CCTK_REAL const *f, int nx, int ny, CCTK_REAL hx, C
assert(nx > 0); assert(ny > 0); assert (f);
+ // This sum should probably exclude the upper end points. As
+ // currently implemented, it does not naturally map to the "sum of
+ // areas" definition of the integral, as there is an additional
+ // contribution from the last term in the sum. This introduces an
+ // additional first order error to a method which is already only
+ // first order.
+
for (iy = 0; iy <= ny; iy++)
for (ix = 0; ix <= nx; ix++)
integrand_sum += f[idx(ix,iy)];