aboutsummaryrefslogtreecommitdiff
path: root/schedule.ccl
blob: a491c0db81b699f3304f998d581a8b03e6656b1f (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
# Schedule definitions for thorn NoExcision
# $Header$

STORAGE: reduction_mask

if (CCTK_EQUALS(method,"old")) {
  SCHEDULE NoExcision_Overwrite IN ADMBase_PostInitial
  {
    LANG: Fortran
  } "Overwrite regions with Minkowski"
}

if (CCTK_Equals(method,"new")) {
  schedule NoExcision_SetSym at CCTK_BASEGRID
  {
    LANG: Fortran
  } "Register the symmetries for the conjugate gradient functions."
}

if (smooth_regions) {
  if (CCTK_Equals(method,"old")) {
    SCHEDULE NoExcision_Smooth IN ADMBase_PostInitial AFTER NoExcision_Overwrite
    {
      LANG: Fortran
    } "Smooth regions"
  } else {
    
    if (use_user_regions) {
      SCHEDULE NoExcision_Set_Zero IN ADMBase_PostInitial BEFORE NoExcision_CGSmoothing
      {
        LANG: Fortran
      } "Set variables to zero in user defined regions"
    }

    SCHEDULE GROUP NoExcision_CGSmoothing IN ADMBase_PostInitial
    {
      STORAGE: cg_res_metric, cg_res_curv, cg_res_shift, cg_res_lapse
      STORAGE: cg_d_metric, cg_d_curv, cg_d_shift, cg_d_lapse
      STORAGE: cg_q_metric, cg_q_curv, cg_q_shift, cg_q_lapse
      STORAGE: cg_red_all
      STORAGE: smask
      STORAGE: loop_control

    } "Conjugate Gradient smoothing"

    SCHEDULE CopyMask IN NoExcision_CGSmoothing
    {
      LANG: C
      OPTIONS: global loop-local
    } "Copy the weight function from CarpetReduce"

    SCHEDULE NoExcision_CGInit_1 IN NoExcision_CGSmoothing AFTER CopyMask
    {
      LANG: Fortran
    } "Initialise the conjugate gradient method 1"

    SCHEDULE NoExcision_CGApplySym AS NoExcision_CGApplySym_p1 IN NoExcision_CGSmoothing AFTER NoExcision_CGInit_1
    {
      LANG: Fortran
      SYNC: cg_d_metric
      SYNC: cg_d_curv
      SYNC: cg_d_shift
      SYNC: cg_d_lapse
      SYNC: cg_res_metric
      SYNC: cg_res_curv
      SYNC: cg_res_shift
      SYNC: cg_res_lapse
      SYNC: cg_red_all
    } "Select variables for boundary conditions 1"

    SCHEDULE GROUP ApplyBCs AS NoExcision_CGApplyBCs_p1 IN NoExcision_CGSmoothing AFTER NoExcision_CGApplySym_p1
    {
    } "Apply boundary conditions (Symmetries) 1"

    SCHEDULE NoExcision_CGInit_2 IN NoExcision_CGSmoothing AFTER NoExcision_CGApplySym_p1
    {
      LANG: Fortran
      OPTIONS: level
    } "Initialise the conjugate gradient method 2"

    SCHEDULE GROUP NoExcision_Smoothing IN NoExcision_CGSmoothing AFTER NoExcision_CGInit_2 while NoExcision::loop_control
    {
    } "Smooth regions"

    SCHEDULE NoExcision_CG_1 IN NoExcision_Smoothing
    {
      LANG: Fortran
    } "Conjugate gradients step 1"

    SCHEDULE NoExcision_CGApplySym AS NoExcision_CGApplySym_p2 IN NoExcision_Smoothing AFTER NoExcision_CG_1
    {
      LANG: Fortran
      SYNC: cg_q_metric
      SYNC: cg_q_curv
      SYNC: cg_q_shift
      SYNC: cg_q_lapse
      SYNC: cg_red_all
    } "Select variables for boundary conditions 2"

    SCHEDULE GROUP ApplyBCs AS NoExcision_CGApplyBCs_p2 IN NoExcision_Smoothing AFTER NoExcision_CGApplySym_p2
    {
    } "Apply boundary conditions (Symmetries) 2"

    SCHEDULE NoExcision_CG_2 IN NoExcision_Smoothing AFTER NoExcision_CG_1
    {
      LANG: Fortran
      OPTIONS: level
    } "Conjugate gradients step 2"

    SCHEDULE NoExcision_CG_3 IN NoExcision_Smoothing
    {
      LANG: Fortran
    } "Conjugate gradients step 3"

    SCHEDULE NoExcision_CGApplySym AS NoExcision_CGApplySym_p3 IN NoExcision_Smoothing AFTER NoExcision_CG_3
    {
      LANG: Fortran
      SYNC: cg_res_metric
      SYNC: cg_res_curv
      SYNC: cg_res_shift
      SYNC: cg_res_lapse
      SYNC: metric
      SYNC: curv
      SYNC: shift
      SYNC: lapse
      SYNC: cg_red_all
    } "Select variables for boundary conditions 3"

    SCHEDULE GROUP ApplyBCs AS NoExcision_CGApplyBCs_p3 IN NoExcision_Smoothing AFTER NoExcision_CGApplySym_p3
    {
    } "Apply boundary conditions (Symmetries) 3"

    SCHEDULE NoExcision_CG_4 IN NoExcision_Smoothing AFTER NoExcision_CG_1
    {
      LANG: Fortran
      OPTIONS: level
    } "Conjugate gradients step 4"

    SCHEDULE NoExcision_CG_5 IN NoExcision_Smoothing
    {
      LANG: Fortran
    } "Conjugate gradients step 5"

    SCHEDULE NoExcision_CGApplySym AS NoExcision_CGApplySym_p4 IN NoExcision_CGSmoothing AFTER NoExcision_CG_5
    {
      LANG: Fortran
      SYNC: cg_d_metric
      SYNC: cg_d_curv
      SYNC: cg_d_shift
      SYNC: cg_d_lapse
    } "Select variables for boundary conditions 4"

    SCHEDULE GROUP ApplyBCs AS NoExcision_CGApplyBCs_p4 IN NoExcision_CGSmoothing AFTER NoExcision_CGApplySym_p4
    {
    } "Apply boundary conditions (Symmetries) 4"
  }
}

#SCHEDULE NoExcision_OverwriteBSSN AT poststep
#{
#  LANG: Fortran
#} "Overwrite regions with Minkowski"

SCHEDULE NoExcision_Reduce IN MoL_PostRHS
{
  LANG: C
} "Reduce RHS"