11 #include "DataStructures/VariablesTag.hpp"
12 #include "Evolution/Systems/Cce/AnalyticBoundaryDataManager.hpp"
13 #include "Evolution/Systems/Cce/BoundaryData.hpp"
14 #include "Evolution/Systems/Cce/InterfaceManagers/GhInterfaceManager.hpp"
15 #include "Evolution/Systems/Cce/InterfaceManagers/GhLocalTimeStepping.hpp"
16 #include "Evolution/Systems/Cce/InterfaceManagers/GhLockstep.hpp"
17 #include "Evolution/Systems/Cce/OptionTags.hpp"
18 #include "Evolution/Systems/Cce/Tags.hpp"
19 #include "NumericalAlgorithms/Interpolation/SpanInterpolator.hpp"
20 #include "NumericalAlgorithms/Spectral/SwshCollocation.hpp"
21 #include "Parallel/Invoke.hpp"
22 #include "ParallelAlgorithms/Initialization/MutateAssign.hpp"
24 #include "Utilities/MakeString.hpp"
28 #include "Utilities/TaggedTuple.hpp"
32 template <
typename Metavariables>
33 struct H5WorldtubeBoundary;
34 template <
typename Metavariables>
35 struct AnalyticWorldtubeBoundary;
36 template <
typename Metavariables>
37 struct GhWorldtubeBoundary;
42 template <
typename Initializer,
typename ManagerTag,
43 typename BoundaryCommunicationTagsList>
44 struct InitializeWorldtubeBoundaryBase {
45 using initialization_tags = tmpl::list<ManagerTag>;
46 using initialization_tags_to_keep = tmpl::list<ManagerTag>;
47 using const_global_cache_tags = tmpl::list<Tags::LMax>;
50 tmpl::list<::Tags::Variables<BoundaryCommunicationTagsList>>;
52 template <
typename DataBoxTagsList,
typename... InboxTags,
53 typename ArrayIndex,
typename Metavariables,
typename ActionList,
54 typename ParallelComponent>
55 static auto apply(db::DataBox<DataBoxTagsList>& box,
60 const ParallelComponent*
const ) noexcept {
61 if constexpr (tmpl::list_contains_v<DataBoxTagsList, ManagerTag>) {
62 const size_t l_max = db::get<Tags::LMax>(box);
63 Variables<BoundaryCommunicationTagsList> boundary_variables{
66 Initialization::mutate_assign<simple_tags>(
make_not_null(&box),
67 std::move(boundary_variables));
68 return std::make_tuple(std::move(box));
71 << db::tag_name<ManagerTag>);
84 template <
typename WorldtubeComponent>
108 template <
typename Metavariables>
110 :
public detail::InitializeWorldtubeBoundaryBase<
111 InitializeWorldtubeBoundary<H5WorldtubeBoundary<Metavariables>>,
112 Tags::H5WorldtubeBoundaryDataManager,
113 typename Metavariables::cce_boundary_communication_tags> {
114 using base_type = detail::InitializeWorldtubeBoundaryBase<
117 typename Metavariables::cce_boundary_communication_tags>;
118 using base_type::apply;
119 using typename base_type::simple_tags;
120 using const_global_cache_tags =
121 tmpl::list<Tags::LMax, Tags::EndTimeFromFile, Tags::StartTimeFromFile>;
122 using typename base_type::initialization_tags;
123 using typename base_type::initialization_tags_to_keep;
146 template <
typename Metavariables>
148 :
public detail::InitializeWorldtubeBoundaryBase<
149 InitializeWorldtubeBoundary<GhWorldtubeBoundary<Metavariables>>,
150 Tags::GhInterfaceManager,
151 typename Metavariables::cce_boundary_communication_tags> {
152 using base_type = detail::InitializeWorldtubeBoundaryBase<
155 typename Metavariables::cce_boundary_communication_tags>;
156 using base_type::apply;
157 using typename base_type::simple_tags;
159 using const_global_cache_tags =
163 using typename base_type::initialization_tags;
164 using typename base_type::initialization_tags_to_keep;
188 template <
typename Metavariables>
190 :
public detail::InitializeWorldtubeBoundaryBase<
191 InitializeWorldtubeBoundary<AnalyticWorldtubeBoundary<Metavariables>>,
192 Tags::AnalyticBoundaryDataManager,
193 typename Metavariables::cce_boundary_communication_tags> {
194 using base_type = detail::InitializeWorldtubeBoundaryBase<
197 typename Metavariables::cce_boundary_communication_tags>;
198 using base_type::apply;
199 using typename base_type::simple_tags;
200 using const_global_cache_tags =
201 tmpl::list<Tags::LMax, Tags::SpecifiedEndTime, Tags::SpecifiedStartTime>;
202 using typename base_type::initialization_tags;
203 using typename base_type::initialization_tags_to_keep;