SpECTRE  v2024.04.12
StepChoosers::ElementSizeCfl< StepChooserUse, Dim, System > Class Template Reference

Suggests a step size based on the CFL stability criterion, but uses the full size of the element as the length scale in question. More...

#include <ElementSizeCfl.hpp>

Classes

struct  SafetyFactor
 

Public Types

using options = tmpl::list< SafetyFactor >
 
using argument_tags = tmpl::list<::Tags::TimeStepper< TimeStepper >, domain::Tags::SizeOfElement< Dim >, typename System::compute_largest_characteristic_speed >
 
using compute_tags = tmpl::list< domain::Tags::SizeOfElementCompute< Dim >, typename System::compute_largest_characteristic_speed >
 

Public Member Functions

 ElementSizeCfl (const double safety_factor)
 
std::pair< double, bool > operator() (const TimeStepper &time_stepper, const std::array< double, Dim > &element_size, const double speed, const double last_step_magnitude) const
 
bool uses_local_data () const override
 Whether the result can differ on different elements, so requiring communication to synchronize the result across the domain. This is ignored for LTS step changing. More...
 
void pup (PUP::er &p) override
 
- Public Member Functions inherited from StepChooser< StepChooserUse >
 WRAPPED_PUPable_abstract (StepChooser)
 
virtual bool uses_local_data () const =0
 Whether the result can differ on different elements, so requiring communication to synchronize the result across the domain. This is ignored for LTS step changing. More...
 
template<typename StepChoosersToUse = AllStepChoosers, typename DbTags >
std::pair< double, bool > desired_step (const double last_step_magnitude, const db::DataBox< DbTags > &box) const
 The last_step_magnitude parameter describes the step size to be adjusted. It may be the step size or the slab size, or may be infinite if the appropriate size cannot be determined. More...
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

template<typename StepChooserUse, size_t Dim, typename System>
class StepChoosers::ElementSizeCfl< StepChooserUse, Dim, System >

Suggests a step size based on the CFL stability criterion, but uses the full size of the element as the length scale in question.

This is useful as a coarse estimate for slabs, or to place a ceiling on another dynamically-adjusted step chooser.

Member Function Documentation

◆ uses_local_data()

template<typename StepChooserUse , size_t Dim, typename System >
bool StepChoosers::ElementSizeCfl< StepChooserUse, Dim, System >::uses_local_data ( ) const
inlineoverridevirtual

Whether the result can differ on different elements, so requiring communication to synchronize the result across the domain. This is ignored for LTS step changing.

Note
As this is only used for slab-size changing, the last_step_magnitude passed to the call operator is not considered local data.

Implements StepChooser< StepChooserUse >.

Member Data Documentation

◆ help

template<typename StepChooserUse , size_t Dim, typename System >
constexpr Options::String StepChoosers::ElementSizeCfl< StepChooserUse, Dim, System >::help
staticconstexpr
Initial value:
{
"Suggests a step size based on the CFL stability criterion, but in which "
"the entire size of the element is used as the spacing in the "
"computation. This is useful primarily for placing a ceiling on another "
"dynamically-adjusted step chooser"}

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