#include <Scheduler.H>
Public Member Functions | |
Scheduler () | |
Default constructor. Makes an empty schedule. | |
virtual | ~Scheduler () |
Destructor. | |
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 |
Classes | |
class | PeriodicFunction |
struct | PeriodicFunctionLessThan |
Ordering operator for pointers to periodic functions. More... |
Scheduler::Scheduler | ( | ) |
Default constructor. Makes an empty schedule.
virtual Scheduler::~Scheduler | ( | ) | [virtual] |
Destructor.
Scheduler::Scheduler | ( | const Scheduler & | ) | [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. |
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. |
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. |
std::map<RefCountedPtr<PeriodicFunction>, int, PeriodicFunctionLessThan> Scheduler::m_stepTriggeredFunctions [mutable, private] |
std::map<RefCountedPtr<PeriodicFunction>, std::pair<Real, Real>, PeriodicFunctionLessThan> Scheduler::m_timeTriggeredFunctions [mutable, private] |