Calculates and stores the charge density on the grid points in the simulation box. The calculation is done by requesting from all the Species to calculate their particle density and then adding up the results.
More...
#include <density.h>
List of all members.
Public Member Functions |
| Density () |
| Default constructor.
|
virtual | ~Density () |
| Default destructor.
|
std::string | GetClassName () const |
| Returns the name of the class, here "density".
|
void | Init () |
| Initialization of the charge density. Retrieves the references for the Geometry and the Wall object. The Wall object is only needed here to tell the Task list that Density has to be executed after Wall. It sets Nx, dx and dV from the Geometry and then resizes the grid den to the size given in Geometry.
|
bool | Execute () |
| Iterate through the Species and add up the density. Every Species object is requested to create the particle density. This particle density is then multiplied with the Species superparticle charge and added to the grid den. Finally the Geometry is asked to correct the boundary values of the density for cells with non unit volume.
|
void | AddSpecies (SpeciesBase *pS) |
| Adds a species to the species vector.
|
virtual grid< double > * | GetGrid () |
| Return a reference to the grid.
|
virtual const GridPosition & | GetNx () const |
| Returns the grid size.
|
double & | operator[] (GridPosition i) |
| Returns the charge density at a grid position.
|
| 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 std::string | Rebuild (std::istream &in) |
| Rebuilds the task from the setup. This normally does not need to be overwritten. Rebuild always returns the next token that does not belong to the object setup.
|
virtual void | DumpTaskList (std::ostream &o, int nDepth=0) |
| Recursively dumps the complete Task list into a stream.
|
Protected Member Functions |
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.
|
void | AddPredecessor (const std::string &strPred) |
| Add the name of a predecessor that has to be executed before this Task.
|
Detailed Description
Calculates and stores the charge density on the grid points in the simulation box. The calculation is done by requesting from all the Species to calculate their particle density and then adding up the results.
- Parameters:
-
geometry,wall | Name of referenced Geometry and Wall objects |
diagnostic | Allows the density to be written |
Member Function Documentation
bool Density::Execute |
( |
| ) |
|
|
virtual |
Iterate through the Species and add up the density. Every Species object is requested to create the particle density. This particle density is then multiplied with the Species superparticle charge and added to the grid den. Finally the Geometry is asked to correct the boundary values of the density for cells with non unit volume.
- See also:
- Species::MakeRho
-
Geometry::DivByVolume
Reimplemented from Task.
Member Data Documentation
Reference to the Geometry and Wall objects.
Pointer to the geometry object
The documentation for this class was generated from the following files: