TciOnFdGrid.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
9 #include "Domain/Tags.hpp"
10 #include "Evolution/DgSubcell/Tags/Inactive.hpp"
11 #include "Evolution/Systems/GrMhd/ValenciaDivClean/Tags.hpp"
12 #include "Evolution/VariableFixing/Tags.hpp"
13 #include "Utilities/TMPL.hpp"
14 
15 /// \cond
16 class DataVector;
17 template <size_t Dim>
18 class Mesh;
19 /// \endcond
20 
22 /*!
23  * \brief The troubled-cell indicator run on the FD grid to check if the
24  * corresponding DG solution is admissible.
25  *
26  * The following checks are done in the order they are listed:
27  *
28  * - if `grmhd::ValenciaDivClean::Tags::VariablesNeededFixing` is `true` then we
29  * remain on FD. (Note: this could be relaxed in the future if we need to
30  * allow switching from FD to DG in the atmosphere and the current approach
31  * isn't working.)
32  * - apply the Persson TCI to \f$\tilde{D}\f$ and \f$\tilde{\tau}\f$
33  */
34 struct TciOnFdGrid {
35  using return_tags = tmpl::list<>;
36  using argument_tags =
43  static bool apply(const Scalar<DataVector>& tilde_d,
44  const Scalar<DataVector>& tilde_tau,
45  bool vars_needed_fixing, const Mesh<3>& dg_mesh,
46  double persson_exponent) noexcept;
47 };
48 } // namespace grmhd::ValenciaDivClean::subcell
grmhd::ValenciaDivClean::subcell
Code required by the DG-subcell/FD hybrid solver.
Definition: InitialDataTci.hpp:23
Tags.hpp
domain::Tags::Mesh
The computational grid of the Element in the DataBox.
Definition: Tags.hpp:107
grmhd::ValenciaDivClean::Tags::VariablesNeededFixing
Set to true if the variables needed fixing.
Definition: Tags.hpp:62
cstddef
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:46
Mesh
Holds the number of grid points, basis, and quadrature in each direction of the computational grid.
Definition: Mesh.hpp:49
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
TypeAliases.hpp
grmhd::ValenciaDivClean::subcell::TciOnFdGrid
The troubled-cell indicator run on the FD grid to check if the corresponding DG solution is admissibl...
Definition: TciOnFdGrid.hpp:34
grmhd::ValenciaDivClean::Tags::TildeD
The densitized rest-mass density .
Definition: Tags.hpp:31
evolution::dg::subcell::Tags::Inactive
Mark a tag as holding data for the inactive grid.
Definition: Inactive.hpp:23
TMPL.hpp
grmhd::ValenciaDivClean::Tags::TildeTau
The densitized energy density .
Definition: Tags.hpp:36