SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/Cce/Actions - UpdateGauge.hpp Hit Total Coverage
Commit: 3c072f0ce967e2e56649d3fa12aa2a0e4fe2a42e Lines: 1 4 25.0 %
Date: 2024-04-23 20:50:18
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <cstddef>
       7             : #include <optional>
       8             : #include <tuple>
       9             : #include <utility>
      10             : 
      11             : #include "DataStructures/DataBox/DataBox.hpp"
      12             : #include "Evolution/Systems/Cce/GaugeTransformBoundaryData.hpp"
      13             : #include "Evolution/Systems/Cce/OptionTags.hpp"
      14             : #include "Parallel/AlgorithmExecution.hpp"
      15             : #include "Parallel/GlobalCache.hpp"
      16             : #include "Utilities/Gsl.hpp"
      17             : #include "Utilities/TMPL.hpp"
      18             : 
      19             : namespace Cce {
      20             : namespace Actions {
      21             : 
      22             : /*!
      23             :  * \ingroup ActionsGroup
      24             :  * \brief Updates all of the gauge quantities associated with the additional
      25             :  * regularity-preserving gauge transformation on the boundaries for a new set of
      26             :  * Cauchy and partially flat Bondi-like coordinates.
      27             :  *
      28             :  * \details This action is to be called after `Tags::CauchyCartesianCoords`
      29             :  * and `Tags::PartiallyFlatCartesianCoords` have been updated, typically via a
      30             :  * time step of a set of coordinate evolution equations. It prepares the
      31             :  * gauge quantities in the \ref DataBoxGroup for calls to the individual
      32             :  * `GaugeAdjustedBoundaryValue` specializations.
      33             :  *
      34             :  * Internally, this dispatches to `GaugeUpdateAngularFromCartesian`,
      35             :  * `GaugeUpdateJacobianFromCoordinates`, `GaugeUpdateInterpolator`, and
      36             :  * `GaugeUpdateOmega` to perform the computations. Refer to the documentation
      37             :  * for those mutators for mathematical details.
      38             :  */
      39             : template <bool EvolveCcm>
      40           1 : struct UpdateGauge {
      41           0 :   using const_global_cache_tags = tmpl::list<Tags::LMax>;
      42             : 
      43             :   template <typename DbTags, typename... InboxTags, typename Metavariables,
      44             :             typename ArrayIndex, typename ActionList,
      45             :             typename ParallelComponent>
      46           0 :   static Parallel::iterable_action_return_t apply(
      47             :       db::DataBox<DbTags>& box,
      48             :       const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
      49             :       const Parallel::GlobalCache<Metavariables>& /*cache*/,
      50             :       const ArrayIndex& /*array_index*/, const ActionList /*meta*/,
      51             :       const ParallelComponent* const /*meta*/) {
      52             :     db::mutate_apply<GaugeUpdateAngularFromCartesian<
      53             :         Tags::CauchyAngularCoords, Tags::CauchyCartesianCoords>>(
      54             :         make_not_null(&box));
      55             :     db::mutate_apply<GaugeUpdateJacobianFromCoordinates<
      56             :         Tags::PartiallyFlatGaugeC, Tags::PartiallyFlatGaugeD,
      57             :         Tags::CauchyAngularCoords, Tags::CauchyCartesianCoords>>(
      58             :         make_not_null(&box));
      59             :     db::mutate_apply<GaugeUpdateInterpolator<Tags::CauchyAngularCoords>>(
      60             :         make_not_null(&box));
      61             :     db::mutate_apply<
      62             :         GaugeUpdateOmega<Tags::PartiallyFlatGaugeC, Tags::PartiallyFlatGaugeD,
      63             :                          Tags::PartiallyFlatGaugeOmega>>(make_not_null(&box));
      64             : 
      65             :     if constexpr (EvolveCcm) {
      66             :       db::mutate_apply<
      67             :           GaugeUpdateAngularFromCartesian<Tags::PartiallyFlatAngularCoords,
      68             :                                           Tags::PartiallyFlatCartesianCoords>>(
      69             :           make_not_null(&box));
      70             :       db::mutate_apply<GaugeUpdateJacobianFromCoordinates<
      71             :           Tags::CauchyGaugeC, Tags::CauchyGaugeD,
      72             :           Tags::PartiallyFlatAngularCoords,
      73             :           Tags::PartiallyFlatCartesianCoords>>(make_not_null(&box));
      74             :       db::mutate_apply<
      75             :           GaugeUpdateInterpolator<Tags::PartiallyFlatAngularCoords>>(
      76             :           make_not_null(&box));
      77             :       db::mutate_apply<GaugeUpdateOmega<Tags::CauchyGaugeC, Tags::CauchyGaugeD,
      78             :                                         Tags::CauchyGaugeOmega>>(
      79             :           make_not_null(&box));
      80             :     }
      81             :     return {Parallel::AlgorithmExecution::Continue, std::nullopt};
      82             :   }
      83             : };
      84             : }  // namespace Actions
      85             : }  // namespace Cce

Generated by: LCOV version 1.14