Class for working with spherical harmonics expansions. More...
#include <spherical_expansion.h>
Public Member Functions | |
SphericalExpansion () | |
Constructor. | |
~SphericalExpansion () | |
Destructor. | |
void | add (const ylmcoeff_t &c) |
Add new Ylm with coefficient c to the linear combination. | |
void | addylm (int l, int m, std::complex< double > c) |
Add new Ylm with coefficient c to the linear combination. | |
void | addylm (int l, int m, double c) |
Add new Ylm with coefficient c to the linear combination. | |
void | clean () |
Clean out the expansion by removing any entries with zero coefficient. | |
void | clear () |
Clear out everything. | |
SphericalExpansion | conjugate () const |
Complex conjugate the expansion. | |
void | print () const |
Print out the expansion. | |
void | sort () |
Sort the combination in increasing l, increasing m. | |
size_t | getN () const |
Get amount of terms in the expansion. | |
ylmcoeff_t | getcoeff (size_t i) const |
Get i:th expansion coefficient. | |
std::vector< ylmcoeff_t > | getcoeffs () const |
Get expansion coefficients. | |
int | getmaxl () const |
Get maximum value of l in expansion. | |
SphericalExpansion | operator+ (const SphericalExpansion &rhs) const |
Addition operator. | |
SphericalExpansion & | operator+= (const SphericalExpansion &rhs) |
Increment operator. | |
SphericalExpansion | operator- () const |
Get negative of expansion. | |
SphericalExpansion | operator- (const SphericalExpansion &rhs) const |
Substraction operator. | |
SphericalExpansion & | operator-= (const SphericalExpansion &rhs) |
Decrement operator. | |
SphericalExpansion | operator* (const SphericalExpansion &rhs) const |
Multiplication operator. | |
SphericalExpansion & | operator*= (const SphericalExpansion &rhs) |
Multiplication operator. | |
SphericalExpansion & | operator*= (std::complex< double > fac) |
Scale expansion by fac. | |
SphericalExpansion & | operator*= (double fac) |
Scale expansion by fac. | |
Private Attributes | |
std::vector< ylmcoeff_t > | comb |
Linear combination of spherical harmonics. | |
Friends | |
class | SphericalExpansionMultiplicationTable |
SphericalExpansion | operator* (std::complex< double > fac, const SphericalExpansion &func) |
Scale expansion by fac. | |
SphericalExpansion | operator* (double fac, const SphericalExpansion &func) |
Scale expansion by fac. | |
Class for working with spherical harmonics expansions.
This class can be used for operating with linear combinations of spherical harmonics. It can do, e.g., multiplication of spherical harmonics using the closure relations.