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 ghost_variables_tag_list = prims_to_reconstruct_tags;
42 0 : using return_tags = tmpl::list<>;
43 0 : using argument_tags =
44 : tmpl::list<::Tags::Variables<hydro::grmhd_tags<DataVector>>>;
45 :
46 0 : static DataVector apply(const Variables<hydro::grmhd_tags<DataVector>>& prims,
47 : size_t rdmp_size);
48 : };
49 : } // namespace grmhd::ValenciaDivClean::subcell
|