From 31aa0a30ac88e00db2e149c33e4e3c54237ce9d3 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 27 Apr 2010 10:50:31 -0500 Subject: CarpetInterp2: Add debugging statements --- Carpet/CarpetInterp2/interface.ccl | 18 +++++++++++++++++- Carpet/CarpetInterp2/param.ccl | 2 +- Carpet/CarpetInterp2/schedule.ccl | 2 +- Carpet/CarpetInterp2/src/fasterp.cc | 14 ++++++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) (limited to 'Carpet/CarpetInterp2') diff --git a/Carpet/CarpetInterp2/interface.ccl b/Carpet/CarpetInterp2/interface.ccl index 15b3919c7..0b1363a6e 100644 --- a/Carpet/CarpetInterp2/interface.ccl +++ b/Carpet/CarpetInterp2/interface.ccl @@ -1,4 +1,4 @@ -# Interface definition for thorn CarpetInterp +# Interface definition for thorn CarpetInterp2 IMPLEMENTS: interp2 @@ -34,6 +34,22 @@ REQUIRES FUNCTION GetCoordRange +CCTK_INT FUNCTION \ + MultiPatch_LocalToGlobal \ + (CCTK_POINTER_TO_CONST IN cctkGH, \ + CCTK_INT IN ndims, \ + CCTK_INT IN npoints, \ + CCTK_INT ARRAY IN patch, \ + CCTK_POINTER_TO_CONST IN localcoords, \ + CCTK_POINTER IN globalcoords, \ + CCTK_POINTER IN dxda, \ + CCTK_POINTER IN det_dxda, \ + CCTK_POINTER IN dadx, \ + CCTK_POINTER IN ddxdada, \ + CCTK_POINTER IN ddadxdx, \ + CCTK_POINTER IN dddxdadada) +USES FUNCTION MultiPatch_LocalToGlobal + CCTK_INT FUNCTION \ MultiPatch_GlobalToLocal \ (CCTK_POINTER_TO_CONST IN cctkGH, \ diff --git a/Carpet/CarpetInterp2/param.ccl b/Carpet/CarpetInterp2/param.ccl index 569c4f1f2..f7b5fffef 100644 --- a/Carpet/CarpetInterp2/param.ccl +++ b/Carpet/CarpetInterp2/param.ccl @@ -1,4 +1,4 @@ -# Parameter definitions for thorn CarpetInterp +# Parameter definitions for thorn CarpetInterp2 BOOLEAN verbose "Produce info output" STEERABLE=always { diff --git a/Carpet/CarpetInterp2/schedule.ccl b/Carpet/CarpetInterp2/schedule.ccl index 96d18609b..2712c53bb 100644 --- a/Carpet/CarpetInterp2/schedule.ccl +++ b/Carpet/CarpetInterp2/schedule.ccl @@ -1 +1 @@ -# Schedule definitions for thorn CarpetInterp +# Schedule definitions for thorn CarpetInterp2 diff --git a/Carpet/CarpetInterp2/src/fasterp.cc b/Carpet/CarpetInterp2/src/fasterp.cc index 9bf990650..c59330556 100644 --- a/Carpet/CarpetInterp2/src/fasterp.cc +++ b/Carpet/CarpetInterp2/src/fasterp.cc @@ -643,6 +643,15 @@ namespace CarpetInterp2 { ostringstream msg; msg << "Interpolation point " << n << " on map " << m << " " << "at " << pos << " is outside of the grid hierarchy"; + msg << "\n" + << "rl=" << rl << " c=" << c << "\n" + << "rpos=" << rpos << "\n" + << "ipos=" << ipos << "\n" + << "lower=" << lower << "\n" + << "upper=" << upper << "\n" + << "delta=" << delta << "\n" + << "idelta=" << idelta << "\n" + << "hh=" << *hh << "\n"; CCTK_WARN (CCTK_WARN_ABORT, msg.str().c_str()); } } @@ -656,6 +665,11 @@ namespace CarpetInterp2 { assert (all (ipos % ext.stride() == ivect(0))); ipos /= ext.stride(); dpos /= rvect(ext.stride()); + if (not (all (abs(dpos) <= rvect(0.5)))) { + cout << "fasterp.cc:659\n" + << " dpos=" << dpos << "\n" + << " ext=" << ext << "\n"; + } assert (all (abs(dpos) <= rvect(0.5))); ivect const ind = ipos - ext.lower() / ext.stride(); -- cgit v1.2.3