aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetInterp
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2006-09-21 00:58:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2006-09-21 00:58:00 +0000
commitb55f4f6c2aa4c0d2774a6c83186ac696552e4d97 (patch)
tree70ae5888cf7482954b202d10964c5a030896109d /Carpet/CarpetInterp
parentf34d33732ed59839353f8a4db851a808439de57f (diff)
CarpetInterp: Add internal check for per-processor number of grid points
Check the number of grid points that CarpetInterp thinks should be interpolated on each processor. Assert that a processor is not supposed to interpolate on a component that it does not own. darcs-hash:20060921005809-dae7b-ad7e8e160c412086047778c74835b22b1993c98b.gz
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r--Carpet/CarpetInterp/src/interp.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc
index 328f147e6..79f71cb31 100644
--- a/Carpet/CarpetInterp/src/interp.cc
+++ b/Carpet/CarpetInterp/src/interp.cc
@@ -947,6 +947,23 @@ namespace CarpetInterp {
}
}
+ {
+ // Ensure that this processor is only supposed to interpolate
+ // points from maps and components that are actually located on
+ // this processor
+ for (int rl=minrl; rl<maxrl; ++rl) {
+ for (int m=0; m<maps; ++m) {
+ gh const * const hh = arrdata.at(coord_group).at(m).hh;
+ for (int c=0; c<hh->components(rl); ++c) {
+ for (int p=0; p<dist::size(); ++p) {
+ int const idx = component_idx (p, m, rl, c);
+ assert (hh->is_local(rl, c) or homecnts.at(idx) == 0);
+ }
+ }
+ }
+ }
+ }
+
BEGIN_GLOBAL_MODE(cctkGH) {
for (int rl=minrl; rl<maxrl; ++rl) {
ENTER_LEVEL_MODE (cctkGH, rl) {