SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Conservative - UpdateConservatives.hpp Hit Total Coverage
Commit: 1346ad6481207e62443c625b65dc162a206d7d67 Lines: 1 4 25.0 %
Date: 2024-04-25 18:47:43
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 <optional>
       7             : #include <tuple>
       8             : 
       9             : #include "DataStructures/DataBox/DataBox.hpp"
      10             : #include "Parallel/AlgorithmExecution.hpp"
      11             : #include "Utilities/Requires.hpp"
      12             : #include "Utilities/TMPL.hpp"
      13             : #include "Utilities/TaggedTuple.hpp"
      14             : 
      15             : /// \cond
      16             : namespace Parallel {
      17             : template <typename Metavariables>
      18             : class GlobalCache;
      19             : }  // namespace Parallel
      20             : // IWYU pragma: no_forward_declare db::DataBox
      21             : /// \endcond
      22             : 
      23           0 : namespace Actions {
      24             : /// \ingroup ActionsGroup
      25             : /// \brief Compute the conservative variables from the primitive variables
      26             : ///
      27             : /// Uses:
      28             : /// - DataBox: Items in system::conservative_from_primitive::argument_tags
      29             : ///
      30             : /// DataBox changes:
      31             : /// - Adds: nothing
      32             : /// - Removes: nothing
      33             : /// - Modifies: Metavariables::system::conservative_from_primitive::return_tags
      34           1 : struct UpdateConservatives {
      35             :   template <typename DbTagsList, typename... InboxTags, typename Metavariables,
      36             :             typename ArrayIndex, typename ActionList,
      37             :             typename ParallelComponent,
      38             :             Requires<tmpl::size<DbTagsList>::value != 0> = nullptr>
      39           0 :   static Parallel::iterable_action_return_t apply(
      40             :       db::DataBox<DbTagsList>& box,
      41             :       const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
      42             :       const Parallel::GlobalCache<Metavariables>& /*cache*/,
      43             :       const ArrayIndex& /*array_index*/, const ActionList /*meta*/,
      44             :       const ParallelComponent* const /*meta*/) {
      45             :     db::mutate_apply<
      46             :         typename Metavariables::system::conservative_from_primitive>(
      47             :         make_not_null(&box));
      48             :     return {Parallel::AlgorithmExecution::Continue, std::nullopt};
      49             :   }
      50             : };
      51             : }  // namespace Actions

Generated by: LCOV version 1.14