aboutsummaryrefslogtreecommitdiff
path: root/schedule.ccl
blob: 92313c697363c2ead491ee45d23f914efbd64bb0 (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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Schedule definitions for thorn AHFinderDirect
# $Header$

#
# setup
#
schedule AHFinderDirect_setup at CCTK_BASEGRID				\
after    SpatialCoordinates
	 {
	 lang: C
	 options: global
	 } "setup data structures"

#
# find horizons
#
if (run_at_CCTK_ANALYSIS != 0)
	{
	schedule AHFinderDirect_update at CCTK_ANALYSIS			\
	before   AHFinderDirect_find_horizons
		 {
		 lang: C
		 options: global
		 } "update internal data structures from steerable parameters"
	schedule AHFinderDirect_find_horizons at CCTK_ANALYSIS
		 {
		 lang: C
		 options: global
		 } "maybe find apparent horizon(s) after this time step"
	}
if (run_at_CCTK_POSTSTEP != 0)
	{
	schedule AHFinderDirect_update at CCTK_POSTSTEP			\
	before   AHFinderDirect_find_horizons
		 {
		 lang: C
		 options: global
		 } "update internal data structures from steerable parameters"
	schedule AHFinderDirect_find_horizons at CCTK_POSTSTEP
		 {
		 lang: C
		 options: global
		 } "maybe find apparent horizon(s) after this time step"
	}
if (run_at_CCTK_POSTINITIAL != 0)
	{
	schedule AHFinderDirect_update at CCTK_POSTINITIAL		\
	before   AHFinderDirect_find_horizons
		 {
		 lang: C
		 options: global
		 } "update internal data structures from steerable parameters"
	schedule AHFinderDirect_find_horizons at CCTK_POSTINITIAL
		 {
		 lang: C
		 options: global
		 } "maybe find apparent horizon(s) after this time step"
	}

#
# announce horizon positions to other thorns
#
if (run_at_CCTK_ANALYSIS != 0)
	{
	schedule AHFinderDirect_announce at CCTK_ANALYSIS		\
	before   DriftCorrect						\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 } "maybe announce horizon position(s) to other thorns"
	}
if (run_at_CCTK_POSTSTEP != 0)
	{
	schedule AHFinderDirect_announce at CCTK_POSTSTEP		\
	before   DriftCorrect						\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 } "maybe announce horizon position(s) to other thorns"
	}
if (run_at_CCTK_POSTINITIAL != 0)
	{
	schedule AHFinderDirect_announce at CCTK_POSTINITIAL		\
	before   DriftCorrect						\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 } "maybe announce horizon position(s) to other thorns"
	}

#
# store horizon info in SphericalSurface variables
#
if (run_at_CCTK_ANALYSIS != 0)
	{
	schedule AHFinderDirect_store_SS_info at CCTK_ANALYSIS		\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 options: global
		 } "maybe store horizon info in SphericalSurface variables"
	}
if (run_at_CCTK_POSTSTEP != 0)
	{
	schedule AHFinderDirect_store_SS_info at CCTK_POSTSTEP		\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 options: global
		 } "maybe store horizon info in SphericalSurface variables"
	}
if (run_at_CCTK_POSTINITIAL != 0)
	{
	schedule AHFinderDirect_store_SS_info at CCTK_POSTINITIAL	\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 options: global
		 } "maybe store horizon info in SphericalSurface variables"
	}

#
# set excision mask
#
# *** KLUDGE ***
#
# We would really like to give this routine the
#	options:global
# attribute, so it only runs on those time levels where we've found
# (or at least tried to find) horizons.  But this doesn't work, because
# we need a GH -- and the other thorns' routines we call need valid
# grid variables in it -- in the announcing code, and  options:global
# routines don't have a "normal" GH, but instead a special one without
# usual grid variables defined in the usual manner.
#
# So, what to do?  The present kludge is to have this routine called
# on every grid, then have it explicitly test if it's at a horizon-finding
# time and on a base grid.
#
if (run_at_CCTK_ANALYSIS != 0)
	{
	schedule AHFinderDirect_maybe_do_masks at CCTK_ANALYSIS		\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 } "maybe set mask(s) based on apparent horizon position(s)"
	}
if (run_at_CCTK_POSTSTEP != 0)
	{
	schedule AHFinderDirect_maybe_do_masks at CCTK_POSTSTEP		\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 } "maybe set mask(s) based on apparent horizon position(s)"
	}
if (run_at_CCTK_POSTINITIAL != 0)
	{
	schedule AHFinderDirect_maybe_do_masks at CCTK_POSTINITIAL	\
	after    AHFinderDirect_find_horizons
		 {
		 lang: C
		 } "maybe set mask(s) based on apparent horizon position(s)"
	}
# if using mesh refinement, reset the mask after regridding
# if not using mesh refinement, POSTREGRID is ignored so this is a no-op
schedule AHFinderDirect_maybe_do_masks at POSTREGRID			\
after    (MaskOne MaskZero)
	 {
	 lang: C
	 } "regrid ==> maybe reset mask(s) based on apparent horizon position(s)"

########################################

##
## uncomment this if you want to use the test driver
##	src/util/test_patch_system.cc
##
##schedule test_patch_system at CCTK_POSTINITIAL
##{
##LANG: C
##OPTIONS: global
##} "test driver to verify that src/util/ and src/jtutil/ code works properly"