SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/GhValenciaDivClean/FiniteDifference - ReconstructWork.hpp Hit Total Coverage
Commit: 2b1dc024a8bbf9c1ffaa73bd52e7a4d32378aea7 Lines: 2 5 40.0 %
Date: 2024-05-07 15:49:09
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 <cstddef>
       8             : #include <utility>
       9             : 
      10             : #include "DataStructures/DataBox/Prefixes.hpp"
      11             : #include "DataStructures/Tensor/TypeAliases.hpp"
      12             : #include "Domain/Structure/DirectionalIdMap.hpp"
      13             : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      14             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Tags.hpp"
      15             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/FiniteDifference/ReconstructWork.hpp"
      16             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/TagsDeclarations.hpp"
      17             : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
      18             : #include "PointwiseFunctions/Hydro/TagsDeclarations.hpp"
      19             : #include "Utilities/TMPL.hpp"
      20             : 
      21             : /// \cond
      22             : class DataVector;
      23             : template <typename TagsList>
      24             : class Variables;
      25             : namespace gsl {
      26             : template <typename>
      27             : class not_null;
      28             : }  // namespace gsl
      29             : template <size_t Dim>
      30             : class Direction;
      31             : template <size_t Dim>
      32             : class ElementId;
      33             : template <size_t Dim>
      34             : class Element;
      35             : template <size_t Dim>
      36             : class Mesh;
      37             : namespace EquationsOfState {
      38             : template <bool IsRelativistic, size_t ThermodynamicDim>
      39             : class EquationOfState;
      40             : }  // namespace EquationsOfState
      41             : namespace evolution::dg::subcell {
      42             : class GhostData;
      43             : }  // namespace evolution::dg::subcell
      44             : namespace evolution::dg::Actions::detail {
      45             : template <size_t Dim>
      46             : struct NormalVector;
      47             : }  // namespace evolution::dg::Actions::detail
      48             : namespace gh::ConstraintDamping::Tags {
      49             : struct ConstraintGamma1;
      50             : struct ConstraintGamma2;
      51             : }  // namespace gh::ConstraintDamping::Tags
      52             : /// \endcond
      53             : 
      54             : namespace grmhd::GhValenciaDivClean::fd {
      55           0 : using tags_list_for_reconstruct =
      56             :     tmpl::push_front<grmhd::ValenciaDivClean::fd::tags_list_for_reconstruct,
      57             :                      gr::Tags::SpacetimeMetric<DataVector, 3>,
      58             :                      gh::Tags::Pi<DataVector, 3>, gh::Tags::Phi<DataVector, 3>>;
      59             : 
      60             : namespace detail {
      61             : using tags_list_for_reconstruct_split_lapse =
      62             :     tmpl::split<tags_list_for_reconstruct, gr::Tags::Lapse<DataVector>>;
      63             : }  // namespace detail
      64             : 
      65           0 : using tags_list_for_reconstruct_fd_neighbor = tmpl::append<
      66             :     tmpl::front<detail::tags_list_for_reconstruct_split_lapse>,
      67             :     tmpl::push_front<tmpl::back<detail::tags_list_for_reconstruct_split_lapse>,
      68             :                      gh::ConstraintDamping::Tags::ConstraintGamma1,
      69             :                      gh::ConstraintDamping::Tags::ConstraintGamma2,
      70             :                      gr::Tags::Lapse<DataVector>>>;
      71             : 
      72             : /*!
      73             :  * \brief Reconstructs \f$\rho, p, Wv^i, B^i\f$, \f$\Phi\f$, and the spacetime
      74             :  * metric, then computes the Lorentz factor, upper spatial velocity, specific
      75             :  * internal energy, and the conserved variables. All results are written into
      76             :  * `vars_on_lower_face` and `vars_on_upper_face`.
      77             :  */
      78             : template <typename SpacetimeTagsToReconstruct,
      79             :           typename PrimTagsForReconstruction, typename PrimsTags,
      80             :           typename SpacetimeAndConsTags, size_t ThermodynamicDim,
      81             :           typename HydroReconstructor, typename SpacetimeReconstructor,
      82             :           typename ComputeGrmhdSpacetimeVarsFromReconstructedSpacetimeTags,
      83             :           typename PrimsTagsSentByNeighbor>
      84           1 : void reconstruct_prims_work(
      85             :     gsl::not_null<std::array<Variables<tags_list_for_reconstruct>, 3>*>
      86             :         vars_on_lower_face,
      87             :     gsl::not_null<std::array<Variables<tags_list_for_reconstruct>, 3>*>
      88             :         vars_on_upper_face,
      89             :     const HydroReconstructor& hydro_reconstructor,
      90             :     const SpacetimeReconstructor& spacetime_reconstructor,
      91             :     const ComputeGrmhdSpacetimeVarsFromReconstructedSpacetimeTags&
      92             :         spacetime_vars_for_grmhd,
      93             :     const Variables<PrimsTags>& volume_prims,
      94             :     const Variables<SpacetimeAndConsTags>& volume_spacetime_and_cons_vars,
      95             :     const EquationsOfState::EquationOfState<true, ThermodynamicDim>& eos,
      96             :     const Element<3>& element,
      97             :     const DirectionalIdMap<3, Variables<PrimsTagsSentByNeighbor>>&
      98             :         neighbor_data,
      99             :     const Mesh<3>& subcell_mesh, size_t ghost_zone_size,
     100             :     bool compute_conservatives);
     101             : 
     102             : /*!
     103             :  * \brief Reconstructs \f$\rho, p, Wv^i, B^i\f$, \f$\Phi\f$, the spacetime
     104             :  * metric, \f$\Phi_{iab}\f$, and \f$\Pi_{ab}\f$, then computes the Lorentz
     105             :  * factor, upper spatial velocity, specific internal energy, and the conserved
     106             :  * variables. All results are written into `vars_on_face`.
     107             :  *
     108             :  * This is used on DG elements to reconstruct their subcell neighbors' solution
     109             :  * on the shared faces.
     110             :  */
     111             : template <
     112             :     typename SpacetimeTagsToReconstruct, typename PrimTagsForReconstruction,
     113             :     typename PrimsTagsSentByNeighbor, typename PrimsTags,
     114             :     size_t ThermodynamicDim, typename LowerHydroReconstructor,
     115             :     typename LowerSpacetimeReconstructor, typename UpperHydroReconstructor,
     116             :     typename UpperSpacetimeReconstructor,
     117             :     typename ComputeGrmhdSpacetimeVarsFromReconstructedSpacetimeTags>
     118           1 : void reconstruct_fd_neighbor_work(
     119             :     gsl::not_null<Variables<tags_list_for_reconstruct_fd_neighbor>*>
     120             :         vars_on_face,
     121             :     const LowerHydroReconstructor& reconstruct_lower_neighbor_hydro,
     122             :     const LowerSpacetimeReconstructor& reconstruct_lower_neighbor_spacetime,
     123             :     const UpperHydroReconstructor& reconstruct_upper_neighbor_hydro,
     124             :     const UpperSpacetimeReconstructor& reconstruct_upper_neighbor_spacetime,
     125             :     const ComputeGrmhdSpacetimeVarsFromReconstructedSpacetimeTags&
     126             :         spacetime_vars_for_grmhd,
     127             :     const Variables<PrimsTags>& subcell_volume_prims,
     128             :     const Variables<
     129             :         grmhd::GhValenciaDivClean::Tags::spacetime_reconstruction_tags>&
     130             :         subcell_volume_spacetime_vars,
     131             :     const EquationsOfState::EquationOfState<true, ThermodynamicDim>& eos,
     132             :     const Element<3>& element,
     133             :     const DirectionalIdMap<3, evolution::dg::subcell::GhostData>& ghost_data,
     134             :     const Mesh<3>& subcell_mesh, const Direction<3>& direction_to_reconstruct,
     135             :     size_t ghost_zone_size, bool compute_conservatives);
     136             : }  // namespace grmhd::GhValenciaDivClean::fd

Generated by: LCOV version 1.14