Hex  1.0
Hydrogen-electron collision solver
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
wave_distort.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_DISTORTED_WAVE
14 #define HEX_DISTORTED_WAVE
15 
16 #include <gsl/gsl_interp.h>
17 
18 #include "complex.h"
19 #include "potential.h"
20 #include "special.h"
21 
54 class DistortedWave : public RadialFunction<double>
55 {
56 public:
57 
58  // constructors
59  // @{
60  DistortedWave(double _kn, int _ln, DistortingPotential const & _U);
61  DistortedWave(DistortedWave const& W) { *this = W; }
62  // @}
63 
64  // destructor
66 
67  // assignment
69 
73  double operator() (double x) const;
74 
78  Complex getPhasef() const { return Complex(cos(phase),sin(phase)); }
79 
83  double getPhase() const { return phase; }
84 
86  double k() const { return kn; }
87 
89  int l() const { return ln; }
90 
92  double getTurningPoint () const { return r0; }
93 
95  std::pair<double,int> getZeroAsymptotic (double x) const;
96 
98  void toFile(const char * filename) const { write_array(grid, array, filename); }
99 
103  double farRadius() const { return rf; }
104 
105  size_t sampleCount() const { return grid.size(); }
106 
108  mutable unsigned Evaluations;
109 
110 private:
111 
112  // distorting potential
114 
115  // interpolator
116  gsl_interp *interpolator, *interpolator0;
117 
118  // distorted wave input parameters
119  double kn; // wavenumber of the distorted wave
120  int ln; // angular momentum of the distorted wave
121 
122  // classical turning point and far radius
123  double r0, rf;
124 
125  // distorted wave computed attributes
126  int samples, samples0; // sample count
127  double h, h0; // discretization step
128 
129  // distorted wave data
130  double phase; // phase shift
131  rArray grid, grid0; // grid
132  rArray array, array0; // samples
133 };
134 
135 #endif
unsigned Evaluations
(debuging parameter) number of evaluations
Definition: wave_distort.h:108
double getPhase() const
Definition: wave_distort.h:83
DistortedWave(DistortedWave const &W)
Definition: wave_distort.h:61
Distorting potential information.
Definition: potential.h:67
Distorted wave information.
Definition: wave_distort.h:54
double operator()(double x) const
Definition: wave_distort.cpp:247
NumberArray< T > cos(NumberArray< T > const &A)
Return per-element cosine.
Definition: arrays.h:1747
DistortedWave(double _kn, int _ln, DistortingPotential const &_U)
Definition: wave_distort.cpp:103
void toFile(const char *filename) const
Export data to file using write_array.
Definition: wave_distort.h:98
double farRadius() const
Definition: wave_distort.h:103
std::pair< double, int > getZeroAsymptotic(double x) const
Near-zero asymptotic behaviour.
Definition: wave_distort.cpp:267
double k() const
Wavenumber.
Definition: wave_distort.h:86
DistortedWave operator=(DistortedWave const &W)
Definition: wave_distort.cpp:31
double getTurningPoint() const
Classical turning point.
Definition: wave_distort.h:92
~DistortedWave()
Definition: wave_distort.cpp:240
NumberArray< T > sin(NumberArray< T > const &A)
Return per-element sine.
Definition: arrays.h:1723
Complex getPhasef() const
Definition: wave_distort.h:78
int l() const
Angular momentum.
Definition: wave_distort.h:89
std::complex< double > Complex
Definition: complex.h:20
Base class for radial functions.
Definition: special.h:536
void write_array(const ArrayView< double > array, const char *filename)
Definition: arrays.cpp:104
size_t size() const
Item count.
Definition: arrays.h:673
size_t sampleCount() const
Definition: wave_distort.h:105