SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean/Subcell - TciOnFdGrid.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 20.0 % 5 1
Test Date: 2026-10-22 17:29:42
Legend: Lines:     hit not hit

            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/GrMhd/ValenciaDivClean/Subcell/TciOptions.hpp"
      16              : #include "Evolution/Systems/GrMhd/ValenciaDivClean/Tags.hpp"
      17              : #include "Evolution/VariableFixing/Tags.hpp"
      18              : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
      19              : #include "PointwiseFunctions/Hydro/Tags.hpp"
      20              : #include "Utilities/TMPL.hpp"
      21              : 
      22              : /// \cond
      23              : class DataVector;
      24              : namespace evolution::dg::subcell {
      25              : class SubcellOptions;
      26              : }  // namespace evolution::dg::subcell
      27              : template <size_t Dim>
      28              : class Mesh;
      29              : /// \endcond
      30              : 
      31              : namespace grmhd::ValenciaDivClean::subcell {
      32              : /*!
      33              :  * \brief The troubled-cell indicator run on the FD grid to check if the
      34              :  * corresponding DG solution is admissible.
      35              :  *
      36              :  * The following checks are done in the order they are listed:
      37              :  *
      38              :  * <table>
      39              :  * <caption>List of checks</caption>
      40              :  * <tr><th> Description <th> TCI status
      41              :  *
      42              :  * <tr><td> the element is not troubled.
      43              :  * <td> `+0`
      44              :  *
      45              :  * <tr><td> if `min(tilde_d)` is less than
      46              :  *  `tci_options.minimum_rest_mass_density_times_lorentz_factor`, then we
      47              :  *  remain on FD.
      48              :  * <td> `+1`
      49              :  *
      50              :  * <tr><td> if `min(tilde_ye)` is less than
      51              :  *  `tci_options.minimum_rest_mass_density_times_lorentz_factor` times
      52              :  *  `tci_options.minimum_ye`, then we remain on FD.
      53              :  * <td> `+2`
      54              :  *
      55              :  * <tr><td> if `min(tilde_tau)` is less than
      56              :  *  `tci_options.minimum_tilde_tau`, then we remain on FD.
      57              :  * <td> `+3`
      58              :  *
      59              :  * <tr><td> if `grmhd::ValenciaDivClean::Tags::VariablesNeededFixing` is `true`
      60              :  *  and the maximum of rest mass density on FD grid is greater than
      61              :  * `tci_options.atmosphere_density`, then we remain on FD.
      62              :  * <td> `+4`
      63              :  *
      64              :  * <tr><td> apply the Persson TCI to \f$\tilde{D}\f$ if the maximum of rest
      65              :  * mass density on FD grid is greater than `tci_options.atmosphere_density`.
      66              :  * <td> `+5`
      67              :  *
      68              :  * <tr><td> apply the Persson TCI to \f$\tilde{Y}_e\f$ if the maximum of rest
      69              :  * mass density on FD grid is greater than `tci_options.atmosphere_density`.
      70              :  * <td> `+6`
      71              :  *
      72              :  * <tr><td> apply the Persson TCI to pressure if the maximum of rest mass
      73              :  * density on FD grid is greater than `tci_options.atmosphere_density`. <td>
      74              :  * `+7`
      75              :  *
      76              :  * <tr><td> apply the RDMP TCI to `TildeD`
      77              :  * <td> `+8`
      78              :  *
      79              :  * <tr><td> apply the RDMP TCI to `TildeYe`
      80              :  * <td> `+9`
      81              :  *
      82              :  * <tr><td> apply the RDMP TCI to `TildeTau`
      83              :  * <td> `+10`
      84              :  *
      85              :  * <tr><td> apply the RDMP TCI to `TildeB`
      86              :  * <td> `+11`
      87              :  *
      88              :  * <tr><td> apply the Persson TCI to the magnitude of \f$\tilde{B}^{n+1}\f$ if
      89              :  * its magnitude is greater than `tci_options.magnetic_field_cutoff`.
      90              :  * <td> `+12`
      91              :  *
      92              :  * </table>
      93              :  *
      94              :  * The second column of the table above denotes the value of an integer stored
      95              :  * as the first element of the returned `std::tuple`, which indicates the
      96              :  * particular kind of check that failed. For example, if the tenth check
      97              :  * (RDMP TCI to TildeTau) fails and cell is marked as troubled, an integer with
      98              :  * value `+10` is stored in the first slot of the returned tuple. Note that this
      99              :  * integer is marking only the _first_ check to fail, since checks are done in a
     100              :  * particular sequence as listed above. If all checks are passed and cell is not
     101              :  * troubled, it is returned with the value `0`.
     102              :  *
     103              :  * \note We adopt positive integers to mark TCI status from FD grid returned by
     104              :  * TciOnFdGrid class. Negative integers are reserved for TCIs on DG grid; see
     105              :  * TciOnDgGrid and its documentation.
     106              :  *
     107              :  */
     108            1 : struct TciOnFdGrid {
     109            0 :   using return_tags = tmpl::list<>;
     110            0 :   using argument_tags =
     111              :       tmpl::list<grmhd::ValenciaDivClean::Tags::TildeD,
     112              :                  grmhd::ValenciaDivClean::Tags::TildeYe,
     113              :                  grmhd::ValenciaDivClean::Tags::TildeTau,
     114              :                  grmhd::ValenciaDivClean::Tags::TildeB<>,
     115              :                  hydro::Tags::RestMassDensity<DataVector>,
     116              :                  hydro::Tags::Pressure<DataVector>,
     117              :                  grmhd::ValenciaDivClean::Tags::VariablesNeededFixing,
     118              :                  domain::Tags::Mesh<3>, evolution::dg::subcell::Tags::Mesh<3>,
     119              :                  evolution::dg::subcell::Tags::DataForRdmpTci, Tags::TciOptions,
     120              :                  evolution::dg::subcell::Tags::SubcellOptions<3>>;
     121            0 :   static std::tuple<int, evolution::dg::subcell::RdmpTciData> apply(
     122              :       const Scalar<DataVector>& subcell_tilde_d,
     123              :       const Scalar<DataVector>& subcell_tilde_ye,
     124              :       const Scalar<DataVector>& subcell_tilde_tau,
     125              :       const tnsr::I<DataVector, 3, Frame::Inertial>& subcell_tilde_b,
     126              :       const Scalar<DataVector>& subcell_rest_mass_density,
     127              :       const Scalar<DataVector>& subcell_pressure, bool vars_needed_fixing,
     128              :       const Mesh<3>& dg_mesh, const Mesh<3>& subcell_mesh,
     129              :       const evolution::dg::subcell::RdmpTciData& past_rdmp_tci_data,
     130              :       const TciOptions& tci_options,
     131              :       const evolution::dg::subcell::SubcellOptions& subcell_options,
     132              :       double persson_exponent, bool need_rdmp_data_only);
     133              : };
     134              : }  // namespace grmhd::ValenciaDivClean::subcell
        

Generated by: LCOV version 2.0-1