WARPXM v1.10.0
Loading...
Searching...
No Matches
WxStepper Class Referenceabstract

Base class for objects which can be advanced in time. More...

#include <wxstepper.h>

Inheritance diagram for WxStepper:
WmHostAction WmSolverBase WmFillValue WmFunctionApplicator WmGhostSync WmICGenerator WmPatchProcessor WmProbeLocation WmSynchronizer WmTestSuggestedDt WmTimedSwapVariables WmVariableLoader WmVariableSwapper WmWriteOut wxm::diagnostics::Diagnostic wxm::diagnostics::DiagnosticsWriter wxm::dt_calc::time_stepper_base wxm::host_actions::data_loader wxm::temporal_solver wxm::va_runner WmSolver

Detailed Description

Base class for objects which can be advanced in time.

Classes derived from this must provide the step() method which advances the state of the object by the assigned time step dt, getDt(). Objects can obtain the current time at which they are called by using the getCurrentTime() method.

Public Types

typedef real time_t
 Time scalar data type.
 

Public Member Functions

 WxStepper ()
 Create a new stepper.
 
virtual ~WxStepper ()
 Dtor: destroy object.
 
void setDt (time_t dt)
 Set time-step for the step method.
 
time_t getDt () const
 Get time-step for the step method.
 
void setTimeData (const WxStepper &timeData)
 Set time data for the step method.
 
void setCurrentTime (time_t tcurr)
 Set current time.
 
time_t incrementCurrentTime (time_t tadd)
 Increment current time.
 
time_t getCurrentTime () const
 Get the current time.
 
void setCurrentFrame (int frame)
 Set current frame number.
 
int incrementCurrentFrame ()
 Increment current frame number.
 
int getCurrentFrame () const
 Get the current frame number.
 
virtual WxStepperStatus step ()=0
 Advance the stepper by assigned time step.
 
virtual WxStepperStatus end ()
 Perform actions only done at simulation end.
 

Member Typedef Documentation

◆ time_t

Time scalar data type.

Constructor & Destructor Documentation

◆ WxStepper()

WxStepper::WxStepper ( )
inline

Create a new stepper.

Parameters
setDt_callbackpointer to optional callback function. When provided, function will be called after dt is updated, and before returning from the set member function.
setCurrentTime_callbackpointer to optional callback function. When provided, function will be called after current time is updated, and before returning from the set member function. Both callbacks provide a pointer to this instance and the new value in question.

◆ ~WxStepper()

virtual WxStepper::~WxStepper ( )
virtual

Dtor: destroy object.

Member Function Documentation

◆ end()

virtual WxStepperStatus WxStepper::end ( )
inlinevirtual

Perform actions only done at simulation end.

Unless redifined by the child class, will just call step() by default.

Returns
Status of stepper

Reimplemented in WmWriteOut.

◆ getCurrentFrame()

int WxStepper::getCurrentFrame ( ) const
inline

Get the current frame number.

Returns
Current frame number

◆ getCurrentTime()

time_t WxStepper::getCurrentTime ( ) const
inline

Get the current time.

Returns
Current time

◆ getDt()

time_t WxStepper::getDt ( ) const
inline

Get time-step for the step method.

Returns
Time-step

◆ incrementCurrentFrame()

int WxStepper::incrementCurrentFrame ( )

Increment current frame number.

Returns
frame number after increment.

◆ incrementCurrentTime()

time_t WxStepper::incrementCurrentTime ( time_t  tadd)

Increment current time.

Parameters
taddAmout of time to increment by.
Returns
Resulting current time after increment.

◆ setCurrentFrame()

void WxStepper::setCurrentFrame ( int  frame)

Set current frame number.

Parameters
frameCurrent frame number

◆ setCurrentTime()

void WxStepper::setCurrentTime ( time_t  tcurr)

Set current time.

Parameters
tcurrCurrent time

◆ setDt()

void WxStepper::setDt ( time_t  dt)

Set time-step for the step method.

Parameters
dtTime-step

◆ setTimeData()

void WxStepper::setTimeData ( const WxStepper timeData)

Set time data for the step method.

Parameters
timedata object to copy from

◆ step()


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