-
Notifications
You must be signed in to change notification settings - Fork 0
/
wave.h
52 lines (51 loc) · 1.05 KB
/
wave.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include"mymath.h"
struct Legendre {
int n;
Polynomial a;
Legendre(int n);
~Legendre();
};
struct AssociatedLegendre {
int l,m;
Polynomial a;
AssociatedLegendre(int l,int m);
~AssociatedLegendre();
double calc(double x) const;
};
struct RadialWave {
int n,l;
Polynomial a;
RadialWave(int n,int l);
double calc(double rho) const;
double integrated(double x) const ;
};
struct SphericalHarmonic:Integrated11 {
double a;
int l,m;
AssociatedLegendre *pal;
SphericalHarmonic(int l,int m);
~SphericalHarmonic();
Complex calc(double theta,double phi) const ;
double integrated(double x) const;
};
class BasisSet {
public:
struct Eigenstate {
int n,l,m;
Eigenstate(int n,int l,int m);
RadialWave *fR;
SphericalHarmonic *fS;
Complex weight;
double energy;
};
BasisSet(int maxN);
void project(const WavePacket &wave);
int getSize() const;
void getEnergy(double *a) const;
void getValueByCartesian(Complex *a,const Vector3 &p) const;
void writeWeight() const;
~BasisSet();
private:
std::vector<Eigenstate> v;
};