diff options
-rw-r--r-- | interface.ccl | 2 | ||||
-rw-r--r-- | src/Counter.c | 21 |
2 files changed, 23 insertions, 0 deletions
diff --git a/interface.ccl b/interface.ccl index 46b0acf..809b17f 100644 --- a/interface.ccl +++ b/interface.ccl @@ -9,6 +9,8 @@ inherits: nanchecker #INCLUDE HEADER: MoL.h IN MoL.h USES INCLUDE: NaNChecker.h +USES INCLUDE: carpet.h + ################################################################ ### Aliased registration and type changing functions for the ### ### standard (i.e., real) GFs. ### diff --git a/src/Counter.c b/src/Counter.c index 72ca776..2d7f5cd 100644 --- a/src/Counter.c +++ b/src/Counter.c @@ -12,6 +12,8 @@ #include "cctk_Arguments.h" #include "cctk_Parameters.h" +#include "carpet.h" + static const char *rcsid = "$Header$"; CCTK_FILEVERSION(AlphaThorns_MoL_Counter_c); @@ -69,6 +71,17 @@ int MoL_SetCounter(CCTK_ARGUMENTS) *MoL_Intermediate_Step = MoL_Intermediate_Steps; + +#ifdef HAVE_CARPET + if ((*MoL_Intermediate_Step)) + { + /* Disable prolongating during the iterations */ + CarpetEnableProlongating (0); + } +#endif + + + return 0; } @@ -94,6 +107,14 @@ int MoL_DecrementCounter(CCTK_ARGUMENTS) (*MoL_Intermediate_Step) --; +#ifdef HAVE_CARPET + if (! (*MoL_Intermediate_Step)) + { + /* Re-enable prolongating before the final PostStep */ + CarpetEnableProlongating (1); + } +#endif + return 0; } |