SpECTRE  2021.08.02
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::TildeTau, grmhd::ValenciaDivClean::Tags::TildeS<>, grmhd::ValenciaDivClean::Tags::TildeB<>, grmhd::ValenciaDivClean::Tags::TildePhi, gr::Tags::SpatialMetric< 3 >, gr::Tags::InverseSpatialMetric< 3 >, gr::Tags::SqrtDetSpatialMetric<>, hydro::Tags::EquationOfStateBase, domain::Tags::Mesh< 3 >, Tags::TciOptions >
 

Static Public Member Functions

template<size_t ThermodynamicDim>
static bool apply (gsl::not_null< Variables< hydro::grmhd_tags< DataVector > > * > dg_prim_vars, const Scalar< DataVector > &tilde_d, 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, ThermodynamicDim > &eos, const Mesh< 3 > &dg_mesh, const TciOptions &tci_options, double persson_exponent) noexcept
 

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:

  • if \(\min(\tilde{D}^{n+1}/\sqrt{\gamma^{n}})\) is less than tci_options.minimum_rest_mass_density_times_lorentz_factor then we have a negative (or extremely small) density 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.
  • 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.
  • 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
  • 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.
  • 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.
  • apply the Persson TCI to \(\tilde{D}^{n+1}\) and \(\tilde{\tau}^{n+1}\)

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