CharacteristicEvolutionBondiCalculations.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <tuple>
7 #include <utility>
8 
10 #include "Evolution/Systems/Cce/GaugeTransformBoundaryData.hpp"
11 #include "Evolution/Systems/Cce/OptionTags.hpp"
12 #include "Evolution/Systems/Cce/PreSwshDerivatives.hpp"
13 #include "Evolution/Systems/Cce/PrecomputeCceDependencies.hpp"
14 #include "Evolution/Systems/Cce/SwshDerivatives.hpp"
15 #include "Evolution/Systems/Cce/Tags.hpp"
17 #include "Parallel/Invoke.hpp"
18 #include "Time/Tags.hpp"
19 
20 namespace Cce {
21 namespace Actions {
22 
23 /*!
24  * \ingroup ActionGroup
25  * \brief Prepare the input quantities in the \ref DataBoxGroup for the
26  * evaluation of the hypersurface integral used to compute `BondiTag`.
27  *
28  * \details Internally this calls the
29  * `mutate_all_pre_swsh_derivatives_for_tag<BondiTag>()` and
30  * `mutate_all_swsh_derivatives_for_tag<BondiTag>()` utility functions, which
31  * determine which quantities are necessary for each of the hypersurface
32  * computations.
33  */
34 template <typename BondiTag>
36  template <typename DbTags, typename... InboxTags, typename Metavariables,
37  typename ArrayIndex, typename ActionList,
38  typename ParallelComponent>
39  static auto apply(db::DataBox<DbTags>& box,
40  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
42  const ArrayIndex& /*array_index*/,
43  const ActionList /*meta*/,
44  const ParallelComponent* const /*meta*/) noexcept {
45  mutate_all_pre_swsh_derivatives_for_tag<BondiTag>(make_not_null(&box));
46  mutate_all_swsh_derivatives_for_tag<BondiTag>(make_not_null(&box));
47  return std::forward_as_tuple(std::move(box));
48  }
49 };
50 
51 /*!
52  * \ingroup ActionGroup
53  * \brief Perform all of the computations for dependencies of the hypersurface
54  * equations that do not themselves depend on any hypersurface integrations.
55  *
56  * \details This is to be called as a 'pre-computation' step prior to looping
57  * over the hypersurface integration set. Internally, this uses
58  * `Cce::GaugeAdjustedBoundaryValue<Tag>` and
59  * `Cce::mutate_all_precompute_cce_dependencies
60  * <Tags::EvolutionGaugeBoundaryValue>()`
61  * to calculate the requisite dependencies.
62  */
64  template <typename... DbTags, typename... InboxTags, typename Metavariables,
65  typename ArrayIndex, typename ActionList,
66  typename ParallelComponent>
67  static auto apply(db::DataBox<tmpl::list<DbTags...>>& box,
68  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
70  const ArrayIndex& /*array_index*/,
71  const ActionList /*meta*/,
72  const ParallelComponent* const /*meta*/) noexcept {
73  tmpl::for_each<gauge_adjustments_setup_tags>([&box](auto tag_v) noexcept {
74  using tag = typename decltype(tag_v)::type;
75  db::mutate_apply<GaugeAdjustedBoundaryValue<tag>>(make_not_null(&box));
76  });
77  mutate_all_precompute_cce_dependencies<Tags::EvolutionGaugeBoundaryValue>(
78  make_not_null(&box));
79  return std::forward_as_tuple(std::move(box));
80  }
81 };
82 
83 } // namespace Actions
84 } // namespace Cce
The set of utilities for performing Cauchy characteristic evolution and Cauchy characteristic matchin...
Definition: BoundaryComputeAndSendToEvolution.hpp:28
Perform all of the computations for dependencies of the hypersurface equations that do not themselves...
Definition: CharacteristicEvolutionBondiCalculations.hpp:63
Prepare the input quantities in the DataBox for the evaluation of the hypersurface integral used to c...
Definition: CharacteristicEvolutionBondiCalculations.hpp:35
An associative container that is indexed by structs.
Definition: TaggedTuple.hpp:272
Defines classes and functions used for manipulating DataBox&#39;s.
Definition: InterpolationTargetWedgeSectionTorus.hpp:25
A Charm++ chare that caches constant data once per Charm++ node.
Definition: ConstGlobalCache.hpp:136
gsl::not_null< T * > make_not_null(T *ptr) noexcept
Construct a not_null from a pointer. Often this will be done as an implicit conversion, but it may be necessary to perform the conversion explicitly when type deduction is desired.
Definition: Gsl.hpp:879
Definition: Test_ActionTesting.cpp:365
Defines class template ConstGlobalCache.
Definition: ComputeTimeDerivative.hpp:29