ESyS-Particle  2.3.2
esys::lsm::ClosePackIterator Class Reference

#include <ClosePackIterator.h>

Inheritance diagram for esys::lsm::ClosePackIterator:
Collaboration diagram for esys::lsm::ClosePackIterator:

Public Member Functions

 ClosePackIterator ()
 ClosePackIterator (int numI, int numJ, int numK, double sphereRadius, ClosePackOrientation orientation=DEFAULT_ORIENT)
bool hasNext () const
Vec3 next ()
double getRadius () const

Static Public Attributes

static const double SQRT_1_OVER_3 = 1.0/sqrt(3.0)
static const double SQRT_8_OVER_3 = sqrt(8.0/3.0)
static const double SQRT_3 = sqrt(3.0)

Protected Types

typedef TmplMatrix< 3, 6, 6 > OffsetMatrix

Protected Member Functions

void incrementDimIndex ()
double getOffset (int i) const
const Vec3getMinPt () const
void setMinPt (const Vec3 &pt) const
void setDimRepeat (const Vec3L &dimRepeat)
void setOffsetMatrix (const OffsetMatrix &offsetMatrix)

Private Attributes

double m_radius
Vec3 m_minPt
OffsetMatrix m_offsetMatrix
Vec3L m_dimRepeat
Vec3L m_dimCount
Vec3L m_dimIdx
Vec3L m_dim

Static Private Attributes

static Vec3L s_orientationDimMap [NUM_ORIENTATIONS]

Detailed Description

Base class for iterators used to generate centre-points of spheres arranged in a close-packing.

Member Typedef Documentation

Constructor & Destructor Documentation

esys::lsm::ClosePackIterator::ClosePackIterator ( )
inline

Creates default empty iterator.

esys::lsm::ClosePackIterator::ClosePackIterator ( int  numI,
int  numJ,
int  numK,
double  sphereRadius,
ClosePackOrientation  orientation = DEFAULT_ORIENT 
)
inline

Creates an iterator which will iterate over numI*numJ*numK centre points of spheres with radius sphereRadius.

Parameters
numInumber of spheres in the i direction.
numJnumber of spheres in the j direction.
numKnumber of spheres in the k direction.
sphereRadiusradius of spheres in the packing.
orientationspecifies the axis alignment of layers.

References m_dimCount.

Member Function Documentation

const Vec3 & esys::lsm::ClosePackIterator::getMinPt ( ) const
inlineprotected

References m_minPt.

Referenced by next().

Here is the caller graph for this function:

double esys::lsm::ClosePackIterator::getOffset ( int  i) const
inlineprotected

References m_dimIdx, m_dimRepeat, and m_offsetMatrix.

Referenced by next().

Here is the caller graph for this function:

double esys::lsm::ClosePackIterator::getRadius ( ) const
inline

Returns the radius of spheres used in the iteration.

References m_radius.

Referenced by esys::lsm::CubicBlockIterator::CubicBlockIterator(), and esys::lsm::HexagBlockIterator::HexagBlockIterator().

Here is the caller graph for this function:

bool esys::lsm::ClosePackIterator::hasNext ( ) const
inline

Returns whether there is another centre point in the iteration sequence.

References m_dimCount, and m_dimIdx.

void esys::lsm::ClosePackIterator::incrementDimIndex ( )
inlineprotected

References m_dimCount, and m_dimIdx.

Referenced by next().

Here is the caller graph for this function:

Vec3 esys::lsm::ClosePackIterator::next ( )
inline

Returns the next centre-point in the iteration sequence.

References getMinPt(), getOffset(), incrementDimIndex(), m_dim, m_dimIdx, m_radius, SQRT_3, and SQRT_8_OVER_3.

Here is the call graph for this function:

void esys::lsm::ClosePackIterator::setDimRepeat ( const Vec3L dimRepeat)
inlineprotected

References m_dimRepeat.

Referenced by esys::lsm::CubicBlockIterator::CubicBlockIterator(), and esys::lsm::HexagBlockIterator::HexagBlockIterator().

Here is the caller graph for this function:

void esys::lsm::ClosePackIterator::setMinPt ( const Vec3 pt) const
inlineprotected
void esys::lsm::ClosePackIterator::setOffsetMatrix ( const OffsetMatrix offsetMatrix)
inlineprotected

References m_offsetMatrix.

Referenced by esys::lsm::CubicBlockIterator::CubicBlockIterator(), and esys::lsm::HexagBlockIterator::HexagBlockIterator().

Here is the caller graph for this function:

Member Data Documentation

Vec3L esys::lsm::ClosePackIterator::m_dim
private

Referenced by next().

Vec3L esys::lsm::ClosePackIterator::m_dimCount
private
Vec3L esys::lsm::ClosePackIterator::m_dimIdx
private
Vec3L esys::lsm::ClosePackIterator::m_dimRepeat
private

Referenced by getOffset(), and setDimRepeat().

Vec3 esys::lsm::ClosePackIterator::m_minPt
private

Referenced by getMinPt().

OffsetMatrix esys::lsm::ClosePackIterator::m_offsetMatrix
private

Referenced by getOffset(), and setOffsetMatrix().

double esys::lsm::ClosePackIterator::m_radius
private

Referenced by getRadius(), and next().

Vec3L esys::lsm::ClosePackIterator::s_orientationDimMap
staticprivate
Initial value:
{
Vec3L(0, 2, 1),
Vec3L(0, 1, 2),
Vec3L(0, 2, 1),
Vec3L(1, 0, 2),
Vec3L(1, 2, 0),
Vec3L(2, 0, 1),
Vec3L(2, 1, 0)
}
const double esys::lsm::ClosePackIterator::SQRT_1_OVER_3 = 1.0/sqrt(3.0)
static
const double esys::lsm::ClosePackIterator::SQRT_3 = sqrt(3.0)
static

Referenced by next().

const double esys::lsm::ClosePackIterator::SQRT_8_OVER_3 = sqrt(8.0/3.0)
static

Referenced by next().


The documentation for this class was generated from the following files: