Hex: src/potential.h Source File

| Hex 2.2 Hydrogen-electron collision solver

potential.h
Go to the documentation of this file.
1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
2 // //
3 // / / / / __ \ \ / / //
4 // / /__ / / / _ \ \ \/ / //
5 // / ___ / | |/_/ / /\ \ //
6 // / / / / \_\ / / \ \ //
7 // //
8 // //
9 // Copyright (c) 2016, Jakub Benda, Charles University in Prague //
10 // //
11 // MIT License: //
12 // //
13 // Permission is hereby granted, free of charge, to any person obtaining a //
14 // copy of this software and associated documentation files (the "Software"), //
15 // to deal in the Software without restriction, including without limitation //
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense, //
17 // and/or sell copies of the Software, and to permit persons to whom the //
18 // Software is furnished to do so, subject to the following conditions: //
19 // //
20 // The above copyright notice and this permission notice shall be included //
21 // in all copies or substantial portions of the Software. //
22 // //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS //
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, //
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE //
26 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, //
27 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF //
28 // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //
29 // //
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31
32 #ifndef HEX_DISTORTING_POTENTIAL
33 #define HEX_DISTORTING_POTENTIAL
34
35 #include "hex-arrays.h"
36 #include "hex-hydrogen.h"
37 #include "hex-special.h"
38
54 extern const rArrays Ucoeffs;
55
86 class DistortingPotential : public special::RadialFunction<double>
87 {
88 public:
89 // constructors
90 // @{
91 DistortingPotential() : n_(0), k_(0.), rmax_(0) {}
92 DistortingPotential(int n, double rmax = 0.) : n_(n), k_(0.), rmax_(rmax) {}
93 DistortingPotential(double k, double rmax = 0.) : n_(0), k_(k), rmax_(rmax) {}
94 DistortingPotential(DistortingPotential const & U) : n_(U.n_), k_(U.k_), rmax_(U.rmax_) {}
95 // @}
96
100 DistortingPotential operator= (DistortingPotential const& V);
101
105 bool operator== (DistortingPotential const & V) const;
106
118 double operator() (double x) const;
119
126 double getTurningPoint () const { return 0.; }
127
136 std::pair<double,int> getZeroAsymptotic (double x) const { return std::make_pair(-1,-1); }
137
147 double plusMonopole(double x) const;
148
157 double getConstant() const;
158
165 double getFarRadius() const;
166
167 void toFile(const char * filename) const;
168 int n() const { return n_; }
169 double k() const { return k_; }
170
171 private:
172 int n_; // principal quantum number of distorting state
173 double k_; // wavenumber of distorting state
174 double rmax_; // far radius
175 };
176
177 #endif
Ucoeffs
const rArrays Ucoeffs
U polynomial coefficients.
Definition: potential.cpp:42
DistortingPotential
Distorting potential information.
Definition: potential.h:86
DistortingPotential::plusMonopole
double plusMonopole(double x) const
Add multipole field potential to the distorting potential.
Definition: potential.cpp:96
DistortingPotential::operator=
DistortingPotential operator=(DistortingPotential const &V)
Assignment.
Definition: potential.cpp:58
DistortingPotential::DistortingPotential
DistortingPotential(DistortingPotential const &U)
Definition: potential.h:94
DistortingPotential::getZeroAsymptotic
std::pair< double, int > getZeroAsymptotic(double x) const
Near-zero asymptotic behaviour.
Definition: potential.h:136
DistortingPotential::toFile
void toFile(const char *filename) const
Definition: potential.cpp:160
DistortingPotential::getTurningPoint
double getTurningPoint() const
Classical turning point.
Definition: potential.h:126
DistortingPotential::operator==
bool operator==(DistortingPotential const &V) const
Comparison.
Definition: potential.cpp:66
DistortingPotential::k
double k() const
Definition: potential.h:169
DistortingPotential::getFarRadius
double getFarRadius() const
Return largest evaluated coordinate.
Definition: potential.cpp:124
DistortingPotential::n
int n() const
Definition: potential.h:168
DistortingPotential::DistortingPotential
DistortingPotential(int n, double rmax=0.)
Definition: potential.h:92
DistortingPotential::getConstant
double getConstant() const
Return the zero limit.
Definition: potential.cpp:106
DistortingPotential::DistortingPotential
DistortingPotential(double k, double rmax=0.)
Definition: potential.h:93
DistortingPotential::DistortingPotential
DistortingPotential()
Definition: potential.h:91
DistortingPotential::operator()
double operator()(double x) const
Evaluate the distorting potential.
Definition: potential.cpp:72