00001 #ifndef _RADIAL_POTENTIAL_HPP_
00002 #define _RADIAL_POTENTIAL_HPP_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <vector>
00025 #include "linalg.hpp"
00026
00027 namespace quantumdot
00028 {
00029
00048 class RadialPotential
00049 {
00050 public:
00052 enum quad_enum { STANDARD_HERMITE_QUAD, GENERALIZED_HERMITE_QUAD };
00054 enum basis_enum { GENERALIZED_LAGUERRE_BASIS, GENERALIZED_HERMITE_BASIS };
00055
00056
00057 private:
00058 double lambda;
00059 double alpha;
00060 double beta;
00061 std::vector<double> p;
00062 bool p_iseven;
00063 quad_enum quad_type;
00064 basis_enum basis_type;
00065
00066 public:
00068 RadialPotential()
00069 {
00070
00071 alpha = 1;
00072 beta = 0;
00073 p.resize(1);
00074 p_iseven = true;
00075 p[0] = 1.0;
00076 lambda = 1;
00077 quad_type = STANDARD_HERMITE_QUAD;
00078 basis_type = GENERALIZED_LAGUERRE_BASIS;
00079 }
00080
00082 void setIntegrationMethod(quad_enum x) { quad_type = x; }
00083
00085 void setBasisType(basis_enum x) { basis_type = x; }
00086
00088 void setPIsEven(bool x) { p_iseven = x; }
00089
00091 void setP(std::vector<double> poly)
00092 {
00093 p = poly;
00094 }
00095
00097 void setAlpha(double x) { alpha = x; }
00099 void setBeta(double x) { beta = x; }
00101 void setLambda(double x) { lambda = x; }
00102
00103
00108 void computeMatrix(dense_matrix& C, int n_max, int m = 0);
00109
00121 void computeEffectiveMatrix(dense_matrix& Ceff, int n_max, int m = 0);
00122
00124 std::ostream& operator<<(std::ostream& os)
00125 {
00126 using namespace std;
00127 os << "Potential:" << endl;
00128 os << " r^(-"<<alpha<<")*p(r)*exp(-r*"<<beta<<")"<<endl;
00129 }
00130
00131
00132 };
00133
00134
00135
00143 void computeHOMatrixGenHer(dense_matrix& H0, int N, int m);
00144
00151 void computeLagGenHerTrafo(dense_matrix& U, int N_lag, int N_her, int m);
00152
00153
00154
00155
00156 }
00157
00158
00159
00160
00161
00162 #endif // _RADIAL_POTENTIAL_HPP_