aboutsummaryrefslogtreecommitdiff
path: root/schedule.ccl
blob: d5345ce7d9320c89acf37a63ca5aa7770eb53903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Schedule definitions for thorn TmunuBase

STORAGE: stress_energy_state
STORAGE: stress_energy_2_state



# Initialise stuff

SCHEDULE TmunuBase_SetStressEnergyState AT Wragh BEFORE MoL_Register
{
  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 (ADMBase_SetADMVars 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_PostStep AFTER ADMBase_SetADMVars
    {
    } "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,TmunuBase_ZeroTmunu)
  {
  } "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 */