Encapsulates moments of a given element (both volume and surface). More...
#include <moments.h>
Public Member Functions | |
| moments (const cmindices &cmi, const dcmplx c, int nelem, const elementintegrator &integrator) | |
| Constructs multipole moments of the given element by contour integration. | |
| moments (const cmindices &cmi) | |
| Constructs zero-initialized multipole moments, initialized to zero. | |
| const std::vector< double > & | getS () const |
| Returns the surface component of moments. | |
| const std::vector< double > & | getV () const |
| Returns the volume component of moments. | |
| moments & | chargeMul (double qF, double qV, double qS) |
| Multiplies these moments by specified charge amount. | |
| void | erase () |
| Zeroes-out these multipole moments. | |
| void | addShifted (const cmindices &cmi, const moments &m, dcmplx shift) |
| Adds shifted another moment to this one. | |
| void | addShifted (const cmindices &cmi, const moments &m, const convcoeffs &cm) |
| Adds shifted another moment to this one. | |
| void | addShiftedTaylor (const cmindices &cmi, const moments &m, dcmplx shift) |
| Adds shifted Taylor expansion to this one. | |
| void | addShiftedTaylor (const cmindices &cmi, const moments &m, const convcoeffs &cm) |
| Adds shifted Taylor expansion to this one. | |
| void | addTaylor (const cmindices &cmi, const moments &m, const convcoeffs &dpS, const convcoeffs &dpV) |
| Adds smooth field Taylor coefficients of another multipole to this one. | |
| moments & | operator+= (const moments &rhs) |
| Adds the other moments to these ones. It is the responsibility of the caller to ensure that the moments correspond to the expansion around the same center. | |
| const moments | operator+ (const moments &other) const |
| Calculates the sum of the moments. It is the responsibility of the caller to ensure that the moments correspond to the expansion around the same center. | |
| double | operator* (const moments &other) const |
| Calculates convolution of the moments. It is the responsibility of the caller to ensure that the convolution makes sense (e.g. it is the convolution of Taylor expansion and moments around the same center, producing the energy). | |
| virtual int | getStorage () |
| Returns the amount of RAM, occupied by this object. | |
Encapsulates moments of a given element (both volume and surface).
| moments::moments | ( | const cmindices & | cmi, | |
| const dcmplx | c, | |||
| int | nelem, | |||
| const elementintegrator & | integrator | |||
| ) |
Constructs multipole moments of the given element by contour integration.
| cmi | Cartesian multipole indices. | |
| c | the center, around which moments are calculated. | |
| nelem | Number of the element (to be used in call to integrator) | |
| integrator | Integrator to perform the contour integration |
References cmindices::getnm(), cmindices::getpxi(), cmindices::getpyi(), elementintegrator::rintegrate(), and elementintegrator::robintegrate().
| moments::moments | ( | const cmindices & | cmi | ) |
Constructs zero-initialized multipole moments, initialized to zero.
| cmi | Cartesian multipole indices. |
| void moments::addShifted | ( | const cmindices & | cmi, | |
| const moments & | m, | |||
| const convcoeffs & | cm | |||
| ) | [inline] |
Adds shifted another moment to this one.
| cmi | Cartesian multipole indices. | |
| m | other moment | |
| cm | pre-calculated cmpole vector. |
References cmindices::addUpConv().
Adds shifted another moment to this one.
| cmi | Cartesian multipole indices. | |
| m | other moment | |
| shift | complex shift vector. |
References cmindices::cmpole().
Referenced by nanomagn::group::updateMoments().
| void moments::addShiftedTaylor | ( | const cmindices & | cmi, | |
| const moments & | m, | |||
| const convcoeffs & | cm | |||
| ) | [inline] |
Adds shifted Taylor expansion to this one.
| cmi | Cartesian multipole indices. | |
| m | other moment | |
| cm | pre-calculated cmpole vector. |
References cmindices::addDownConv().
Adds shifted Taylor expansion to this one.
| cmi | Cartesian multipole indices. | |
| m | other moment | |
| shift | complex shift vector. |
References cmindices::cmpole().
Referenced by nanomagn::group::updateSmoothField().
| void moments::addTaylor | ( | const cmindices & | cmi, | |
| const moments & | m, | |||
| const convcoeffs & | dpS, | |||
| const convcoeffs & | dpV | |||
| ) | [inline] |
Adds smooth field Taylor coefficients of another multipole to this one.
| cmi | Cartesian multipole indices. | |
| m | other moment | |
| dpS | array of pre-calculated double-order surface charges convolution coefficients. | |
| dpV | array of pre-calculated double-order volume charges convolution coefficients. |
References cmindices::addDownConv().
Referenced by nanomagn::group::updateSmoothField().
| moments& moments::chargeMul | ( | double | qF, | |
| double | qV, | |||
| double | qS | |||
| ) | [inline] |
Multiplies these moments by specified charge amount.
| qF | is the amount of surface charge. | |
| qV | is the amount of volume charge. | |
| qS | is the amount of volume charge. |
Referenced by nanomagn::group::updateMoments().
| const std::vector<double>& moments::getS | ( | ) | const [inline] |
Returns the surface component of moments.
| int moments::getStorage | ( | ) | [virtual] |
Returns the amount of RAM, occupied by this object.
| const std::vector<double>& moments::getV | ( | ) | const [inline] |
Returns the volume component of moments.
| double moments::operator* | ( | const moments & | other | ) | const [inline] |
Calculates convolution of the moments. It is the responsibility of the caller to ensure that the convolution makes sense (e.g. it is the convolution of Taylor expansion and moments around the same center, producing the energy).
| other | other moments. |
Calculates the sum of the moments. It is the responsibility of the caller to ensure that the moments correspond to the expansion around the same center.
| other | other moments. |
Adds the other moments to these ones. It is the responsibility of the caller to ensure that the moments correspond to the expansion around the same center.
| rhs | other moments. |
1.6.3