SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean/FiniteDifference - ReconstructWork.hpp Hit Total Coverage
Commit: e93d8312de4f331d36b5aa00ea83a894e26dfcb7 Lines: 2 3 66.7 %
Date: 2021-09-24 22:40:29
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 <array>
       7             : #include <boost/functional/hash.hpp>
       8             : #include <cstddef>
       9             : #include <utility>
      10             : 
      11             : #include "DataStructures/FixedHashMap.hpp"
      12             : #include "DataStructures/Tensor/TypeAliases.hpp"
      13             : #include "Domain/Structure/MaxNumberOfNeighbors.hpp"
      14             : 
      15             : /// \cond
      16             : template <typename TagsList>
      17             : class Variables;
      18             : namespace gsl {
      19             : template <typename>
      20             : class not_null;
      21             : }  // namespace gsl
      22             : template <size_t Dim>
      23             : class Direction;
      24             : template <size_t Dim>
      25             : class ElementId;
      26             : template <size_t Dim>
      27             : class Element;
      28             : template <size_t Dim>
      29             : class Mesh;
      30             : namespace evolution::dg::subcell {
      31             : class NeighborData;
      32             : }  // namespace evolution::dg::subcell
      33             : namespace EquationsOfState {
      34             : template <bool IsRelativistic, size_t ThermodynamicDim>
      35             : class EquationOfState;
      36             : }  // namespace EquationsOfState
      37             : /// \endcond
      38             : 
      39             : namespace grmhd::ValenciaDivClean::fd {
      40             : /*!
      41             :  * \brief Reconstructs \f$\rho, p, u_i, B^i\f$, and \f$\Phi\f$, then computes
      42             :  * the Lorentz factor, upper spatial velocity, specific internal energy,
      43             :  * specific enthalpy, and the conserved variables. All results are written into
      44             :  * `vars_on_lower_face` and `vars_on_upper_face`.
      45             :  */
      46             : template <typename PrimsTags, typename TagsList, size_t ThermodynamicDim,
      47             :           typename F>
      48           1 : void reconstruct_prims_work(
      49             :     gsl::not_null<std::array<Variables<TagsList>, 3>*> vars_on_lower_face,
      50             :     gsl::not_null<std::array<Variables<TagsList>, 3>*> vars_on_upper_face,
      51             :     const F& reconstruct, const Variables<PrimsTags>& volume_prims,
      52             :     const EquationsOfState::EquationOfState<true, ThermodynamicDim>& eos,
      53             :     const Element<3>& element,
      54             :     const FixedHashMap<maximum_number_of_neighbors(3) + 1,
      55             :                        std::pair<Direction<3>, ElementId<3>>,
      56             :                        evolution::dg::subcell::NeighborData,
      57             :                        boost::hash<std::pair<Direction<3>, ElementId<3>>>>
      58             :         neighbor_data,
      59             :     const Mesh<3>& subcell_mesh, size_t ghost_zone_size) noexcept;
      60             : 
      61             : /*!
      62             :  * \brief Reconstructs the mass density, velocity, and pressure, then computes
      63             :  * the specific internal energy and conserved variables. All results are written
      64             :  * into `vars_on_face`.
      65             :  *
      66             :  * This is used on DG elements to reconstruct their subcell neighbors' solution
      67             :  * on the shared faces.
      68             :  */
      69             : template <typename TagsList, typename PrimsTags, size_t ThermodynamicDim,
      70             :           typename F0, typename F1>
      71           1 : void reconstruct_fd_neighbor_work(
      72             :     gsl::not_null<Variables<TagsList>*> vars_on_face,
      73             :     const F0& reconstruct_lower_neighbor, const F1& reconstruct_upper_neighbor,
      74             :     const Variables<PrimsTags>& subcell_volume_prims,
      75             :     const EquationsOfState::EquationOfState<true, ThermodynamicDim>& eos,
      76             :     const Element<3>& element,
      77             :     const FixedHashMap<maximum_number_of_neighbors(3) + 1,
      78             :                        std::pair<Direction<3>, ElementId<3>>,
      79             :                        evolution::dg::subcell::NeighborData,
      80             :                        boost::hash<std::pair<Direction<3>, ElementId<3>>>>
      81             :         neighbor_data,
      82             :     const Mesh<3>& subcell_mesh, const Direction<3>& direction_to_reconstruct,
      83             :     const size_t ghost_zone_size) noexcept;
      84             : }  // namespace grmhd::ValenciaDivClean::fd

Generated by: LCOV version 1.14