aboutsummaryrefslogtreecommitdiff
path: root/interface.ccl
diff options
context:
space:
mode:
authorhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-04-23 14:59:00 +0000
committerhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-04-23 14:59:00 +0000
commitfd1b7d175f18cb5f1d168c8a9e95508b41ae39e9 (patch)
tree438f83a13ed6c0dcd80b495222d57b5ee59c898c /interface.ccl
parent1100eb9f3017973b6cfa5b6bff3306773ff3e532 (diff)
The Method of Lines thorn (version 2 - see below).
MoL provides generic integration methods for multiple thorns simultaneously. By providing a layer between the driver and evolution thorns, this should mean that some technical issues to do with mesh refinement can be ignored. It also allows you to choose different evolution methods (in time, at least). But the primary purpose is to unambiguously evolve models in different thorns at the same time. This is version 2 - the one that will work with mesh refinement. It's a straight copy of HawkeCVS/Public/CactusMoL2/MoL2 and I haven't checked that it will work "as is" with the new name (one of the reasons it goes into Alpha). At the moment the only evolution method guaranteed to work with mesh refinement is ICN, although RK2 should. The generic RK methods will do something that will be subtly wrong... Note that the "old" way of registering variables (through the functions declared in header files) is still there. As soon as function aliasing settles down, this will be removed. Also to be done: Better documentation Tidy up the code (especially the debugging statements) Optimize Add various useful time evolution methods. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@2 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
Diffstat (limited to 'interface.ccl')
-rw-r--r--interface.ccl71
1 files changed, 71 insertions, 0 deletions
diff --git a/interface.ccl b/interface.ccl
new file mode 100644
index 0000000..ace52c1
--- /dev/null
+++ b/interface.ccl
@@ -0,0 +1,71 @@
+# Interface definition for thorn MoL2
+# $Header$
+
+implements: MethodOfLines
+
+inherits: nanchecker
+
+INCLUDE HEADER: MoLFunctions.h IN MoLFunctions.h
+INCLUDE HEADER: MoL.h IN MoL.h
+USES INCLUDE: NaNChecker.h
+
+CCTK_INT FUNCTION MoLRegisterEvolved(CCTK_INT EvolvedIndex, CCTK_INT RHSIndex)
+CCTK_INT FUNCTION MoLRegisterConstrained(CCTK_INT ConstrainedIndex)
+CCTK_INT FUNCTION MoLRegisterSaveAndRestore(CCTK_INT SandRIndex)
+CCTK_INT FUNCTION MoLRegisterEvolvedGroup(CCTK_INT EvolvedIndex, \
+ CCTK_INT RHSIndex)
+CCTK_INT FUNCTION MoLRegisterConstrainedGroup(CCTK_INT ConstrainedIndex)
+CCTK_INT FUNCTION MoLRegisterSaveAndRestoreGroup(CCTK_INT SandRIndex)
+CCTK_INT FUNCTION MoLChangeToEvolved(CCTK_INT EvolvedIndex, CCTK_INT RHSIndex)
+CCTK_INT FUNCTION MoLChangeToConstrained(CCTK_INT ConstrainedIndex)
+CCTK_INT FUNCTION MoLChangeToSaveAndRestore(CCTK_INT SandRIndex)
+CCTK_INT FUNCTION MoLChangeToNone(CCTK_INT RemoveIndex)
+
+PROVIDES FUNCTION MoLRegisterEvolved WITH MoL_RegisterEvolved LANGUAGE C
+PROVIDES FUNCTION MoLRegisterConstrained WITH MoL_RegisterConstrained \
+ LANGUAGE C
+PROVIDES FUNCTION MoLRegisterSaveAndRestore WITH MoL_RegisterSaveAndRestore \
+ LANGUAGE C
+PROVIDES FUNCTION MoLRegisterEvolvedGroup WITH MoL_RegisterEvolvedGroup \
+ LANGUAGE C
+PROVIDES FUNCTION MoLRegisterConstrainedGroup WITH \
+ MoL_RegisterConstrainedGroup LANGUAGE C
+PROVIDES FUNCTION MoLRegisterSaveAndRestoreGroup WITH \
+ MoL_RegisterSaveAndRestoreGroup LANGUAGE C
+PROVIDES FUNCTION MoLChangeToEvolved WITH MoL_ChangeToEvolved LANGUAGE C
+PROVIDES FUNCTION MoLChangeToConstrained WITH MoL_ChangeToConstrained \
+ LANGUAGE C
+PROVIDES FUNCTION MoLChangeToSaveAndRestore WITH MoL_ChangeToSaveAndRestore \
+ LANGUAGE C
+PROVIDES FUNCTION MoLChangeToNone WITH MoL_ChangeToNone LANGUAGE C
+
+private:
+
+CCTK_REAL RKAlphaCoefficients TYPE=ARRAY DIM=2 SIZE=MoL_Intermediate_Steps,MoL_Num_Scratch_Levels+1 DISTRIB=CONSTANT
+{
+ RKAlphaCoefficients
+} "The alpha coefficients used by the generic Runge-Kutta integrators"
+
+CCTK_REAL RKBetaCoefficients TYPE=ARRAY DIM=1 SIZE=MoL_Intermediate_Steps DISTRIB=CONSTANT
+{
+ RKBetaCoefficients
+} "The beta coefficients used by the generic Runge-Kutta integrators"
+
+CCTK_INT MoL_Counters TYPE = SCALAR
+{
+ MoL_Intermediate_Step
+} "The counter for the time integration method"
+
+CCTK_REAL MoL_Original_Time TYPE = SCALAR
+{
+ Original_Time
+ Original_Delta_Time
+} "The original time and delta time which are reset by MoL during evolution"
+
+# This is extremely unforgiving - it doesn't allow whitespace in the
+# arithmetic expressions.
+
+CCTK_REAL ScratchSpace[MoL_Num_Evolved_Vars*MoL_Num_Scratch_Levels+1] TYPE = GF Timelevels = 1
+
+CCTK_REAL SandRScratchSpace[MoL_Num_SaveAndRestore_Vars+1] TYPE = GF Timelevels = 1
+