Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 : #include <tuple>
8 :
9 : #include "DataStructures/Tensor/TypeAliases.hpp"
10 : #include "Domain/Tags.hpp"
11 : #include "Evolution/DgSubcell/RdmpTciData.hpp"
12 : #include "Evolution/DgSubcell/Tags/DataForRdmpTci.hpp"
13 : #include "Evolution/DgSubcell/Tags/Mesh.hpp"
14 : #include "Evolution/DgSubcell/Tags/SubcellOptions.hpp"
15 : #include "Evolution/Systems/ScalarAdvection/Subcell/TciOptions.hpp"
16 : #include "Evolution/Systems/ScalarAdvection/Tags.hpp"
17 : #include "Utilities/TMPL.hpp"
18 :
19 : /// \cond
20 : class DataVector;
21 : template <size_t Dim>
22 : class Mesh;
23 : /// \endcond
24 :
25 : namespace ScalarAdvection::subcell {
26 : /*!
27 : * \brief Troubled-cell indicator applied to the finite difference subcell
28 : * solution to check if the corresponding DG solution is admissible.
29 : *
30 : * Applies 1) the RDMP TCI to \f$U\f$ and 2) the Persson TCI to \f$U\f$ if the
31 : * \f$\max(|U|)\f$ on the DG grid is greater than `tci_options.u_cutoff`.
32 : */
33 : template <size_t Dim>
34 1 : struct TciOnFdGrid {
35 0 : using return_tags = tmpl::list<>;
36 0 : using argument_tags =
37 : tmpl::list<ScalarAdvection::Tags::U, ::domain::Tags::Mesh<Dim>,
38 : evolution::dg::subcell::Tags::Mesh<Dim>,
39 : evolution::dg::subcell::Tags::DataForRdmpTci,
40 : evolution::dg::subcell::Tags::SubcellOptions<Dim>,
41 : Tags::TciOptions>;
42 :
43 0 : static std::tuple<bool, evolution::dg::subcell::RdmpTciData> apply(
44 : const Scalar<DataVector>& subcell_u, const Mesh<Dim>& dg_mesh,
45 : const Mesh<Dim>& subcell_mesh,
46 : const evolution::dg::subcell::RdmpTciData& past_rdmp_tci_data,
47 : const evolution::dg::subcell::SubcellOptions& subcell_options,
48 : const TciOptions& tci_options, double persson_exponent,
49 : bool need_rdmp_data_only);
50 : };
51 : } // namespace ScalarAdvection::subcell
|