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/Tensor/TypeAliases.hpp"
7 : #include "DataStructures/VariablesTag.hpp"
8 : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
9 : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/Tags.hpp"
10 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
11 : #include "PointwiseFunctions/Hydro/Tags.hpp"
12 : #include "Utilities/TMPL.hpp"
13 :
14 : /// \cond
15 : class DataVector;
16 : template <typename T>
17 : class Variables;
18 : /// \endcond
19 :
20 : namespace grmhd::GhValenciaDivClean::subcell {
21 : /*!
22 : * \brief Computes the rest mass density \f$\rho\f$, electron fraction
23 : * \f$Y_e\f$, pressure \f$p\f$, Lorentz factor times the spatial velocity \f$W
24 : * v^i\f$, magnetic field \f$B^i\f$, the divergence cleaning field \f$\Phi\f$,
25 : * and the generalized harmonic evolved variables \f$g_{ab}\f$, \f$\Phi_{iab}\f$
26 : * and \f$\Pi_{ab}\f$ on the subcells so they can be used for reconstruction.
27 : *
28 : * The computation copies the data from the primitive variables to a new
29 : * Variables and computes \f$W v^i\f$. In the future we will likely want to
30 : * elide this copy but that requires support from the actions.
31 : *
32 : * This mutator is passed to
33 : * `evolution::dg::subcell::Actions::SendDataForReconstruction`.
34 : *
35 : * \note Only called on elements using FD.
36 : */
37 1 : class PrimitiveGhostVariables {
38 : public:
39 0 : using ghost_variables_tag_list = GhValenciaDivClean::Tags::
40 : primitive_grmhd_and_spacetime_reconstruction_tags;
41 0 : using return_tags = tmpl::list<>;
42 0 : using argument_tags =
43 : tmpl::list<::Tags::Variables<hydro::grmhd_tags<DataVector>>,
44 : gr::Tags::SpacetimeMetric<DataVector, 3>,
45 : gh::Tags::Phi<DataVector, 3>, gh::Tags::Pi<DataVector, 3>>;
46 :
47 0 : static DataVector apply(
48 : const Variables<hydro::grmhd_tags<DataVector>>& prims,
49 : const tnsr::aa<DataVector, 3, Frame::Inertial>& spacetime_metric,
50 : const tnsr::iaa<DataVector, 3, Frame::Inertial>& phi,
51 : const tnsr::aa<DataVector, 3, Frame::Inertial>& pi, size_t rdmp_size);
52 : };
53 : } // namespace grmhd::GhValenciaDivClean::subcell
|