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 "PointwiseFunctions/Hydro/Tags.hpp" 8 : #include "Utilities/TMPL.hpp" 9 : 10 : /// \cond 11 : class DataVector; 12 : template <typename T> 13 : class Variables; 14 : /// \endcond 15 : 16 : namespace grmhd::ValenciaDivClean::subcell { 17 : /*! 18 : * \brief Computes the rest mass density \f$\rho\f$, electron fraction 19 : * \f$Y_e\f$, temperature \f$T\f$, Lorentz factor times the spatial velocity 20 : * \f$W v^i\f$, magnetic field \f$B^i\f$, and the divergence cleaning field 21 : * \f$\Phi\f$ so they can be used for reconstruction. 22 : * 23 : * The computation copies the data from the primitive variables to a new 24 : * Variables and computes \f$W v^i\f$. In the future we will likely want to 25 : * elide this copy but that requires support from the actions. 26 : * 27 : * This mutator is passed to 28 : * `evolution::dg::subcell::Actions::SendDataForReconstruction`. 29 : */ 30 1 : class PrimitiveGhostVariables { 31 : private: 32 0 : using prims_to_reconstruct_tags = 33 : tmpl::list<hydro::Tags::RestMassDensity<DataVector>, 34 : hydro::Tags::ElectronFraction<DataVector>, 35 : hydro::Tags::Temperature<DataVector>, 36 : hydro::Tags::LorentzFactorTimesSpatialVelocity<DataVector, 3>, 37 : hydro::Tags::MagneticField<DataVector, 3>, 38 : hydro::Tags::DivergenceCleaningField<DataVector>>; 39 : 40 : public: 41 0 : using return_tags = tmpl::list<>; 42 0 : using argument_tags = 43 : tmpl::list<::Tags::Variables<hydro::grmhd_tags<DataVector>>>; 44 : 45 0 : static DataVector apply(const Variables<hydro::grmhd_tags<DataVector>>& prims, 46 : size_t rdmp_size); 47 : }; 48 : } // namespace grmhd::ValenciaDivClean::subcell