From 2c8534d5165ed80a7861da82fcb9bb34277f9918 Mon Sep 17 00:00:00 2001 From: roland haas Date: Sat, 4 Feb 2012 18:14:56 -0800 Subject: CarpetInterp2: provide function to check if fasterp_setup is out of date CarpetInterp2 tests if a fasterp_setup_t object is out of date (older than the current regridding epoch) before it uses it. This patch exports this test to user code so that they can check each time they want to interpolate if they have to re-create the setup object. It has the advantage of hiding the internal decision criterion from the user. --- Carpet/CarpetInterp2/src/fasterp.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Carpet/CarpetInterp2/src/fasterp.cc') diff --git a/Carpet/CarpetInterp2/src/fasterp.cc b/Carpet/CarpetInterp2/src/fasterp.cc index 54848d6dc..9b8fd956b 100644 --- a/Carpet/CarpetInterp2/src/fasterp.cc +++ b/Carpet/CarpetInterp2/src/fasterp.cc @@ -1071,9 +1071,7 @@ namespace CarpetInterp2 { DECLARE_CCTK_PARAMETERS; // Check regridding epoch - if (regridding_epoch != (reflevel == -1 ? - Carpet::regridding_epoch : - Carpet::level_regridding_epochs.AT(reflevel))) + if (outofdate()) { if (reflevel == -1) { CCTK_VWarn (CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING, -- cgit v1.2.3