[Commits] [svn:einsteintoolkit] incoming/SphericalSlice/ (Rev. 59)

roland.haas at physics.gatech.edu roland.haas at physics.gatech.edu
Mon Feb 6 13:24:41 CST 2012


User: rhaas
Date: 2012/02/06 01:24 PM

Modified:
 /SphericalSlice/
  schedule.ccl
 /SphericalSlice/src/
  sync.cc

Log:
 SphericalSlice: check fasterp_setup before use instead of relying on PostRegrid

File Changes:

Directory: /SphericalSlice/
===========================

File [modified]: schedule.ccl
Delta lines: +0 -8
===================================================================
--- SphericalSlice/schedule.ccl	2011-11-29 19:54:16 UTC (rev 58)
+++ SphericalSlice/schedule.ccl	2012-02-06 19:24:41 UTC (rev 59)
@@ -68,11 +68,3 @@
   OPTIONS: GLOBAL
 } "Check ss_info variables if those have been externally set and adapt internal variables accordingly."
 
-
-
-SCHEDULE SphericalSlice_ForgetInterpSetup AT postregrid
-{
-  LANG: C
-  OPTIONS: global
-} "Reset interpolator after regridding"
-

Directory: /SphericalSlice/src/
===============================

File [modified]: sync.cc
Delta lines: +3 -28
===================================================================
--- SphericalSlice/src/sync.cc	2011-11-29 19:54:16 UTC (rev 58)
+++ SphericalSlice/src/sync.cc	2012-02-06 19:24:41 UTC (rev 59)
@@ -86,7 +86,9 @@
       // set up the interpolation
       assert(interp_setups.size() > slices_1patch(INDEX1P(varno[0]), 0).ID());
       interp_setup_t* &interp_setup = interp_setups[slices_1patch(INDEX1P(varno[0]), 0).ID()];
-      if (not interp_setup) {
+      if (not interp_setup or interp_setup->fasterp_setup->outofdate()) {
+         if (interp_setup and interp_setup->fasterp_setup->outofdate())
+           delete interp_setup;
          interp_setup = new interp_setup_t(slices_1patch(INDEX1P(varno[0]), 0).lsh(0)[0] * slices_1patch(INDEX1P(varno[0]), 0).lsh(0)[1]);
    
          // allocate storage for coordinates
@@ -335,30 +337,3 @@
    
    return 0;
 }
-
-
-
-extern"C" void SphericalSlice_ForgetInterpSetup(CCTK_ARGUMENTS)
-{
-   DECLARE_CCTK_ARGUMENTS;
-   DECLARE_CCTK_PARAMETERS;
-
-   for (int i=0; i < interp_setups.size(); ++i)
-   {
-      
-      if (interp_setups.AT(i)) 
-      {
-          //CCTK_VInfo (CCTK_THORNSTRING,
-            //         "Forgetting interpolation setup for sphere ",
-            //         i);
-          delete interp_setups.AT(i);
-          interp_setups.AT(i) = NULL;
-      }
-   }
-}
-
-
-
-   
-
-



More information about the Commits mailing list