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

◆ HCPIterator() [1/2]

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

◆ HCPIterator() [2/2]

walberla::grid_generator::HCPIterator::HCPIterator ( )

end iterator

Member Function Documentation

◆ getUnitCellX()

static real_t walberla::grid_generator::HCPIterator::getUnitCellX ( const real_t  spacing)
inlinestatic

◆ getUnitCellY()

static real_t walberla::grid_generator::HCPIterator::getUnitCellY ( const real_t  spacing)
inlinestatic

◆ getUnitCellZ()

static real_t walberla::grid_generator::HCPIterator::getUnitCellZ ( const real_t  spacing)
inlinestatic

◆ operator!=()

bool walberla::grid_generator::HCPIterator::operator!= ( const HCPIterator rhs) const

◆ operator*()

Vector3< real_t > walberla::grid_generator::HCPIterator::operator* ( ) const

◆ operator++() [1/2]

HCPIterator & walberla::grid_generator::HCPIterator::operator++ ( )

◆ operator++() [2/2]

HCPIterator walberla::grid_generator::HCPIterator::operator++ ( int  )

◆ operator==()

bool walberla::grid_generator::HCPIterator::operator== ( const HCPIterator rhs) const

◆ updatePoint()

void walberla::grid_generator::HCPIterator::updatePoint ( )
private

Member Data Documentation

◆ aabb_

AABB walberla::grid_generator::HCPIterator::aabb_
private

◆ ended_

bool walberla::grid_generator::HCPIterator::ended_
private

◆ i_

unsigned int walberla::grid_generator::HCPIterator::i_
private

◆ iReturn_

unsigned int walberla::grid_generator::HCPIterator::iReturn_
private

◆ j_

unsigned int walberla::grid_generator::HCPIterator::j_
private

◆ jReturn_

unsigned int walberla::grid_generator::HCPIterator::jReturn_
private

◆ k_

unsigned int walberla::grid_generator::HCPIterator::k_
private

◆ point_

Vector3<real_t> walberla::grid_generator::HCPIterator::point_
private

◆ pointOfReference_

Vector3<real_t> walberla::grid_generator::HCPIterator::pointOfReference_
private

◆ radius_

real_t walberla::grid_generator::HCPIterator::radius_
private

The documentation for this class was generated from the following files:
Iterator end()
Definition: Create.h:71
Iterator begin(int argc, char **argv)
Loads multiple numbered configuration files.
Definition: Create.cpp:238