Hex  1.0
Hydrogen-electron collision solver
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
hydrogen.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
2  * *
3  * / / / / __ \ \ / / *
4  * / /__ / / / _ \ \ \/ / *
5  * / ___ / | |/_/ / /\ \ *
6  * / / / / \_\ / / \ \ *
7  * *
8  * Jakub Benda (c) 2014 *
9  * Charles University in Prague *
10  * *
11 \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
12 
13 #ifndef HEX_HYDROGEN
14 #define HEX_HYDROGEN
15 
16 #include <vector>
17 
18 #include "special.h"
19 
21 #define DEFAULT_LAMBDA 1
22 
23 // Default maximal iteration count when searching for nodes of the wave functions.
24 #define DEFAULT_MAXSTEPS 1000
25 
32 namespace Hydrogen
33 {
34 
51 double P (unsigned n, unsigned l, double r);
52 
56 double lastZeroBound (int n, int l);
57 
65 double getBoundN (int n, int l);
66 
74 double S (int n, int l, double r, double lambda = DEFAULT_LAMBDA);
75 
83 double getBoundFar (int n, int l, double eps, int max_steps = DEFAULT_MAXSTEPS);
84 
92 double getSturmFar (int n, int l, double lambda, double eps, int max_steps = DEFAULT_MAXSTEPS);
93 
110 double F (double k, int l, double r, double sigma = special::constant::Nan);
111 
116 double evalFreeStatePhase (double k, int l, double sigma = special::constant::Nan);
117 
121 double evalFreeState_asy(double k, int l, double r, double sigma);
122 
126 double getFreeAsyZero(double k, int l, double Sigma, double eps, int max_steps, int nzero);
127 
131 double getFreeAsyTop(double k, int l, double Sigma, double eps, int max_steps, int ntop);
132 
148 double getFreeFar(double k, int l, double Sigma = special::constant::Nan, double eps = 1e-10, int max_steps = DEFAULT_MAXSTEPS);
149 
150 }
151 
155 class HydrogenFunction : public RadialFunction<double>
156 {
157 public:
158 
160  HydrogenFunction(int n, int l)
161  : n_(n), l_(l) {}
162 
173  inline double far (double eps = 1e-10, int max_steps = 1000) const
174  {
175  return Hydrogen::getBoundFar(n_,l_,eps,max_steps);
176  };
177 
179  inline int n () const { return n_; }
180 
182  inline int l () const { return l_; }
183 
185  double operator() (double r) const;
186 
188  double getTurningPoint () const;
189 
191  inline bool operator== (HydrogenFunction const & psi) const
192  {
193  return n_ == psi.n_ and l_ == psi.l_;
194  }
195 
196 private:
197 
199  int n_;
200 
202  int l_;
203 };
204 
205 #endif
double far(double eps=1e-10, int max_steps=1000) const
Get far radius.
Definition: hydrogen.h:173
Definition: hydrogen.h:155
double getSturmFar(int n, int l, double lambda, double eps, int max_steps)
Definition: hydrogen.cpp:85
double F(double k, int l, double r, double sigma)
Definition: hydrogen.cpp:163
bool operator==(HydrogenFunction const &psi) const
Comparison.
Definition: hydrogen.h:191
double lastZeroBound(int n, int l)
Get last node of the bound radial wave function.
Definition: hydrogen.cpp:26
const double e
Definition: special.h:44
double getBoundN(int n, int l)
Return all constant factors of the bound state.
double getFreeAsyTop(double k, int l, double Sigma, double eps, int max_steps, int ntop)
Definition: hydrogen.cpp:232
double getFreeFar(double k, int l, double Sigma, double eps, int max_steps)
Return sufficiently far radius for using the asymptotic form of the free state.
Definition: hydrogen.cpp:248
HydrogenFunction(int n, int l)
Constructor for bound state.
Definition: hydrogen.h:160
double getFreeAsyZero(double k, int l, double Sigma, double eps, int max_steps, int nzero)
Definition: hydrogen.cpp:216
double P(unsigned n, unsigned l, double r)
Hydrogen bound radial orbital.
Definition: hydrogen.cpp:133
double evalFreeStatePhase(double k, int l, double sigma)
Definition: hydrogen.cpp:200
int n() const
Get principal quantum number.
Definition: hydrogen.h:179
int l() const
Get orbital quantum number.
Definition: hydrogen.h:182
double S(int n, int l, double r, double lambda)
Sturmian wave function .
Definition: hydrogen.cpp:205
double getTurningPoint() const
Classical turning point.
Definition: hydrogen.cpp:320
double getBoundFar(int n, int l, double eps, int max_steps)
Definition: hydrogen.cpp:32
Base class for radial functions.
Definition: special.h:536
const double Nan
Definition: special.h:68
#define DEFAULT_LAMBDA
Default range parameter in the Sturmian functions.
Definition: hydrogen.h:21
double operator()(double r) const
Evaluate the function.
Definition: hydrogen.cpp:310
double evalFreeState_asy(double k, int l, double r, double sigma)
Definition: hydrogen.cpp:211
#define DEFAULT_MAXSTEPS
Definition: hydrogen.h:24