aboutsummaryrefslogtreecommitdiff
path: root/schedule.ccl
blob: 690d184244879d39b31af950b13cf4cf31bfb53b (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Schedule definitions for thorn Exact
# $Header$

# these are just grid scalars, so there's no harm in leaving storage
# for them on all the time
STORAGE: Exact_pars_int
STORAGE: Exact_pars_real

# This is a grid function, so turning storage for on all the time
# is painful.  But this thorn's src/include/Scalar_CalcTmunu.inc
# code *does* use it...
## this metric doesn't work and has been moved to ./archive/
## STORAGE: Exact_robwal_var

#######################################################################
# PARAMCHECK
#######################################################################

Schedule Exact_ParamCheck at PARAMCHECK
{
LANG: C
OPTIONS: global
} "do consistency checks on our parameters"

#######################################################################
# INITIAL DATA
#######################################################################

# decode/copy parameters into grid scalars
# (to share them properly so Calc_Tmunu code can see them even
#  though it's compiled in other thorns)
Schedule Exact__decode_pars in ADMBase_InitialData
{
LANG: Fortran
} "decode/copy thorn Exact parameters into grid scalars"

# Initial data (g and K) from a trivial slice through an exact solution.

if (CCTK_Equals(initial_data,"exact"))
{
  schedule Exact__initialize in ADMBase_InitialData after Exact__decode_pars
  {
    LANG: Fortran
  } "Set initial data from exact solution on a trivial slice"
}

# Initial data from an arbitrary slice through an exact solution, 
# but NOT evolving the slice afterwards.
# Note we only need storage for the slice itself, and only at startup.

if ( (CCTK_Equals(initial_data,"slice")) && ! (CCTK_Equals(evolution_method,"slice")) )
{
  schedule Exact__slice_initialize in ADMBase_InitialData after Exact__decode_pars
  {
    STORAGE: Exact_slice
    LANG: Fortran
  } "Set initial data from exact solution on an arbitrary slice"
}

#######################################################################
# LAPSE AND SHIFT
#######################################################################

# Lapse and/or shift from a trivial slice through an exact solution.
# At the initial time:

if ( (CCTK_Equals(initial_lapse,"exact")) || (CCTK_Equals(initial_shift,"exact")) || (CCTK_Equals(initial_dtlapse,"exact")) || (CCTK_Equals(initial_dtshift,"exact")) )
{
  schedule Exact__gauge in ADMBase_InitialGauge
  {
    LANG: Fortran
  } "Set initial lapse and/or shift from exact solution on a trivial slice"
}

# During the evolution:

if ( (CCTK_Equals(lapse_evolution_method,"exact")) || (CCTK_Equals(shift_evolution_method,"exact")) || (CCTK_Equals(dtlapse_evolution_method,"exact")) || (CCTK_Equals(dtshift_evolution_method,"exact")) )
{
  schedule Exact__RegisterSlicing at CCTK_STARTUP
  {
    LANG: C
    OPTIONS: global
  } "Register slicings"

  # Necessary if MoL is not used
  schedule Exact__gauge at CCTK_PRESTEP
  {
    LANG: Fortran
  } "Set evolution lapse and/or shift from exact solution on a trivial slice"

  # Necessary if MoL is used
  schedule Exact__gauge in MoL_PostStep BEFORE ADMBase_SetADMVars
  {
    LANG: Fortran
  } "Set evolution lapse and/or shift from exact solution on a trivial slice"
}

#######################################################################
# EVOLUTION
#######################################################################

# Fake the evolution of g and K by evolving the slice and 
# reading them off from the slice again. We need the slice and two
# temporary copies throughout. Note that if we set evolution_system 
# = "slice" without also setting initial_data = "slice", nothing will
# happen as a failsafe, and Cactus should complain about not having an
# evolution routine. Setting initial_data = "slice" on its own is ok though.

if ( (CCTK_Equals(evolution_method,"slice")) && (CCTK_Equals(initial_data,"slice")) )
{
  STORAGE: Exact_slice
  STORAGE: Exact_slicetemp1
  STORAGE: Exact_slicetemp2

  schedule Exact__slice_initialize in ADMBase_InitialData after Exact__decode_pars
  {
    LANG: Fortran
  } "Set initial data from exact solution on arbitrary slice"

  schedule Exact__slice_evolve at CCTK_EVOL
  {
    LANG: Fortran
  } "Evolve arbitrary slice and extract Cauchy data"
}

# Fake the evolution of an exact solution, by setting g and K according
# to the exact solution at CCTK_PRESTEP.

if (CCTK_Equals(evolution_method,"exact"))
{
  schedule Exact__initialize at CCTK_PRESTEP
  {
    LANG: Fortran
  } "Set data from exact solution on an exact slice"
  # Necessary if MoL is used
  schedule Exact__initialize in MoL_PostStep BEFORE ADMBase_SetADMVars
  {
    LANG: Fortran
  } "Set data from exact solution on an exact slice"
}

#######################################################################
# BOUNDARY DATA
#######################################################################

if (CCTK_Equals(overwrite_boundary,"exact"))
{
  schedule Exact__boundary at CCTK_POSTSTEP
  {
    LANG: Fortran
  } "Overwrite g and K on the boundary with exact solution data"
}