diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-08-27 10:09:50 -0400 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:24:00 +0000 |
commit | 03af01606edaa61cdd0308c1d3e2a11f6c20ae57 (patch) | |
tree | a1267879f599c2bc5e4d1fe6c3f5d15f0e88bca6 | |
parent | 58e7d6cde2e32714778534afbd2200f2c27ff66d (diff) |
Carpet: Correct component indexing in VarDataPtrI
-rw-r--r-- | Carpet/Carpet/src/helpers.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Carpet/Carpet/src/helpers.cc b/Carpet/Carpet/src/helpers.cc index c3999377f..c184c8c3f 100644 --- a/Carpet/Carpet/src/helpers.cc +++ b/Carpet/Carpet/src/helpers.cc @@ -110,7 +110,10 @@ namespace Carpet { if (tl < activetimelevels) { int const var = varindex - CCTK_FirstVarIndexI (groupindex); ggf * const ff = arrdata.AT(groupindex).AT(m).data.AT(var); - gdata * const data = (*ff) (tl, rl, c, mglevel); + int const lc = arrdata.AT(groupindex).AT(m).hh->get_local_component(rl, c); + assert (lc >= 0 and + lc < arrdata.AT(groupindex).AT(m).hh->local_components(rl)); + gdata * const data = (*ff) (tl, rl, lc, mglevel); return data->storage(); } else { return NULL; |