moments Class Reference

Encapsulates moments of a given element (both volume and surface). More...

#include <moments.h>

List of all members.

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.

Detailed Description

Encapsulates moments of a given element (both volume and surface).

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

Constructor & Destructor Documentation

moments::moments ( const cmindices &  cmi,
const dcmplx  c,
int  nelem,
const elementintegrator &  integrator 
)

Constructs multipole moments of the given element by contour integration.

Parameters:
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.

Parameters:
cmi Cartesian multipole indices.

Member Function Documentation

void moments::addShifted ( const cmindices &  cmi,
const moments &  m,
const convcoeffs &  cm 
) [inline]

Adds shifted another moment to this one.

Parameters:
cmi Cartesian multipole indices.
m other moment
cm pre-calculated cmpole vector.

References cmindices::addUpConv().

void moments::addShifted ( const cmindices &  cmi,
const moments &  m,
dcmplx  shift 
)

Adds shifted another moment to this one.

Parameters:
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.

Parameters:
cmi Cartesian multipole indices.
m other moment
cm pre-calculated cmpole vector.

References cmindices::addDownConv().

void moments::addShiftedTaylor ( const cmindices &  cmi,
const moments &  m,
dcmplx  shift 
)

Adds shifted Taylor expansion to this one.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Returns:
multipole moment components, corresponding to surface charges.
int moments::getStorage (  )  [virtual]

Returns the amount of RAM, occupied by this object.

Returns:
amount of RAM in bytes.
const std::vector<double>& moments::getV (  )  const [inline]

Returns the volume component of moments.

Returns:
multipole moment components, corresponding to volume charges.
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).

Parameters:
other other moments.
const moments moments::operator+ ( const moments &  other  )  const [inline]

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.

Parameters:
other other moments.
moments& moments::operator+= ( const moments &  rhs  )  [inline]

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.

Parameters:
rhs other moments.

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