ESyS-Particle  2.3.4
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

◆ OffsetMatrix

Constructor & Destructor Documentation

◆ ClosePackIterator() [1/2]

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

Creates default empty iterator.

◆ ClosePackIterator() [2/2]

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

◆ getMinPt()

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

References m_minPt.

Referenced by next().

Here is the caller graph for this function:

◆ getOffset()

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:

◆ getRadius()

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:

◆ hasNext()

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

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

References m_dimCount, and m_dimIdx.

◆ incrementDimIndex()

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

References m_dimCount, and m_dimIdx.

Referenced by next().

Here is the caller graph for this function:

◆ next()

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:

◆ setDimRepeat()

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:

◆ setMinPt()

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

◆ setOffsetMatrix()

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

◆ m_dim

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

Referenced by next().

◆ m_dimCount

Vec3L esys::lsm::ClosePackIterator::m_dimCount
private

◆ m_dimIdx

Vec3L esys::lsm::ClosePackIterator::m_dimIdx
private

◆ m_dimRepeat

Vec3L esys::lsm::ClosePackIterator::m_dimRepeat
private

Referenced by getOffset(), and setDimRepeat().

◆ m_minPt

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

Referenced by getMinPt().

◆ m_offsetMatrix

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

Referenced by getOffset(), and setOffsetMatrix().

◆ m_radius

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

Referenced by getRadius(), and next().

◆ s_orientationDimMap

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)
}

◆ SQRT_1_OVER_3

const double esys::lsm::ClosePackIterator::SQRT_1_OVER_3 = 1.0/sqrt(3.0)
static

◆ SQRT_3

const double esys::lsm::ClosePackIterator::SQRT_3 = sqrt(3.0)
static

Referenced by next().

◆ SQRT_8_OVER_3

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: