SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/NewtonianEuler/Subcell - PrimsAfterRollback.hpp Hit Total Coverage
Commit: b5ffa4904430ccef0b226f73dcd25c74cb5188f6 Lines: 1 9 11.1 %
Date: 2021-07-28 22:05: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             : 
       8             : #include "DataStructures/Tensor/TypeAliases.hpp"
       9             : #include "DataStructures/VariablesTag.hpp"
      10             : #include "Domain/Tags.hpp"
      11             : #include "Evolution/DgSubcell/Tags/DidRollback.hpp"
      12             : #include "Evolution/DgSubcell/Tags/Mesh.hpp"
      13             : #include "Evolution/Systems/NewtonianEuler/Tags.hpp"
      14             : #include "PointwiseFunctions/Hydro/Tags.hpp"
      15             : #include "Utilities/TMPL.hpp"
      16             : 
      17             : /// \cond
      18             : class DataVector;
      19             : namespace EquationsOfState {
      20             : template <bool IsRelativistic, size_t ThermodynamicDim>
      21             : class EquationOfState;
      22             : }  // namespace EquationsOfState
      23             : template <size_t Dim>
      24             : class Mesh;
      25             : namespace gsl {
      26             : template <typename T>
      27             : class not_null;
      28             : }  // namespace gsl
      29             : template <typename TagsList>
      30             : class Variables;
      31             : /// \endcond
      32             : 
      33             : namespace NewtonianEuler::subcell {
      34             : /*!
      35             :  * \brief Mutator that resizes the primitive variables to the subcell mesh and
      36             :  * computes the primitives, but only if
      37             :  * `evolution::dg::subcell::Tags::DidRollback` is `true`.
      38             :  *
      39             :  * In the DG-subcell `step_actions` list this will normally be called using the
      40             :  * `::Actions::MutateApply` action right after the
      41             :  * `evolution::dg::subcell::Actions::Labels::BeginSubcellAfterDgRollback` label.
      42             :  */
      43             : template <size_t Dim>
      44           1 : struct PrimsAfterRollback {
      45             :  private:
      46           0 :   using MassDensity = NewtonianEuler::Tags::MassDensity<DataVector>;
      47           0 :   using Velocity = NewtonianEuler::Tags::Velocity<DataVector, Dim>;
      48           0 :   using SpecificInternalEnergy =
      49             :       NewtonianEuler::Tags::SpecificInternalEnergy<DataVector>;
      50           0 :   using Pressure = NewtonianEuler::Tags::Pressure<DataVector>;
      51             : 
      52             :  public:
      53           0 :   using return_tags = tmpl::list<::Tags::Variables<
      54             :       tmpl::list<MassDensity, Velocity, SpecificInternalEnergy, Pressure>>>;
      55           0 :   using argument_tags =
      56             :       tmpl::list<evolution::dg::subcell::Tags::DidRollback,
      57             :                  evolution::dg::subcell::Tags::Mesh<Dim>, Tags::MassDensityCons,
      58             :                  Tags::MomentumDensity<Dim>, Tags::EnergyDensity,
      59             :                  hydro::Tags::EquationOfStateBase>;
      60             : 
      61             :   template <size_t ThermodynamicDim>
      62           0 :   static void apply(
      63             :       gsl::not_null<Variables<
      64             :           tmpl::list<MassDensity, Velocity, SpecificInternalEnergy, Pressure>>*>
      65             :           prim_vars,
      66             :       bool did_rollback, const Mesh<Dim>& subcell_mesh,
      67             :       const Scalar<DataVector>& mass_density_cons,
      68             :       const tnsr::I<DataVector, Dim>& momentum_density,
      69             :       const Scalar<DataVector>& energy_density,
      70             :       const EquationsOfState::EquationOfState<false, ThermodynamicDim>&
      71             :           equation_of_state) noexcept;
      72             : };
      73             : }  // namespace NewtonianEuler::subcell

Generated by: LCOV version 1.14