10 std::vector<std::vector<std::complex<double> > >
data;
16 for (
unsigned int l=0;l<=LMAX;l++) {
17 std::vector<std::complex<double> >
theMs;
18 for (
int m=-l; m<=
int(l);m++) {
19 theMs.push_back(std::complex<double> (0.0));
38 return c->
data.size()-1;
43 return c->
data[l][m+l];
48 return c->
data[l][m+l];
54 for (
unsigned int l=0;l<=c.
getLMax();l++) {
55 for (
int m=-l;m<=
int(l);m++) {
56 o <<
"l=" << l <<
" m=" ;
59 o << m <<
" mag: " << c(l,m) << std::endl;
81 for (
unsigned int l=0;l<=LMAX;l++) {
82 for (
int m=-l;m<=
int(l);m++) {
93 for (
unsigned int l=0;l<=LMAX;l++) {
94 for (
int m=-l;m<=
int(l);m++) {
105 for (
unsigned int l=0;l<=LMAX;l++) {
106 for (
int m=-l;m<=
int(l);m++) {
119 std::complex<double>
result=0.0;
120 if (a.
getLMax()!=b.
getLMax())
throw std::runtime_error (
"function dot: SphericalHarmonicCoefficientSets of different dimension");
122 for (
unsigned int l=0;l<=a.
getLMax();l++) {
123 for (
int m=-l;m<=
int(l);m++) {
131 unsigned int LMAX=coefficientsA.
getLMax();
134 for (
unsigned int L=0;L<=2*LMAX;L++) {
135 for (
int M=-L; M<=
int(L); M++) {
136 coefficientsASq(L,M)=0.0;
137 for (
unsigned int l1=0;l1<=LMAX;l1++) {
138 for (
unsigned int l2=0;l2<=LMAX;l2++) {
139 for (
int m1=-l1;m1<=
int(l1);m1++) {
140 for (
int m2=-l2;m2<=
int(l2);m2++) {
142 if (((l1+l2) >= L) &&
abs(l1-l2) <=
int(L)) {
143 coefficientsASq(L,M) += (coefficientsA(l1,m1)*
144 conj(coefficientsA(l2,m2))*
146 sqrt((2*l1+1)*(2*l2+1)/(4*
M_PI*(2*L+1)))*
147 clebschGordan(l1,l2,0,0,L,0)*
clebschGordan(l1,l2,m1,-m2,L,M));
156 return coefficientsASq;
std::vector< std::vector< std::complex< double > > > data
SphericalHarmonicCoefficientSet & operator-=(const SphericalHarmonicCoefficientSet &)
SphericalHarmonicCoefficientSet & operator=(const SphericalHarmonicCoefficientSet &)
~SphericalHarmonicCoefficientSet()
const std::complex< double > & operator()(unsigned int l, int m) const
SphericalHarmonicCoefficientSet & operator*=(const std::complex< double > &s)
SphericalHarmonicCoefficientSet(unsigned int LMAX)
SphericalHarmonicCoefficientSet & operator+=(const SphericalHarmonicCoefficientSet &)
unsigned int getLMax() const
std::ostream & operator<<(std::ostream &os, const Argument &a)
std::complex< double > dot(const SphericalHarmonicCoefficientSet &, const SphericalHarmonicCoefficientSet &)
SphericalHarmonicCoefficientSet squareExpansionCoefficients(const SphericalHarmonicCoefficientSet &)