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"
27 #include "Utilities/TaggedTuple.hpp"
31 template <
typename Metavariables>
32 struct H5WorldtubeBoundary;
33 template <
typename Metavariables>
34 struct AnalyticWorldtubeBoundary;
35 template <
typename Metavariables>
36 struct GhWorldtubeBoundary;
41 template <
typename Initializer,
typename ManagerTag,
42 typename BoundaryCommunicationTagsList>
43 struct InitializeWorldtubeBoundaryBase {
44 using initialization_tags = tmpl::list<ManagerTag>;
45 using initialization_tags_to_keep = tmpl::list<ManagerTag>;
46 using const_global_cache_tags = tmpl::list<Tags::LMax>;
49 tmpl::list<::Tags::Variables<BoundaryCommunicationTagsList>>;
51 template <
typename DataBoxTagsList,
typename... InboxTags,
52 typename ArrayIndex,
typename Metavariables,
typename ActionList,
53 typename ParallelComponent>
54 static auto apply(db::DataBox<DataBoxTagsList>& box,
59 const ParallelComponent*
const ) noexcept {
60 if constexpr (tmpl::list_contains_v<DataBoxTagsList, ManagerTag>) {
61 const size_t l_max = db::get<Tags::LMax>(box);
62 Variables<BoundaryCommunicationTagsList> boundary_variables{
65 Initialization::mutate_assign<simple_tags>(
make_not_null(&box),
66 std::move(boundary_variables));
67 return std::make_tuple(std::move(box));
70 << db::tag_name<ManagerTag>);
83 template <
typename WorldtubeComponent>
107 template <
typename Metavariables>
109 :
public detail::InitializeWorldtubeBoundaryBase<
110 InitializeWorldtubeBoundary<H5WorldtubeBoundary<Metavariables>>,
111 Tags::H5WorldtubeBoundaryDataManager,
112 typename Metavariables::cce_boundary_communication_tags> {
113 using base_type = detail::InitializeWorldtubeBoundaryBase<
116 typename Metavariables::cce_boundary_communication_tags>;
117 using base_type::apply;
118 using typename base_type::simple_tags;
119 using const_global_cache_tags =
120 tmpl::list<Tags::LMax, Tags::EndTimeFromFile, Tags::StartTimeFromFile>;
121 using typename base_type::initialization_tags;
122 using typename base_type::initialization_tags_to_keep;
145 template <
typename Metavariables>
147 :
public detail::InitializeWorldtubeBoundaryBase<
148 InitializeWorldtubeBoundary<GhWorldtubeBoundary<Metavariables>>,
149 Tags::GhInterfaceManager,
150 typename Metavariables::cce_boundary_communication_tags> {
151 using base_type = detail::InitializeWorldtubeBoundaryBase<
154 typename Metavariables::cce_boundary_communication_tags>;
155 using base_type::apply;
156 using typename base_type::simple_tags;
158 using const_global_cache_tags =
162 using typename base_type::initialization_tags;
163 using typename base_type::initialization_tags_to_keep;
187 template <
typename Metavariables>
189 :
public detail::InitializeWorldtubeBoundaryBase<
190 InitializeWorldtubeBoundary<AnalyticWorldtubeBoundary<Metavariables>>,
191 Tags::AnalyticBoundaryDataManager,
192 typename Metavariables::cce_boundary_communication_tags> {
193 using base_type = detail::InitializeWorldtubeBoundaryBase<
196 typename Metavariables::cce_boundary_communication_tags>;
197 using base_type::apply;
198 using typename base_type::simple_tags;
199 using const_global_cache_tags =
200 tmpl::list<Tags::LMax, Tags::SpecifiedEndTime, Tags::SpecifiedStartTime>;
201 using typename base_type::initialization_tags;
202 using typename base_type::initialization_tags_to_keep;