From 8124b56383f46a3185f0dd148fa4533990f97b78 Mon Sep 17 00:00:00 2001 From: schnetter <> Date: Tue, 4 May 2004 20:12:00 +0000 Subject: Use the local instead of a registered coordinate system for Use the local instead of a registered coordinate system for interpolation. This will enable patch-local multi-patch interpolation. darcs-hash:20040504201254-07bb3-2c00ac4fb8a00d211289814abc892908d4c78a42.gz --- Carpet/CarpetInterp/src/interp.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc index 340d79114..2b63820cd 100644 --- a/Carpet/CarpetInterp/src/interp.cc +++ b/Carpet/CarpetInterp/src/interp.cc @@ -1,4 +1,4 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetInterp/src/interp.cc,v 1.27 2004/04/16 20:57:56 schnetter Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetInterp/src/interp.cc,v 1.28 2004/05/04 22:12:54 schnetter Exp $ #include #include @@ -21,7 +21,7 @@ #include "interp.hh" extern "C" { - static char const * const rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetInterp/src/interp.cc,v 1.27 2004/04/16 20:57:56 schnetter Exp $"; + static char const * const rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetInterp/src/interp.cc,v 1.28 2004/05/04 22:12:54 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetInterp_interp_cc); } @@ -149,6 +149,7 @@ namespace CarpetInterp { // Find out about the coordinates +#if 0 const char * coord_system_name = CCTK_CoordSystemName (coord_system_handle); assert (coord_system_name); @@ -161,6 +162,11 @@ namespace CarpetInterp { delta[d] = (upper[d] - lower[d]) / (baseext.upper()[d] - baseext.lower()[d]); } +#else + rvect const lower = rvect::ref(cgh->cctk_origin_space); + rvect const delta = rvect::ref(cgh->cctk_delta_space); + rvect const upper = lower + delta * ivect::ref(cgh->cctk_gsh); +#endif assert (N_interp_points >= 0); assert (interp_coords); -- cgit v1.2.3