Chombo + EB  3.2
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Scheduler Class Reference

#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 &)
 
Scheduleroperator= (const Scheduler &)
 

Private Attributes

std::map< RefCountedPtr
< PeriodicFunction >, int,
PeriodicFunctionLessThan
m_stepTriggeredFunctions
 
std::map< RefCountedPtr
< PeriodicFunction >
, std::pair< Real, Real >
, PeriodicFunctionLessThan
m_timeTriggeredFunctions
 

Detailed Description

This class executes functions at periodic intervals during an AMR simulation.

Constructor & Destructor Documentation

Scheduler::Scheduler ( )

Default constructor. Makes an empty schedule.

virtual Scheduler::~Scheduler ( )
virtual

Destructor.

Scheduler::Scheduler ( const Scheduler )
private

Member Function Documentation

void Scheduler::schedule ( RefCountedPtr< PeriodicFunction a_function,
int  a_interval 
)

Add a periodic function that is called every a_interval steps.

Parameters
a_functionThe function to be called periodically.
a_intervalThe 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.

Parameters
a_functionThe function to be called periodically.
a_intervalThe 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.

Parameters
a_stepThe step in the simulation at which the schedule is executed.
a_timeThe 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.

Parameters
a_stepThe step in the simulation at which the schedule is executed.
a_timeThe simulation time at which the schedule is executed.
Scheduler& Scheduler::operator= ( const Scheduler )
private

Member Data Documentation

std::map<RefCountedPtr<PeriodicFunction>, int, PeriodicFunctionLessThan> Scheduler::m_stepTriggeredFunctions
mutableprivate
std::map<RefCountedPtr<PeriodicFunction>, std::pair<Real, Real>, PeriodicFunctionLessThan> Scheduler::m_timeTriggeredFunctions
mutableprivate

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