InitializeFirstHypersurface.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <tuple>
8 #include <utility>
9 
11 #include "Evolution/Systems/Cce/InitializeCce.hpp"
12 #include "Evolution/Systems/Cce/OptionTags.hpp"
13 #include "Evolution/Systems/Cce/ScriPlusValues.hpp"
15 #include "Utilities/Gsl.hpp"
16 #include "Utilities/TMPL.hpp"
17 
18 namespace Cce {
19 namespace Actions {
20 
21 /*!
22  * \ingroup Actions
23  * \brief Given initial boundary data for \f$J\f$ and \f$\partial_r J\f$,
24  * computes the initial hypersurface quantities \f$J\f$ and gauge values.
25  *
26  * \details This action is to be called after boundary data has been received,
27  * but before the time-stepping evolution loop. So, it should be either late in
28  * an initialization phase or early (before a `Actions::Goto` loop or similar)
29  * in the `Evolve` phase.
30  *
31  * Internally, this dispatches to
32  * `Metavariables::cce_hypersufrace_initialization`, which designates a
33  * hypersurface initial data generator, `InitializeGauge`,
34  * and `InitializeScriPlusValue<Tags::InertialRetardedTime>` to perform the
35  * computations. Refer to the documentation for those mutators for mathematical
36  * details.
37  */
39  using const_global_cache_tags =
40  tmpl::list<Tags::LMax, Tags::NumberOfRadialPoints>;
41 
42  template <typename DbTags, typename... InboxTags, typename Metavariables,
43  typename ArrayIndex, typename ActionList,
44  typename ParallelComponent>
45  static std::tuple<db::DataBox<DbTags>&&> apply(
47  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
49  const ArrayIndex& /*array_index*/, const ActionList /*meta*/,
50  const ParallelComponent* const /*meta*/) noexcept {
51  db::mutate_apply<typename Metavariables::cce_hypersurface_initialization>(
52  make_not_null(&box));
53  db::mutate_apply<InitializeGauge>(make_not_null(&box));
54  db::mutate_apply<InitializeScriPlusValue<Tags::InertialRetardedTime>>(
55  make_not_null(&box));
56  return {std::move(box)};
57  }
58 };
59 } // namespace Actions
60 } // namespace Cce
The set of utilities for performing Cauchy characteristic evolution and Cauchy characteristic matchin...
Definition: BoundaryComputeAndSendToEvolution.hpp:28
Given initial boundary data for and , computes the initial hypersurface quantities and gauge values...
Definition: InitializeFirstHypersurface.hpp:38
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
Wraps the template metaprogramming library used (brigand)
Defines functions and classes from the GSL.
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