|
O P A R - Open Architecture Particle in Cell Simulation - Version 3.0
Plasma simulations with dust particles
|
A specialized Task which organizes all the other Tasks in a Process and allows reading the Tasks from a setup file. This class is designed for running as the parent of all other classes in a process. It keeps track of the current time step in nCycle and has a special method Run that Runs the process. More...
#include <task.h>
Public Member Functions | |
| Process () | |
| Default constructor sets the global pProcess variable. | |
| virtual | ~Process () |
| Destructor deletes all Tasks that belong to this Process. | |
| virtual std::string | GetClassName () const |
| returns the name of the class, here "Process". | |
| Task * | GetTask (std::string strName, std::string strClass) const |
| Search in the collection of Tasks for a Task with the name strName and with a class name srtClass. If not found, a NULL pointer is returned. | |
| int | GetCycle () const |
| Returns the current time step. | |
| virtual std::string | Rebuild (std::istream &in) |
| Rebuild the Process from a stream. Return "" if successful. | |
| virtual bool | Run () |
| Contains the main simulation loop, calling the sub-Tasks over and over again. | |
Public Member Functions inherited from Task | |
| Task () | |
| Default constructor sets the running number nNr of the Task. | |
| virtual | ~Task () |
| When destructing a Task is has to be detatched from the parents Task list. | |
| int | GetStep () const |
| Return the interval between execution in timesteps. | |
| int | GetEnd () const |
| Return the timestep when the Task ends execution. | |
| bool | DoNow () |
| Returns true if the Task is to be executed now. | |
| std::string | GetName () const |
| Returns the name given to the Task object. | |
| virtual bool | IsInteractive () const |
| If not specified otherwise, a Task is not interactive. | |
| void | AttachTask (Task *pTask) |
| Insert Task into Task list and registers it with the Process. | |
| void | DetachTask (Task *pTask) |
| DetachTask from Task list. | |
| virtual void | Init () |
| The Init method of a Task is called before the Task is executed. It should contain all the necessary initialization. The basic Init method calls the Init of all the sub-Tasks and sorts them according to their predecessor list. Also the Pointer to the Normalization object is retrieved from the Process. A derived class should always call the Task::Init in its own Init method. | |
| virtual bool | Execute () |
| Executes the Task. This is the place where the algorithm for executing a Task it placed. The return value specifies, if the task is finished and can be removed. The basic Execute method executes all its sub-Tasks. The derived classes should call this member function, whenever there are subtasks to be executed. | |
| virtual void | DumpTaskList (std::ostream &o, int nDepth=0) |
| Recursively dumps the complete Task list into a stream. | |
Public Attributes | |
| TASKVECTOR | vecTasks |
| All the Tasks in this process. | |
Protected Attributes | |
| int | nCycle |
| The time step. | |
Protected Attributes inherited from Task | |
| int | nNr |
| The running number of this Task. | |
| std::string | strName |
| The name of this Task. | |
| Task * | pParent |
| The parent Task to which this Task belongs. | |
| Process * | pProcess |
| The Process to which this Task belongs. | |
| std::string | strNorm |
| The name of the referenced Normalization object. | |
| Normalization * | Norm |
| The pointer to the referenced Normalization object. | |
| TASKLIST | plTasks |
| A list of sub-Tasks. | |
| int | nStart |
| int | nEnd |
| int | nStep |
Additional Inherited Members | |
Protected Member Functions inherited from Task | |
| void | AddPredecessor (const std::string &strPred) |
| Add the name of a predecessor that has to be executed before this Task. | |
| virtual PARAMETERMAP * | MakeParamMap (PARAMETERMAP *pm=NULL) |
| Register the parameters needed for the Task. A derived class should overwrite this whenever it needs additional parameters from the setup file. It should then ALWAYS call the MakeParamMap of its superclass. | |
A specialized Task which organizes all the other Tasks in a Process and allows reading the Tasks from a setup file. This class is designed for running as the parent of all other classes in a process. It keeps track of the current time step in nCycle and has a special method Run that Runs the process.
1.8.1.1