walberla::grid_generator::HCPIterator Class Reference

Detailed Description

Helper class to generate points in a hexagonal close packing structure within a certain domain.

Usage:

for (auto it = HCPIterator::begin(...); it != HCPIterator::end(); ++it)

#include <HCPIterator.h>

+ Inheritance diagram for walberla::grid_generator::HCPIterator:

Public Member Functions

 HCPIterator (const AABB &domain, const Vector3< real_t > &pointOfReference, const real_t spacing)
 begin iterator More...
 
 HCPIterator ()
 end iterator More...
 
HCPIteratoroperator++ ()
 
HCPIterator operator++ (int)
 
Vector3< real_toperator* () const
 
bool operator== (const HCPIterator &rhs) const
 
bool operator!= (const HCPIterator &rhs) const
 

Static Public Member Functions

static real_t getUnitCellX (const real_t spacing)
 
static real_t getUnitCellY (const real_t spacing)
 
static real_t getUnitCellZ (const real_t spacing)
 

Private Member Functions

void updatePoint ()
 

Private Attributes

unsigned int i_
 
unsigned int iReturn_
 
unsigned int j_
 
unsigned int jReturn_
 
unsigned int k_
 
AABB aabb_
 
Vector3< real_tpointOfReference_
 
real_t radius_
 
Vector3< real_tpoint_
 
bool ended_
 

Constructor & Destructor Documentation

walberla::grid_generator::HCPIterator::HCPIterator ( const AABB &  domain,
const Vector3< real_t > &  pointOfReference,
const real_t  spacing 
)

begin iterator

Parameters
domainvolume were lattice points will be returned
pointOfReferencepoint somewhere in the world which fixes the lattice
spacingspacing between grid points in x direction
walberla::grid_generator::HCPIterator::HCPIterator ( )

end iterator

Member Function Documentation

static real_t walberla::grid_generator::HCPIterator::getUnitCellX ( const real_t  spacing)
inlinestatic
static real_t walberla::grid_generator::HCPIterator::getUnitCellY ( const real_t  spacing)
inlinestatic
static real_t walberla::grid_generator::HCPIterator::getUnitCellZ ( const real_t  spacing)
inlinestatic
bool walberla::grid_generator::HCPIterator::operator!= ( const HCPIterator rhs) const
Vector3< real_t > walberla::grid_generator::HCPIterator::operator* ( ) const
HCPIterator & walberla::grid_generator::HCPIterator::operator++ ( )
HCPIterator walberla::grid_generator::HCPIterator::operator++ ( int  )
bool walberla::grid_generator::HCPIterator::operator== ( const HCPIterator rhs) const
void walberla::grid_generator::HCPIterator::updatePoint ( )
private

Member Data Documentation

AABB walberla::grid_generator::HCPIterator::aabb_
private
bool walberla::grid_generator::HCPIterator::ended_
private
unsigned int walberla::grid_generator::HCPIterator::i_
private
unsigned int walberla::grid_generator::HCPIterator::iReturn_
private
unsigned int walberla::grid_generator::HCPIterator::j_
private
unsigned int walberla::grid_generator::HCPIterator::jReturn_
private
unsigned int walberla::grid_generator::HCPIterator::k_
private
Vector3<real_t> walberla::grid_generator::HCPIterator::point_
private
Vector3<real_t> walberla::grid_generator::HCPIterator::pointOfReference_
private
real_t walberla::grid_generator::HCPIterator::radius_
private

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