cmindices Class Reference

Linear indices of 2d cartesian monomials up to a given order. More...

#include <cmindices.h>

List of all members.

Public Member Functions

 cmindices (int maxorder)
 Constructs the table of monomial indices up to the specified order (inclusive).
int geti (int px, int py) const
 Calculates the index of the monomial with specified powers. The constraint is that px+py must be non-negative and less or equal to 2*maxorder.
int getnm () const
 Obtains the number of monomials.
int getnm2 () const
 Obtains the number of monomials of the double order.
int getpxi (int i) const
 Returns the power of "x" in the specified monomial.
int getpyi (int i) const
 Returns the power of "y" in the specified monomial.
int getsumi (int n1, int n2) const
 Gets the index of monomial, corresponding to the product of monomials with specified indices.
int getdiffi (int n1, int n2) const
 Gets the index of monomial, corresponding to the quotient of monomials with specified indices.
void addDownConv (const std::vector< double > &v, const std::vector< double > &c, std::vector< double > &vp) const
 Calculates the down convolution of two cartesian monomial tensors and adds it to the specified one. Specifically, this function calculates:

\[ V^\prime_{\vec{m}}=\sum\limits_{\vec{p}} V_{\vec{m}+\vec{p}} c^{\vec{p}}. \]

.

void addUpConv (const std::vector< double > &v, const std::vector< double > &c, std::vector< double > &vp) const
 Calculates the up convolution of two cartesian monomial tensors and adds it to the specified one. Specifically, this function calculates:

\[ V^\prime_{\vec{m}}=\sum\limits_{\vec{p}} V_{\vec{m}-\vec{p}} c^{\vec{p}}. \]

.

std::vector< double > cmpole (double dx, double dy) const
 Fictious multipole, used to shift the Taylor expansion coefficients.
taylorbasis prepTaylorCalcS (const double g, dcmplx dist) const
 Prepares calculation of (surface charges) smooth field Taylor expansion coefficients. This performs all the necessary evaluations of the Coloumb potential derivatives for given g and complex distance between the center of multipole, generating the field, and the point, at which the Taylor expansion coefficients will be calculated.
taylorbasis prepTaylorCalcV (const double g, dcmplx dist) const
 Prepares calculation of (volume charges) smooth field Taylor expansion coefficients. This performs all the necessary evaluations of the Coloumb potential derivatives for given g and complex distance between the center of multipole, generating the field, and the point, at which the Taylor expansion coefficients will be calculated.

Detailed Description

Linear indices of 2d cartesian monomials up to a given order.

Author:
Konstantin L. Metlov <metlov@kinetic.ac.donetsk.ua>

Constructor & Destructor Documentation

cmindices::cmindices ( int  maxorder  ) 

Constructs the table of monomial indices up to the specified order (inclusive).

Parameters:
maxorder is the highest order of monomials to include.

References geti(), getpxi(), and getpyi().


Member Function Documentation

void cmindices::addDownConv ( const std::vector< double > &  v,
const std::vector< double > &  c,
std::vector< double > &  vp 
) const

Calculates the down convolution of two cartesian monomial tensors and adds it to the specified one. Specifically, this function calculates:

\[ V^\prime_{\vec{m}}=\sum\limits_{\vec{p}} V_{\vec{m}+\vec{p}} c^{\vec{p}}. \]

.

Parameters:
v is one of them (indexed as m+p)
c is another one (indexed as p)
vp is the tensor to add the result to.

References getpxi(), and getpyi().

Referenced by moments::addShiftedTaylor(), and moments::addTaylor().

void cmindices::addUpConv ( const std::vector< double > &  v,
const std::vector< double > &  c,
std::vector< double > &  vp 
) const

Calculates the up convolution of two cartesian monomial tensors and adds it to the specified one. Specifically, this function calculates:

\[ V^\prime_{\vec{m}}=\sum\limits_{\vec{p}} V_{\vec{m}-\vec{p}} c^{\vec{p}}. \]

.

Parameters:
v is one of them (indexed as m+p)
c is another one (indexed as p)
vp is the tensor to add the result to.

Referenced by moments::addShifted().

std::vector< double > cmindices::cmpole ( double  dx,
double  dy 
) const

Fictious multipole, used to shift the Taylor expansion coefficients.

Parameters:
dx is the displacement in the direction of "x"
dy is the displacement in the direction of "y"
Returns:
the cartesian monomial tensor, used in shifting downconvolution.

References getpxi(), and getpyi().

Referenced by moments::addShifted(), and moments::addShiftedTaylor().

int cmindices::getdiffi ( int  n1,
int  n2 
) const [inline]

Gets the index of monomial, corresponding to the quotient of monomials with specified indices.

Parameters:
n1 first monomial index
n2 second monomial index
Returns:
index of quotient of monomials or -1 if such qoutient has negative powers.
int cmindices::geti ( int  px,
int  py 
) const

Calculates the index of the monomial with specified powers. The constraint is that px+py must be non-negative and less or equal to 2*maxorder.

Parameters:
px is the power of "x"
py is the power of "x"
Returns:
index of the monomial or -1 if arguments violate constraint.

Referenced by cmindices().

int cmindices::getnm (  )  const [inline]

Obtains the number of monomials.

Returns:
the number of monomials.

Referenced by moments::moments().

int cmindices::getnm2 (  )  const [inline]

Obtains the number of monomials of the double order.

Returns:
the number of monomials.
int cmindices::getpxi ( int  i  )  const [inline]

Returns the power of "x" in the specified monomial.

Parameters:
i index of the monomial (0< =i <getnm2() ).
Returns:
the power of "x" in the monomial

Referenced by addDownConv(), cmindices(), cmpole(), and moments::moments().

int cmindices::getpyi ( int  i  )  const [inline]

Returns the power of "y" in the specified monomial.

Parameters:
i index of the monomial (0< =i <getnm2() ).
Returns:
the power of "y" in the monomial

Referenced by addDownConv(), cmindices(), cmpole(), and moments::moments().

int cmindices::getsumi ( int  n1,
int  n2 
) const [inline]

Gets the index of monomial, corresponding to the product of monomials with specified indices.

Parameters:
n1 first monomial index
n2 second monomial index
Returns:
index of product of monomials, with values from 0 up to getnm2().
taylorbasis cmindices::prepTaylorCalcS ( const double  g,
dcmplx  dist 
) const [inline]

Prepares calculation of (surface charges) smooth field Taylor expansion coefficients. This performs all the necessary evaluations of the Coloumb potential derivatives for given g and complex distance between the center of multipole, generating the field, and the point, at which the Taylor expansion coefficients will be calculated.

Parameters:
g particle's aspect ratio
dist distance between the source and the field expansion center.
Returns:
array of coefficients, reusable for Taylor expansion coefficients calculations in the same geometry.

Referenced by nanomagn::group::precalcTaylor(), and nanomagn::group::updateSmoothField().

taylorbasis cmindices::prepTaylorCalcV ( const double  g,
dcmplx  dist 
) const [inline]

Prepares calculation of (volume charges) smooth field Taylor expansion coefficients. This performs all the necessary evaluations of the Coloumb potential derivatives for given g and complex distance between the center of multipole, generating the field, and the point, at which the Taylor expansion coefficients will be calculated.

Parameters:
g particle's aspect ratio
dist distance between the source and the field expansion center.
Returns:
array of coefficients, reusable for Taylor expansion coefficients calculations in the same geometry.

Referenced by nanomagn::group::precalcTaylor(), and nanomagn::group::updateSmoothField().


The documentation for this class was generated from the following files:
Generated on Mon Oct 8 18:26:44 2012 for nanomagnFMM by  doxygen 1.6.3