SpECTRE  v2024.04.12
evolution::dg::subcell::SubcellOptions Class Reference

Holds the system-agnostic subcell parameters, such as numbers controlling when to switch between DG and subcell. More...

#include <SubcellOptions.hpp>

Classes

struct  AlwaysUseSubcells
 If true, then we always use the subcell method, not DG. More...
 
struct  FdToDgTci
 
struct  FiniteDifferenceDerivativeOrder
 The order of the FD derivative used. More...
 
struct  MinimumClearTcis
 The number of time steps/TCI calls that the TCI needs to have decided switching to DG is fine before we actually do the switch. More...
 
struct  MinTciCallsAfterRollback
 The number of time steps/TCI calls after a switch from DG to FD before we allow switching back to DG. More...
 
struct  NumberOfStepsBetweenTciCalls
 The number of time steps taken between calls to the TCI to check if we can go back to the DG grid. A value of 1 means every time step, while 2 means every other time step. More...
 
struct  OnlyDgBlocksAndGroups
 A list of block names on which to never do subcell. More...
 
struct  PerssonExponent
 The exponent \(\alpha\) passed to the Persson troubled-cell indicator. More...
 
struct  PerssonNumHighestModes
 The number of highest modes the Persson troubled-cell indicator monitors. More...
 
struct  PerssonTci
 
struct  RdmpDelta0
 The \(\delta_0\) parameter in the relaxed discrete maximum principle troubled-cell indicator. More...
 
struct  RdmpEpsilon
 The \(\epsilon\) parameter in the relaxed discrete maximum principle troubled-cell indicator. More...
 
struct  RdmpTci
 
struct  SubcellToDgReconstructionMethod
 Method to use for reconstructing the DG solution from the subcell solution. More...
 
struct  TroubledCellIndicator
 Parameters related to the troubled cell indicator (TCI) that determines when to switch between DG and FD. More...
 
struct  UseHalo
 Use a width-one halo of FD elements around any troubled element. More...
 

Public Types

using options = tmpl::list< PerssonExponent, PerssonNumHighestModes, RdmpDelta0, RdmpEpsilon, AlwaysUseSubcells, SubcellToDgReconstructionMethod, UseHalo, OnlyDgBlocksAndGroups, FiniteDifferenceDerivativeOrder, NumberOfStepsBetweenTciCalls, MinTciCallsAfterRollback, MinimumClearTcis >
 

Public Member Functions

 SubcellOptions (double persson_exponent, size_t persson_num_highest_modes, double rdmp_delta0, double rdmp_epsilon, bool always_use_subcells, fd::ReconstructionMethod recons_method, bool use_halo, std::optional< std::vector< std::string > > only_dg_block_and_group_names, ::fd::DerivativeOrder finite_difference_derivative_order, size_t number_of_steps_between_tci_calls, size_t min_tci_calls_after_rollback, size_t min_clear_tci_before_dg)
 
template<size_t Dim>
 SubcellOptions (const SubcellOptions &subcell_options_with_block_names, const DomainCreator< Dim > &domain_creator)
 Given an existing SubcellOptions that was created from block and group names, create one that stores block IDs. More...
 
void pup (PUP::er &p)
 
double persson_exponent () const
 
size_t persson_num_highest_modes () const
 
double rdmp_delta0 () const
 
double rdmp_epsilon () const
 
bool always_use_subcells () const
 
fd::ReconstructionMethod reconstruction_method () const
 
bool use_halo () const
 
const std::vector< size_t > & only_dg_block_ids () const
 
::fd::DerivativeOrder finite_difference_derivative_order () const
 
size_t number_of_steps_between_tci_calls () const
 The number of time steps between when we check the TCI to see if we can switch from FD back to DG.
 
size_t min_tci_calls_after_rollback () const
 The number of time steps after a rollback before we check the TCI to see if we can switch from FD back to DG.
 
size_t min_clear_tci_before_dg () const
 The number of times the TCI must have flagged that we can switch back to DG before doing so. More...
 

Static Public Attributes

static constexpr Options::String help
 

Friends

bool operator== (const SubcellOptions &lhs, const SubcellOptions &rhs)
 

Detailed Description

Holds the system-agnostic subcell parameters, such as numbers controlling when to switch between DG and subcell.

Constructor & Destructor Documentation

◆ SubcellOptions()

template<size_t Dim>
evolution::dg::subcell::SubcellOptions::SubcellOptions ( const SubcellOptions subcell_options_with_block_names,
const DomainCreator< Dim > &  domain_creator 
)

Given an existing SubcellOptions that was created from block and group names, create one that stores block IDs.

The DomainCreator is used to convert block and group names into IDs and also to check that all listed block names and groups are in the domain.

Note
This is a workaround since our option parser does not allow us to retrieve options specified somewhere completely different in the input file.

Member Function Documentation

◆ min_clear_tci_before_dg()

size_t evolution::dg::subcell::SubcellOptions::min_clear_tci_before_dg ( ) const
inline

The number of times the TCI must have flagged that we can switch back to DG before doing so.

Note that if we only check the TCI every number_of_steps_between_tci_calls() then it takes number_of_steps_between_tci_calls * min_clear_tci_before_dg time steps before switching from FD back to DG.

`0 means

Member Data Documentation

◆ help

constexpr Options::String evolution::dg::subcell::SubcellOptions::help
staticconstexpr
Initial value:
{
"System-agnostic options for the DG-subcell method."}

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