O P A R - Open Architecture Particle in Cell Simulation - Version 3.0
Plasma simulations with dust particles
 All Classes Files Functions Variables Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
Geometry Class Reference

Defines an abstract interface for geometry definitions. These may include open geometries, closed geometries or complex box shapes. More...

#include <geometry.h>

Inheritance diagram for Geometry:
Task ClosedGeometry

List of all members.

Public Member Functions

 Geometry ()
 Default constructor.
virtual ~Geometry ()
 Destructor.
virtual std::string GetClassName () const
 Returns the name of the class, here "geometry".
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 ()
 The geometry doesn't actually do anything by itself.
GridPosition GetGridSize () const
 Return the size of the box.
Position GetGridSpacing () const
 Return the grid spacing in m.
virtual double GetDustRadius ()
 Returns the Radius of the dust particle.
virtual int GetNumberDust ()
 Returns the number of the dust particles in the simulation.
virtual GridPosition GetDustPosition (int)
 Returns the position of the dust particles.
virtual Position GetLocation (const GridPosition &) const =0
 Should return the actual position in m of a grid point.
virtual double Distance (const GridPosition &, const GridPosition &) const =0
 Should return the distance between two grid points in m.
double GetVolumeQuant () const
 Returns the volume of a single grid cell in ${\text m}^{\text dim}$.
virtual double GetBoxVolume () const =0
 Should return the physical volume of the simulation box.
virtual bool outside (const Position &) const =0
 Return true if the Position is outside the simulation box.
virtual bool outside_periodic (const Position &) const =0
virtual bool outside_right (const Position &) const =0
virtual bool outside_left (const Position &) const =0
virtual bool insidedust (const Position &, GridPosition) const =0
 Return true if the Position is inside a dust particle.
virtual Position MinPosition () const =0
virtual Position MaxPosition () const =0
 Abstract methods, that return the actual minimum and maximum physical positions in the simulation. This depends on the geometry since boundary cells may be introduced.
virtual void DivByVolume (grid< double > &G)=0
 Grid values sometimes have to be corrected according to the real volume of the cells. Boundary cells may hav only half of quarter the volume of a normal grid cell.
- 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 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.

Public Attributes

double Rd
 Radius of the dust particle.
int number_d
 Number of dust particles.
int ig
 Should return true if the normalized Position is outside the simulation volume.
Position pt
Position pd
Position pc [3][2000]
 Position of reduced dx,dy and dz at the dust particles(s), for 3D simulations.
GridPosition Dust [20]
 Positions the dust particles.

Protected Member Functions

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.
- 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.

Protected Attributes

GridPosition GridSize
 Size of the box in grid cells.
Position GridSpacing
 The grid spacing in m.
- Protected Attributes inherited from Task
int nNr
 The running number of this Task.
std::string strName
 The name of this Task.
TaskpParent
 The parent Task to which this Task belongs.
ProcesspProcess
 The Process to which this Task belongs.
std::string strNorm
 The name of the referenced Normalization object.
NormalizationNorm
 The pointer to the referenced Normalization object.
TASKLIST plTasks
 A list of sub-Tasks.
int nStart
int nEnd
int nStep

Detailed Description

Defines an abstract interface for geometry definitions. These may include open geometries, closed geometries or complex box shapes.

Parameters:
dx,dy,dzThe grid spacing in micrometer. For 1D simulations: set only dx, for 2D simulations set only dx,dy. It must be set dx=dy=dz
Nx,Ny,NzThe Size of the simulation box in grid cells. For 1D simulations: set only Nx, for 2D simulations set only Nx,Ny.

Member Function Documentation

virtual Position Geometry::MaxPosition ( ) const
pure virtual

Abstract methods, that return the actual minimum and maximum physical positions in the simulation. This depends on the geometry since boundary cells may be introduced.

Todo:
Not all the classes (fields etc.) actually use this method.

Implemented in ClosedGeometry.


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