UpdateGauge.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/GaugeTransformBoundaryData.hpp"
12 #include "Evolution/Systems/Cce/OptionTags.hpp"
14 #include "Utilities/Gsl.hpp"
15 #include "Utilities/TMPL.hpp"
16 
17 namespace Cce {
18 namespace Actions {
19 
20 /*!
21  * \ingroup Actions
22  * \brief Updates all of the gauge quantities associated with the additional
23  * regularity-preserving gauge transformation on the boundaries for a new set of
24  * Cauchy coordinates.
25  *
26  * \details This action is to be called after `Tags::CauchyCartesianCoords` has
27  * been updated, typically via a time step of a set of coordinate evolution
28  * equations. It prepares the gauge quantities in the \ref DataBoxGroup for
29  * calls to the individual `GaugeAdjustedBoundaryValue` specializations.
30  *
31  * Internally, this dispatches to `GaugeUpdateAngularFromCartesian`,
32  * `GaugeUpdateJacobianFromCoordinates`, `GaugeUpdateInterpolator`, and
33  * `GaugeUpdateOmega` to perform the computations. Refer to the documentation
34  * for those mutators for mathematical details.
35  */
36 struct UpdateGauge {
37  using const_global_cache_tags = tmpl::list<Tags::LMax>;
38 
39  template <typename DbTags, typename... InboxTags, typename Metavariables,
40  typename ArrayIndex, typename ActionList,
41  typename ParallelComponent>
42  static std::tuple<db::DataBox<DbTags>&&> apply(
44  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
46  const ArrayIndex& /*array_index*/, const ActionList /*meta*/,
47  const ParallelComponent* const /*meta*/) noexcept {
50  make_not_null(&box));
52  Tags::GaugeC, Tags::GaugeD, Tags::CauchyAngularCoords,
54  db::mutate_apply<GaugeUpdateInterpolator<Tags::CauchyAngularCoords>>(
55  make_not_null(&box));
56  db::mutate_apply<GaugeUpdateOmega>(make_not_null(&box));
57  return {std::move(box)};
58  }
59 };
60 } // namespace Actions
61 } // namespace Cce
The set of utilities for performing Cauchy characteristic evolution and Cauchy characteristic matchin...
Definition: BoundaryComputeAndSendToEvolution.hpp:24
From the angular coordinates AngularCoordinateTag and the Cartesian coordinates CartesianCoordinateTa...
Definition: GaugeTransformBoundaryData.hpp:663
The spin-weight 0 angular Jacobian factor.
Definition: Tags.hpp:150
The spin-weight 2 angular Jacobian factor.
Definition: Tags.hpp:145
Updates all of the gauge quantities associated with the additional regularity-preserving gauge transf...
Definition: UpdateGauge.hpp:36
Update the angular coordinates stored in AngularTag via trigonometric operations applied to the Carte...
Definition: GaugeTransformBoundaryData.hpp:593
constexpr auto mutate_apply(F &&f, const gsl::not_null< DataBox< BoxTags > *> box, Args &&... args) noexcept(DataBox_detail::check_mutate_apply_mutate_tags(BoxTags{}, MutateTags{}) and DataBox_detail::check_mutate_apply_argument_tags(BoxTags{}, ArgumentTags{}) and noexcept(DataBox_detail::mutate_apply(f, box, MutateTags{}, ArgumentTags{}, std::forward< Args >(args)...)))
Apply the invokable f mutating items MutateTags and taking as additional arguments ArgumentTags and a...
Definition: DataBox.hpp:1851
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)
Definition: Tags.hpp:165
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: Tags.hpp:171
Definition: ComputeTimeDerivative.hpp:29