Chombo + EB + MF
3.2
|
#include <Scheduler.H>
Classes | |
class | PeriodicFunction |
struct | PeriodicFunctionLessThan |
Ordering operator for pointers to periodic functions. More... | |
Public Member Functions | |
Scheduler () | |
Default constructor. Makes an empty schedule. More... | |
virtual | ~Scheduler () |
Destructor. More... | |
void | schedule (RefCountedPtr< PeriodicFunction > a_function, int a_interval) |
void | schedule (RefCountedPtr< PeriodicFunction > a_function, Real a_interval) |
void | execute (int a_step, Real a_time) const |
void | setUp (AMR &a_AMR) |
void | conclude (int a_step, Real a_time) const |
Private Member Functions | |
Scheduler (const Scheduler &) | |
Scheduler & | operator= (const Scheduler &) |
Private Attributes | |
std::map< RefCountedPtr< PeriodicFunction >, int, PeriodicFunctionLessThan > | m_stepTriggeredFunctions |
std::map< RefCountedPtr< PeriodicFunction >, std::pair< Real, Real >, PeriodicFunctionLessThan > | m_timeTriggeredFunctions |
This class executes functions at periodic intervals during an AMR simulation.
Scheduler::Scheduler | ( | ) |
Default constructor. Makes an empty schedule.
Referenced by Scheduler::PeriodicFunctionLessThan::operator()().
|
virtual |
Destructor.
Referenced by Scheduler::PeriodicFunctionLessThan::operator()().
|
private |
void Scheduler::schedule | ( | RefCountedPtr< PeriodicFunction > | a_function, |
int | a_interval | ||
) |
Add a periodic function that is called every a_interval steps.
a_function | The function to be called periodically. |
a_interval | The number of steps that elapse between calls to a_function. |
Referenced by Scheduler::PeriodicFunctionLessThan::operator()().
void Scheduler::schedule | ( | RefCountedPtr< PeriodicFunction > | a_function, |
Real | a_interval | ||
) |
Add a periodic function that is called every a_interval time units.
a_function | The function to be called periodically. |
a_interval | The number of simulation time units that elapse between calls to a_function. |
void Scheduler::execute | ( | int | a_step, |
Real | a_time | ||
) | const |
Execute the schedule on the given step and at the given time.
a_step | The step in the simulation at which the schedule is executed. |
a_time | The simulation time at which the schedule is executed. |
Referenced by Scheduler::PeriodicFunctionLessThan::operator()().
void Scheduler::setUp | ( | AMR & | a_AMR | ) |
This function is called by the associated AMR object to set up interactions between itself and the periodic functions within the scheduler.
void Scheduler::conclude | ( | int | a_step, |
Real | a_time | ||
) | const |
This function is called by the associated AMR object upon the conclusion of a simulation.
a_step | The step in the simulation at which the schedule is executed. |
a_time | The simulation time at which the schedule is executed. |
|
mutableprivate |
|
mutableprivate |