aboutsummaryrefslogtreecommitdiff
path: root/schedule.ccl
diff options
context:
space:
mode:
authorschnetter <schnetter@b83b3108-af97-48ba-8c81-9293ccf7f924>2009-09-28 18:13:48 +0000
committerschnetter <schnetter@b83b3108-af97-48ba-8c81-9293ccf7f924>2009-09-28 18:13:48 +0000
commit1198ef6e175f651646fb7989e8cdce06d424d684 (patch)
treea12b5980e3986e7f579db332a0e809c1f602c7a9 /schedule.ccl
parentbcf804124910ccb0643e23ee6f7be30a768a1486 (diff)
Move thorn TmunuBase from AEIThorns to CactusEinstein.
Thorn TmunuBase provides grid functions for the stress-energy tensor T_ab. This allows spacetime codes to be independent of hydrodynamics formulations, or other formulations contributing to the stress-energy tensor. TmunuBase is backwards compatible with the old CalcTmunu.inc mechanism. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/TmunuBase/trunk@2 b83b3108-af97-48ba-8c81-9293ccf7f924
Diffstat (limited to 'schedule.ccl')
-rw-r--r--schedule.ccl116
1 files changed, 116 insertions, 0 deletions
diff --git a/schedule.ccl b/schedule.ccl
new file mode 100644
index 0000000..6e5b65a
--- /dev/null
+++ b/schedule.ccl
@@ -0,0 +1,116 @@
+# Schedule definitions for thorn TmunuBase
+
+STORAGE: stress_energy_state
+STORAGE: stress_energy_2_state
+
+
+
+# Initialise stuff
+
+SCHEDULE TmunuBase_SetStressEnergyState AT basegrid
+{
+ LANG: Fortran
+ OPTIONS: global
+} "Set the stress_energy_state variable"
+
+
+
+# Do nothing unless storage is requested
+
+if (stress_energy_storage)
+{
+
+ # Storage management
+
+ if (timelevels == 1)
+ {
+ STORAGE: stress_energy_scalar[1]
+ STORAGE: stress_energy_vector[1]
+ STORAGE: stress_energy_tensor[1]
+ }
+ else if (timelevels == 2)
+ {
+ STORAGE: stress_energy_scalar[2]
+ STORAGE: stress_energy_vector[2]
+ STORAGE: stress_energy_tensor[2]
+ }
+ else if (timelevels == 3)
+ {
+ STORAGE: stress_energy_scalar[3]
+ STORAGE: stress_energy_vector[3]
+ STORAGE: stress_energy_tensor[3]
+ }
+
+ if (support_old_CalcTmunu_mechanism)
+ {
+ STORAGE: stress_energy_2_scalar
+ STORAGE: stress_energy_2_vector
+ STORAGE: stress_energy_2_tensor
+ }
+
+
+
+ # Calculate T_munu after the initial data
+
+ SCHEDULE GROUP SetTmunu AT initial AFTER (ADMBase_InitialData ADMBase_InitialGauge Whisky_Initial)
+ {
+ } "Calculate the stress-energy tensor"
+
+ # Calculate T_munu during evolution;
+ # either within MoL, or (the default) after each time step
+
+ # if (stress_energy_at_RHS)
+ # {
+ # SCHEDULE GROUP SetTmunu IN MoL_PostStep AFTER Whisky_PostStep
+ # {
+ # } "Calculate the stress-energy tensor"
+ # } else {
+ # SCHEDULE GROUP SetTmunu AT evol AFTER MoL_Evolution
+ # {
+ # } "Calculate the stress-energy tensor"
+ # }
+ if (stress_energy_at_RHS)
+ {
+ SCHEDULE GROUP SetTmunu IN MoL_PreStep
+ {
+ } "Group for calculating the stress-energy tensor"
+ }
+ SCHEDULE GROUP SetTmunu AT evol AFTER MoL_Evolution
+ {
+ } "Group for calculating the stress-energy tensor"
+
+
+
+ # This is how T_munu is calculated.
+ # First it is set via the CalcTmunu.inc mechanism,
+ # then other thorns can add to that via the AddToTmunu mechanism.
+ # In the end, the copy T2munu is calculated.
+
+ if (support_old_CalcTmunu_mechanism)
+ {
+ SCHEDULE TmunuBase_SetTmunu IN SetTmunu
+ {
+ LANG: Fortran
+ } "Calculate the stress-energy tensor using the old CalcTmunu mechanism"
+ }
+ else
+ {
+ SCHEDULE TmunuBase_ZeroTmunu IN SetTmunu
+ {
+ LANG: Fortran
+ } "Initialise the stress-energy tensor to zero"
+ }
+
+ SCHEDULE GROUP AddToTmunu IN SetTmunu AFTER TmunuBase_SetTmunu
+ {
+ } "Add to the stress-energy tensor here"
+
+ if (support_old_CalcTmunu_mechanism)
+ {
+ SCHEDULE TmunuBase_CopyTmunu IN SetTmunu AFTER AddToTmunu
+ {
+ LANG: Fortran
+ } "Copy the stress-energy tensor"
+ }
+
+} /* if stress_energy_storage */