SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GrMhd/ValenciaDivClean/Subcell - TciOnFdGrid.hpp Hit Total Coverage
Commit: 3c072f0ce967e2e56649d3fa12aa2a0e4fe2a42e Lines: 1 5 20.0 %
Date: 2024-04-23 20:50:18
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> if `min(tilde_d)` is less than
      43             :  *  `tci_options.minimum_rest_mass_density_times_lorentz_factor`, or if
      44             :  *  `min(tilde_ye)` is less than
      45             :  *  `tci_options.minimum_rest_mass_density_times_lorentz_factor` times
      46             :  *  `tci_options.minimum_ye`, or if `min(tilde_tau)` is less than
      47             :  *  `tci_options.minimum_tilde_tau`, then the we remain on FD.
      48             :  * <td> `+1`
      49             :  *
      50             :  * <tr><td> if `grmhd::ValenciaDivClean::Tags::VariablesNeededFixing` is `true`
      51             :  *  and the maximum of rest mass density on FD grid is greater than
      52             :  * `tci_options.atmosphere_density`, then we remain on FD.
      53             :  * <td> `+2`
      54             :  *
      55             :  * <tr><td> apply the Persson TCI to \f$\tilde{D}\f$, \f$\tilde{Y}_e\f$, and
      56             :  * pressure if the maximum of rest mass density on FD grid is greater than
      57             :  * `tci_options.atmosphere_density`.
      58             :  * <td> `+3`
      59             :  *
      60             :  * <tr><td> apply the Persson TCI to \f$\tilde{Y}_e\f$ if the maximum of rest
      61             :  * mass density on FD grid is greater than `tci_options.atmosphere_density`.
      62             :  * <td> `+4`
      63             :  *
      64             :  * <tr><td> apply the Persson TCI to pressure if the maximum of rest mass
      65             :  * density on FD grid is greater than `tci_options.atmosphere_density`. <td>
      66             :  * `+5`
      67             :  *
      68             :  * <tr><td> apply the RDMP TCI to `TildeD`
      69             :  * <td> `+6`
      70             :  *
      71             :  * <tr><td> apply the RDMP TCI to `TildeYe`
      72             :  * <td> `+7`
      73             :  *
      74             :  * <tr><td> apply the RDMP TCI to `TildeTau`
      75             :  * <td> `+8`
      76             :  *
      77             :  * <tr><td> apply the RDMP TCI to `TildeB`
      78             :  * <td> `+9`
      79             :  *
      80             :  * <tr><td> apply the Persson TCI to the magnitude of \f$\tilde{B}^{n+1}\f$ if
      81             :  * its magnitude is greater than `tci_options.magnetic_field_cutoff`.
      82             :  * <td> `+10`
      83             :  *
      84             :  * </table>
      85             :  *
      86             :  * The second column of the table above denotes the value of an integer stored
      87             :  * as the first element of the returned `std::tuple`, which indicates the
      88             :  * particular kind of check that failed. For example, if the fifth check
      89             :  * (RDMP TCI to TildeTau) fails and cell is marked as troubled, an integer with
      90             :  * value `+5` is stored in the first slot of the returned tuple. Note that this
      91             :  * integer is marking only the _first_ check to fail, since checks are done in a
      92             :  * particular sequence as listed above. If all checks are passed and cell is not
      93             :  * troubled, it is returned with the value `0`.
      94             :  *
      95             :  * \note We adopt positive integers to mark TCI status from FD grid returned by
      96             :  * TciOnFdGrid class. Negative integers are reserved for TCIs on DG grid; see
      97             :  * TciOnDgGrid and its documentation.
      98             :  *
      99             :  */
     100           1 : struct TciOnFdGrid {
     101           0 :   using return_tags = tmpl::list<>;
     102           0 :   using argument_tags =
     103             :       tmpl::list<grmhd::ValenciaDivClean::Tags::TildeD,
     104             :                  grmhd::ValenciaDivClean::Tags::TildeYe,
     105             :                  grmhd::ValenciaDivClean::Tags::TildeTau,
     106             :                  grmhd::ValenciaDivClean::Tags::TildeB<>,
     107             :                  hydro::Tags::RestMassDensity<DataVector>,
     108             :                  hydro::Tags::Pressure<DataVector>,
     109             :                  grmhd::ValenciaDivClean::Tags::VariablesNeededFixing,
     110             :                  domain::Tags::Mesh<3>, evolution::dg::subcell::Tags::Mesh<3>,
     111             :                  evolution::dg::subcell::Tags::DataForRdmpTci, Tags::TciOptions,
     112             :                  evolution::dg::subcell::Tags::SubcellOptions<3>>;
     113           0 :   static std::tuple<int, evolution::dg::subcell::RdmpTciData> apply(
     114             :       const Scalar<DataVector>& subcell_tilde_d,
     115             :       const Scalar<DataVector>& subcell_tilde_ye,
     116             :       const Scalar<DataVector>& subcell_tilde_tau,
     117             :       const tnsr::I<DataVector, 3, Frame::Inertial>& subcell_tilde_b,
     118             :       const Scalar<DataVector>& subcell_rest_mass_density,
     119             :       const Scalar<DataVector>& subcell_pressure, bool vars_needed_fixing,
     120             :       const Mesh<3>& dg_mesh, const Mesh<3>& subcell_mesh,
     121             :       const evolution::dg::subcell::RdmpTciData& past_rdmp_tci_data,
     122             :       const TciOptions& tci_options,
     123             :       const evolution::dg::subcell::SubcellOptions& subcell_options,
     124             :       double persson_exponent, bool need_rdmp_data_only);
     125             : };
     126             : }  // namespace grmhd::ValenciaDivClean::subcell

Generated by: LCOV version 1.14