SpECTRE  v2024.04.12
grmhd::ValenciaDivClean::subcell::TciOnDgGrid< RecoveryScheme > Class Template Reference

The troubled-cell indicator run on the DG grid to check if the solution is admissible. More...

#include <TciOnDgGrid.hpp>

Public Types

using return_tags = tmpl::list<::Tags::Variables< hydro::grmhd_tags< DataVector > > >
 
using argument_tags = tmpl::list< grmhd::ValenciaDivClean::Tags::TildeD, grmhd::ValenciaDivClean::Tags::TildeYe, grmhd::ValenciaDivClean::Tags::TildeTau, grmhd::ValenciaDivClean::Tags::TildeS<>, grmhd::ValenciaDivClean::Tags::TildeB<>, grmhd::ValenciaDivClean::Tags::TildePhi, gr::Tags::SpatialMetric< DataVector, 3 >, gr::Tags::InverseSpatialMetric< DataVector, 3 >, gr::Tags::SqrtDetSpatialMetric< DataVector >, hydro::Tags::GrmhdEquationOfState, domain::Tags::Mesh< 3 >, evolution::dg::subcell::Tags::Mesh< 3 >, evolution::dg::subcell::Tags::DataForRdmpTci, Tags::TciOptions, evolution::dg::subcell::Tags::SubcellOptions< 3 >, grmhd::ValenciaDivClean::Tags::PrimitiveFromConservativeOptions >
 

Static Public Member Functions

static std::tuple< int, evolution::dg::subcell::RdmpTciDataapply (gsl::not_null< Variables< hydro::grmhd_tags< DataVector > > * > dg_prim_vars, const Scalar< DataVector > &tilde_d, const Scalar< DataVector > &tilde_ye, const Scalar< DataVector > &tilde_tau, const tnsr::i< DataVector, 3, Frame::Inertial > &tilde_s, const tnsr::I< DataVector, 3, Frame::Inertial > &tilde_b, const Scalar< DataVector > &tilde_phi, const tnsr::ii< DataVector, 3, Frame::Inertial > &spatial_metric, const tnsr::II< DataVector, 3, Frame::Inertial > &inv_spatial_metric, const Scalar< DataVector > &sqrt_det_spatial_metric, const EquationsOfState::EquationOfState< true, 3 > &eos, const Mesh< 3 > &dg_mesh, const Mesh< 3 > &subcell_mesh, const evolution::dg::subcell::RdmpTciData &past_rdmp_tci_data, const TciOptions &tci_options, const evolution::dg::subcell::SubcellOptions &subcell_options, const grmhd::ValenciaDivClean::PrimitiveFromConservativeOptions &primitive_from_conservative_options, double persson_exponent, bool element_stays_on_dg)
 

Detailed Description

template<typename RecoveryScheme>
class grmhd::ValenciaDivClean::subcell::TciOnDgGrid< RecoveryScheme >

The troubled-cell indicator run on the DG grid to check if the solution is admissible.

We denote variables at the candidate solution's time level by a superscript \(n+1\) and at the time level where the solution is known to be admissible by a superscript \(n\).

The following checks are done in the order they are listed:

List of checks
Description

TCI status

if \(\min(\tilde{D}^{n+1}/\textrm{avg}(\sqrt{\gamma^{n}}))\) is less than tci_options.minimum_rest_mass_density_times_lorentz_factor or if \(\min(\tilde{Y}_e^{n+1}/\textrm{avg}(\sqrt{\gamma^{n}}))\) is less than tci_options.minimum_rest_mass_density_times_lorentz_factor times tci_options.minimum_ye, we have a negative (or extremely small) density or electron fraction and the cell is troubled. Note that if this tci_option is approximately equal to or larger than the atmosphere_density, the atmosphere will be flagged as troubled.

-1

if \(\tilde{\tau}\) is less than tci_options.minimum_tilde_tau then we have a negative (or extremely small) energy and the cell is troubled.

-2

if \(\max(\tilde{D}^{n+1}/(\sqrt{\gamma^n}W^n))\) and \(\max(\rho^n)\) are less than tci_options.atmosphere_density then the entire DG element is in atmosphere and it is not troubled.

0

if \((\tilde{B}^{n+1})^2>2\sqrt{\gamma^n}(1-\epsilon_B)\tilde{\tau}^{n+1}\) at any grid point, then the cell is troubled.

-3

attempt a primitive recovery using the RecoveryScheme from the template parameter. The cell is marked as troubled if the primitive recovery fails at any grid point.

-4

if \(\max(\rho^{n+1})\) is below tci_options.atmosphere_density then the cell is in atmosphere and not marked as troubled. Note that the magnetic field is still freely evolved.

0

apply the Persson TCI to \(\tilde{D}^{n+1}\)

-5

apply the Persson TCI to \(\tilde{Y}_e^{n+1}\)

-6

apply the Persson TCI to pressure \(p^{n+1}\)

-7

apply the Persson TCI to the magnitude of \(\tilde{B}^{n+1}\) if its magnitude is greater than tci_options.magnetic_field_cutoff

-8

apply the RDMP TCI to TildeD

-9

apply the RDMP TCI to TildeTau

-10

apply the RDMP TCI to TildeB

-11

If the cell is not flagged as troubled then the primitives are computed at time level n+1.

The second column of the table above denotes the value of an integer stored as the first element of the returned std::tuple, which indicates the particular kind of check that failed. For example, if the fifth check (primitive recovery) fails and cell is marked as troubled, an integer with value -4 is stored in the first slot of the returned tuple. Note that this integer is marking only the first check to fail, since checks are done in a particular sequence as listed above. If all checks are passed and cell is not troubled, it is returned with the value 0.

Note
We adopt negative integers to mark TCI status from DG grid returned by TciOnDgGrid class. Positive integers are used for TCIs on FD grid; see TciOnFdGrid and its documentation.

The documentation for this class was generated from the following file: