1 #ifndef MULTIPOLE_EXPANSION_H_
2 #define MULTIPOLE_EXPANSION_H_
25 mutable unsigned int p;
31 mutable std::complex <double> *
_M_n_m;
47 void Add(
const double strength,
const dealii::Point<3> &point);
51 void AddNormDer(
const double strength,
const dealii::Point<3> &point,
const dealii::Tensor<1, 3> &normal);
53 double Evaluate(
const dealii::Point<3> &evalPoint);
60 inline void SetCenter(
const dealii::Point<3> &new_center)
62 this->center = new_center;
75 inline std::complex <double> &
GetCoeff(
unsigned int n,
unsigned int m)
const
77 return this->_M_n_m[(n)*(n+1)/2+m];
80 inline void SetCoeff(
unsigned int n,
unsigned int m, std::complex <double> &
value)
const
82 this->_M_n_m[(n)*(n+1)/2+m] =
value;
85 inline void AddToCoeff(
unsigned int n,
unsigned int m, std::complex <double> &
value)
const
87 this->_M_n_m[(n)*(n+1)/2+m] +=
value;
96 for (
unsigned int n = 0; n < dim+1 ; n++)
99 for (
unsigned int m = 0; m < n+1 ; m++)
105 for (
int ii = n-m; ii > 0; ii-- )
108 for (
int ii = n+m; ii > 0; ii-- )
111 A_n_m(n,m) = pow(-1.,
double(n))/sqrt(f1*f2);
std::complex< double > & GetCoeff(unsigned int n, unsigned int m) const
FullMatrix< double > & GetA_n_m() const
void SetCenter(const dealii::Point< 3 > &new_center)
dealii::Point< 3 > GetCenter() const
void AddToCoeff(unsigned int n, unsigned int m, std::complex< double > &value) const
std::complex< double > * GetCoeffs() const
dealii::Point< 3 > center
const AssLegFunction * assLegFunction
void SetCoeff(unsigned int n, unsigned int m, std::complex< double > &value) const
std::complex< double > * _M_n_m
static FullMatrix< double > A_n_m_Matrix(unsigned int dim)
static FullMatrix< double > A_n_m