Langmuir
Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
potential.h
Go to the documentation of this file.
1 #ifndef POTENTIALNEW_H
2 #define POTENTIALNEW_H
3 #define BOOST_DISABLE_ASSERTS
4 
5 #include <QObject>
6 
7 #ifndef Q_MOC_RUN
8 
9 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
10 #pragma GCC diagnostic push
11 #pragma GCC system_header
12 #endif
13 
14 #include "boost/multi_array.hpp"
15 
16 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
17 #pragma GCC diagnostic pop
18 #endif
19 
20 #endif
21 
22 namespace LangmuirCore
23 {
24 
25 class World;
26 class Grid;
27 
31 class Potential : public QObject
32 {
33 private:
34  Q_OBJECT
35  Q_DISABLE_COPY(Potential)
36 
37 public:
43  Potential(World &world, QObject *parent=0);
44 
48  void setPotentialZero();
49 
53  void setPotentialLinear();
54 
58  void setPotentialGate();
59 
65  void setPotentialTraps(
66  const QList<int>& trapIDs = QList<int>(),
67  const QList<double>& trapPotentials = QList<double>()
68  );
69 
73  void precalculateArrays();
74 
79 
84  double coulombE(int site_i);
85 
90  double coulombImageE(int site_i);
91 
96  double gaussE(int site_i);
97 
102  double gaussImageE(int site_i);
103 
108  double coulombH(int site_i);
109 
114  double coulombImageH(int site_i);
115 
120  double gaussH(int site);
121 
126  double gaussImageH(int site);
127 
132  double coulombD(int site_i);
133 
138  double coulombImageD(int site_i);
139 
144  double gaussD(int site_i);
145 
150  double gaussImageD(int site_i);
151 
152 private:
157 };
158 
159 }
160 #endif // POTENTIALNEW_H
void setPotentialLinear()
Adds a linear potential calcualted from voltage.left and voltage.right along the x-direction.
void setPotentialZero()
sets the value of the potential to zero at every grid site
void setPotentialGate()
Adds a linear potential calculated from slope.z along the z-direction.
void setPotentialTraps(const QList< int > &trapIDs=QList< int >(), const QList< double > &trapPotentials=QList< double >())
Adds shifts to the potential at the various sites.
double gaussE(int site_i)
calculates Coulomb potential from electrons at specific grid site, assuming gaussians ...
double coulombH(int site_i)
calculates Coulomb potential from holes at specific grid site
double coulombE(int site_i)
calculates Coulomb potential from electrons at specific grid site
double gaussImageH(int site)
calculates Coulomb image-potential from holes at specific grid site, assuming gaussians ...
A class to hold all objects in a simulation.
Definition: world.h:51
double coulombD(int site_i)
calculates Coulomb potential from charged defects at specific grid site
Potential(World &world, QObject *parent=0)
Potential Create the potential.
void updateCouplingConstants()
pre-calculates coupling constants
Definition: agent.h:12
double gaussImageE(int site_i)
calculates Coulomb image-potential from electrons at specific grid site, assuming gaussians ...
World & m_world
reference to the World
Definition: potential.h:156
double gaussH(int site)
calculates Coulomb potential from holes at specific grid site, assuming gaussians ...
A class to calculate the potential.
Definition: potential.h:31
double gaussD(int site_i)
calculates Coulomb potential from charged defects at specific grid site, assuming gaussians ...
double coulombImageD(int site_i)
calculates Coulomb image-potential from charged defects at specific grid site
double coulombImageE(int site_i)
calculates Coulomb image-potential from electrons at specific grid site
void precalculateArrays()
pre-calculates r2, r, and 1/r
double gaussImageD(int site_i)
calculates Coulomb image-potential from charged defects at specific grid site, assuming gaussians ...
double coulombImageH(int site_i)
calculates Coulomb image-potential from holes at specific grid site