35 std::complex<double>
c;
61 std::vector<ylmcoeff_t>
comb;
72 void addylm(
int l,
int m, std::complex<double> c);
74 void addylm(
int l,
int m,
double c);
92 std::vector<ylmcoeff_t>
getcoeffs()
const;
142 std::vector<SphericalExpansion>
table;
161 std::vector< std::vector<SphericalExpansion> > table;
164 size_t ind(
int l,
int m,
int n)
const;
int m
Angular number m of term in expansion.
Definition: spherical_expansion.h:33
SphericalExpansion & operator+=(const SphericalExpansion &rhs)
Increment operator.
Definition: spherical_expansion.cpp:190
int maxam
Maximum angular momentum supported.
Definition: spherical_expansion.h:144
SphericalExpansion & operator*=(const SphericalExpansion &rhs)
Multiplication operator.
Definition: spherical_expansion.cpp:281
void add(const ylmcoeff_t &c)
Add new Ylm with coefficient c to the linear combination.
Definition: spherical_expansion.cpp:60
ylmcoeff_t getcoeff(size_t i) const
Get i:th expansion coefficient.
Definition: spherical_expansion.cpp:166
void print() const
Print multiplication table.
Definition: spherical_expansion.cpp:341
size_t getN() const
Get amount of terms in the expansion.
Definition: spherical_expansion.cpp:162
SphericalExpansion operator+(const SphericalExpansion &rhs) const
Addition operator.
Definition: spherical_expansion.cpp:182
std::vector< ylmcoeff_t > getcoeffs() const
Get expansion coefficients.
Definition: spherical_expansion.cpp:170
std::vector< ylmcoeff_t > comb
Linear combination of spherical harmonics.
Definition: spherical_expansion.h:61
SphericalExpansion()
Constructor.
Definition: spherical_expansion.cpp:54
std::vector< SphericalExpansion > table
Multiplication table of spherical harmonics.
Definition: spherical_expansion.h:142
int getmaxl() const
Get maximum value of l in expansion.
Definition: spherical_expansion.cpp:174
std::complex< double > c
Expansion coefficient.
Definition: spherical_expansion.h:35
SphericalExpansion mult(const SphericalExpansion &lhs, const SphericalExpansion &rhs) const
Multiplication operator.
Definition: spherical_expansion.cpp:351
Spherical expansion of px^l py^m pz^n.
Definition: spherical_expansion.h:159
SphericalExpansion operator*(const SphericalExpansion &rhs) const
Multiplication operator.
Definition: spherical_expansion.cpp:221
SphericalExpansion & operator-=(const SphericalExpansion &rhs)
Decrement operator.
Definition: spherical_expansion.cpp:213
SphericalExpansion operator-() const
Get negative of expansion.
Definition: spherical_expansion.cpp:197
Multiplication table of spherical harmonics.
Definition: spherical_expansion.h:140
Coefficient of expansion in spherical harmonics .
Definition: spherical_expansion.h:29
SphericalExpansion conjugate() const
Complex conjugate the expansion.
Definition: spherical_expansion.cpp:117
void clean()
Clean out the expansion by removing any entries with zero coefficient.
Definition: spherical_expansion.cpp:93
~SphericalExpansion()
Destructor.
Definition: spherical_expansion.cpp:57
void print() const
Print out the expansion.
Definition: spherical_expansion.cpp:134
void clear()
Clear out everything.
Definition: spherical_expansion.cpp:111
void addylm(int l, int m, std::complex< double > c)
Add new Ylm with coefficient c to the linear combination.
Definition: spherical_expansion.cpp:80
int l
Angular number l of term in expansion.
Definition: spherical_expansion.h:31
Class for working with spherical harmonics expansions.
Definition: spherical_expansion.h:59
void sort()
Sort the combination in increasing l, increasing m.
Definition: spherical_expansion.cpp:141
SphericalExpansionMultiplicationTable(int maxam=max_am)
Construct multiplication table that supports spherical harmonics up to maxam.
Definition: spherical_expansion.cpp:318
~SphericalExpansionMultiplicationTable()
Destructor.
Definition: spherical_expansion.cpp:338
size_t ind(int l, int m, int n) const
Get index of element at (l,m,n)