Chi-Tech
chi_physics::TimeStepper Class Reference

#include <TimeStepper.h>

Inheritance diagram for chi_physics::TimeStepper:
ChiObject chi_physics::ConstantTimeStepper

Public Member Functions

double TimeStepSize () const
 
double Time () const
 
size_t TimeStepIndex () const
 
double StartTime () const
 
double EndTime () const
 
double MaxTimeSteps () const
 
bool IsActive () const
 
void SetTimeStepSize (double dt)
 
void SetTime (double time)
 
void SetStartTime (double time)
 
void SetEndTime (double time)
 
void SetMaxTimeSteps (int n)
 
void SetMinimumTimeStepSize (double dt_min)
 
virtual void Advance ()
 
virtual bool Adapt (TimeStepStatus time_step_status)
 
std::string StringTimeInfo (bool old_time=false) const
 
- Public Member Functions inherited from ChiObject
 ChiObject ()
 
 ChiObject (const chi::InputParameters &params)
 
void SetStackID (size_t stack_id)
 
size_t StackID () const
 
virtual void PushOntoStack (std::shared_ptr< ChiObject > &new_object)
 
virtual ~ChiObject ()=default
 

Protected Member Functions

 TimeStepper (const chi::InputParameters &params)
 

Static Protected Member Functions

static chi::InputParameters GetInputParameters ()
 

Protected Attributes

double dt_
 
double time_
 
size_t t_index_
 
double start_time_
 
double end_time_
 
int max_time_steps_
 
double dt_min_
 
const double general_tolerance_
 
double last_dt_
 

Additional Inherited Members

- Static Public Member Functions inherited from ChiObject
static chi::InputParameters GetInputParameters ()
 

Detailed Description

Base class for all timestep controllers.

Definition at line 17 of file TimeStepper.h.

Constructor & Destructor Documentation

◆ TimeStepper()

chi_physics::TimeStepper::TimeStepper ( const chi::InputParameters params)
explicitprotected

Definition at line 32 of file TimeStepper.cc.

Member Function Documentation

◆ Adapt()

virtual bool chi_physics::TimeStepper::Adapt ( TimeStepStatus  time_step_status)
inlinevirtual

Adapts according to the timestep status. If it could provide a change it returns true, otherwise false.

Definition at line 67 of file TimeStepper.h.

◆ Advance()

void chi_physics::TimeStepper::Advance ( )
virtual

Advances the controller's state. The most basic action here is to advance time and the time index.

Advances the controller's state. The most basic action here is to advance time and the time index. If the solver is at or beyond its end time then it will return false. Otherwise it will advance and return true.

Definition at line 110 of file TimeStepper.cc.

◆ EndTime()

double chi_physics::TimeStepper::EndTime ( ) const

Returns the current controller end_time.

Definition at line 61 of file TimeStepper.cc.

◆ GetInputParameters()

chi::InputParameters chi_physics::TimeStepper::GetInputParameters ( )
staticprotected

Definition at line 8 of file TimeStepper.cc.

◆ IsActive()

bool chi_physics::TimeStepper::IsActive ( ) const

If start_time <= time <= end_time, this will return true.

Definition at line 67 of file TimeStepper.cc.

◆ MaxTimeSteps()

double chi_physics::TimeStepper::MaxTimeSteps ( ) const

Returns the current controller max time steps.

Definition at line 64 of file TimeStepper.cc.

◆ SetEndTime()

void chi_physics::TimeStepper::SetEndTime ( double  time)

Manually set the end_time.

Definition at line 94 of file TimeStepper.cc.

◆ SetMaxTimeSteps()

void chi_physics::TimeStepper::SetMaxTimeSteps ( int  n)

Manually set the maximum number of time steps. A negative number disables this check.

Definition at line 102 of file TimeStepper.cc.

◆ SetMinimumTimeStepSize()

void chi_physics::TimeStepper::SetMinimumTimeStepSize ( double  dt_min)

Manually sets the minimum time step size.

Definition at line 105 of file TimeStepper.cc.

◆ SetStartTime()

void chi_physics::TimeStepper::SetStartTime ( double  time)

Manually set the start_time.

Definition at line 91 of file TimeStepper.cc.

◆ SetTime()

void chi_physics::TimeStepper::SetTime ( double  time)

Manually set the current time.

Definition at line 88 of file TimeStepper.cc.

◆ SetTimeStepSize()

void chi_physics::TimeStepper::SetTimeStepSize ( double  dt)

Manually set the time step size.

Definition at line 80 of file TimeStepper.cc.

◆ StartTime()

double chi_physics::TimeStepper::StartTime ( ) const

Returns the current controller start_time.

Definition at line 58 of file TimeStepper.cc.

◆ StringTimeInfo()

std::string chi_physics::TimeStepper::StringTimeInfo ( bool  old_time = false) const

Builds a formatted string of the time information.

Definition at line 122 of file TimeStepper.cc.

◆ Time()

double chi_physics::TimeStepper::Time ( ) const

Returns the current controller time.

Definition at line 52 of file TimeStepper.cc.

◆ TimeStepIndex()

size_t chi_physics::TimeStepper::TimeStepIndex ( ) const

Returns the current time index.

Definition at line 55 of file TimeStepper.cc.

◆ TimeStepSize()

double chi_physics::TimeStepper::TimeStepSize ( ) const

Overridable method to get the timestep size.

Definition at line 49 of file TimeStepper.cc.

Field Documentation

◆ dt_

double chi_physics::TimeStepper::dt_
protected

Definition at line 76 of file TimeStepper.h.

◆ dt_min_

double chi_physics::TimeStepper::dt_min_
protected

Definition at line 83 of file TimeStepper.h.

◆ end_time_

double chi_physics::TimeStepper::end_time_
protected

Definition at line 81 of file TimeStepper.h.

◆ general_tolerance_

const double chi_physics::TimeStepper::general_tolerance_
protected

Definition at line 85 of file TimeStepper.h.

◆ last_dt_

double chi_physics::TimeStepper::last_dt_
protected

Last dt before finishing.

Definition at line 87 of file TimeStepper.h.

◆ max_time_steps_

int chi_physics::TimeStepper::max_time_steps_
protected

Definition at line 82 of file TimeStepper.h.

◆ start_time_

double chi_physics::TimeStepper::start_time_
protected

Definition at line 80 of file TimeStepper.h.

◆ t_index_

size_t chi_physics::TimeStepper::t_index_
protected

Definition at line 78 of file TimeStepper.h.

◆ time_

double chi_physics::TimeStepper::time_
protected

Definition at line 77 of file TimeStepper.h.


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