aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-07-21 07:53:25 +0000
committerhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-07-21 07:53:25 +0000
commitde37737e4f81fee2953e7a3b925a23033a136d85 (patch)
treee52de7de7aa8507f46d8f7cc26c67fb1c0d2234d
parentddc64d12e22336ebeac316a5bb6bde2d63c4f31d (diff)
Switch off prolongation in Carpet during evolution - patch from Erik Schnetter.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@26 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
-rw-r--r--interface.ccl2
-rw-r--r--src/Counter.c21
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;
}