SpECTRE Documentation Coverage Report
 Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean/Subcell - PrimitiveGhostData.hpp Hit Total Coverage Commit: b5ffa4904430ccef0b226f73dcd25c74cb5188f6 Lines: 2 11 18.2 % 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 "DataStructures/VariablesTag.hpp" 7 : #include "Domain/Tags.hpp" 8 : #include "Evolution/DgSubcell/Tags/Mesh.hpp" 9 : #include "PointwiseFunctions/Hydro/Tags.hpp" 10 : #include "Utilities/TMPL.hpp" 11 : 12 : /// \cond 13 : class DataVector; 14 : template 15 : class Mesh; 16 : template 17 : class Variables; 18 : /// \endcond 19 : 20 : namespace grmhd::ValenciaDivClean::subcell { 21 : /*! 22 : * \brief Computes the rest mass density \f$\rho\f$, pressure \f$p\f$, 23 : * Lorentz factor times the spatial velocity \f$W v^i\f$, magnetic field 24 : * \f$B^i\f$, and the divergence cleaning field \f$\Phi\f$ on the subcells so 25 : * they can be used for reconstruction. 26 : * 27 : * The computation copies the data from the primitive variables to a new 28 : * Variables and computes \f$W v^i\f$. In the future we will likely want to 29 : * elide this copy but that requires support from the actions. 30 : * 31 : * This mutator is passed to 32 : * evolution::dg::subcell::Actions::SendDataForReconstruction. 33 : */ 34 1 : class PrimitiveGhostDataOnSubcells { 35 : private: 36 0 : using prims_to_reconstruct_tags = 37 : tmpl::list, 38 : hydro::Tags::Pressure, 39 : hydro::Tags::LorentzFactorTimesSpatialVelocity, 40 : hydro::Tags::MagneticField, 41 : hydro::Tags::DivergenceCleaningField>; 42 : 43 : public: 44 0 : using return_tags = tmpl::list<>; 45 0 : using argument_tags = 46 : tmpl::list<::Tags::Variables>>; 47 : 48 0 : static Variables apply( 49 : const Variables>& prims) noexcept; 50 : }; 51 : 52 : /*! 53 : * \brief Projects the rest mass density \f$\rho\f$, pressure \f$p\f$, Lorentz 54 : * factor times the spatial velocity \f$W v^i\f$, magnetic field \f$B^i\f$, and 55 : * the divergence cleaning field \f$\Phi\f$ so they can be projected to the 56 : * subcells and sent to neighbors for subcell reconstruction. 57 : * 58 : * The computation copies the data from the primitive variables to a new 59 : * Variables and computes \f$W v^i\f$, then does the projection. In the future 60 : * we will likely want to elide this copy but that requires support from the 61 : * actions. 62 : * 63 : * This mutator is passed what Metavars::SubcellOptions::GhostDataToSlice must 64 : * be set to. 65 : * 66 : * \note We are ultimately projecting the primitive variables rather than 67 : * computing them on the subcells. This introduces truncation level errors, but 68 : * from tests so far this seems to be fine and is what is done with local time 69 : * stepping ADER-DG. 70 : */ 71 1 : class PrimitiveGhostDataToSlice { 72 : private: 73 0 : using prims_to_reconstruct_tags = 74 : tmpl::list, 75 : hydro::Tags::Pressure, 76 : hydro::Tags::LorentzFactorTimesSpatialVelocity, 77 : hydro::Tags::MagneticField, 78 : hydro::Tags::DivergenceCleaningField>; 79 : 80 : public: 81 0 : using return_tags = tmpl::list<>; 82 0 : using argument_tags = 83 : tmpl::list<::Tags::Variables>, 84 : domain::Tags::Mesh<3>, evolution::dg::subcell::Tags::Mesh<3>>; 85 : 86 0 : static Variables apply( 87 : const Variables>& prims, 88 : const Mesh<3>& dg_mesh, const Mesh<3>& subcell_mesh) noexcept; 89 : }; 90 : } // namespace grmhd::ValenciaDivClean::subcell 

 Generated by: LCOV version 1.14