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
potential.h
Go to the documentation of this file.
1 
6 #ifndef POTENTIAL_H
7 #define POTENTIAL_H
8 #include "task.h"
9 #include "numeric.h"
10 #include "geometry.h"
11 #include "density.h"
12 #include "wall.h"
13 #define ID_POTENTIAL "Potential"
14 //---------------------------------------------------------------------------------------------------------------------
15 
25 class Potential : public Task {
26  private:
28  std::string strGeometry;
29  protected:
31  int tstep;
35  double dx;
37  double Rd;
39  double cd;
44  public:
46  Potential () : pGeom(NULL) {};
48  virtual ~Potential () {};
49 #ifdef ONE_DIMENSIONAL
50 
51  double Vp;
52 #endif
53 #ifndef ONE_DIMENSIONAL
54 
55  double potd[20];
56 #endif
57 
58  virtual std::string GetClassName () const {return ID_POTENTIAL;}
60  virtual grid<double>* GetGrid () {return &Pot;}
62  virtual Position GetSpaceQuant () const {return dx;}
64  virtual double& operator[] (GridPosition i) {return Pot[i];}
66  virtual GridPosition GetNx () const {return NG;}
67  virtual void Init ();
69  protected:
70  virtual PARAMETERMAP* MakeParamMap (PARAMETERMAP* pm);
71 };
72 
82 class DustPotential : public Potential {
83  private:
85  std::string strDensity;
87  double xq1;
89  double xq2;
90  protected:
92  std::valarray<double> Nd_u;
94  std::valarray<double> Nd_o;
96  std::valarray<double> Hd;
98  std::valarray<double> ni;
104  double n0;
105  public:
109  virtual ~DustPotential () {}
110  virtual void Init ();
111  virtual bool Execute ();
112  protected:
113  virtual PARAMETERMAP* MakeParamMap (PARAMETERMAP* pm = NULL);
114 };
115 #endif