Linear indices of 2d cartesian monomials up to a given order. More...
#include <cmindices.h>
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:
| |
| 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:
| |
| 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. | |
Linear indices of 2d cartesian monomials up to a given order.
| cmindices::cmindices | ( | int | maxorder | ) |
| 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 | 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 | 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.
| dx | is the displacement in the direction of "x" | |
| dy | is the displacement in the direction of "y" |
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.
| n1 | first monomial index | |
| n2 | second monomial index |
| 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.
| px | is the power of "x" | |
| py | is the power of "x" |
Referenced by cmindices().
| int cmindices::getnm | ( | ) | const [inline] |
| int cmindices::getnm2 | ( | ) | const [inline] |
Obtains the number of monomials of the double order.
| int cmindices::getpxi | ( | int | i | ) | const [inline] |
Returns the power of "x" in the specified monomial.
| i | index of the monomial (0< =i <getnm2() ). |
Referenced by addDownConv(), cmindices(), cmpole(), and moments::moments().
| int cmindices::getpyi | ( | int | i | ) | const [inline] |
Returns the power of "y" in the specified monomial.
| i | index of the monomial (0< =i <getnm2() ). |
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.
| n1 | first monomial index | |
| n2 | second monomial index |
| 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.
| g | particle's aspect ratio | |
| dist | distance between the source and the field expansion center. |
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.
| g | particle's aspect ratio | |
| dist | distance between the source and the field expansion center. |
Referenced by nanomagn::group::precalcTaylor(), and nanomagn::group::updateSmoothField().
1.6.3