walberla::grid_generator::SCIterator Class Reference

Detailed Description

Helper class to generate points in a simple cubic structure within a certain domain.

The lattice is fixed by a point of reference (x).

. . . . . . . .
+-----+
. . . .|. . .|.
| |
. . . .|. . .|.
+-----+
. . . . . . . .
. x . . . . . .
. . . . . . . .

Usage:

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

#include <SCIterator.h>

+ Inheritance diagram for walberla::grid_generator::SCIterator:

Public Member Functions

 SCIterator (const AABB &domain, const Vector3< real_t > &pointOfReference, const real_t &spacing)
 begin iterator More...
 
 SCIterator (const AABB &domain, const Vector3< real_t > &pointOfReference, const Vector3< real_t > &spacing)
 begin iterator More...
 
 SCIterator ()
 end iterator More...
 
SCIteratoroperator++ ()
 
SCIterator operator++ (int)
 
Vector3< real_toperator* () const
 
bool operator== (const SCIterator &rhs) const
 
bool operator!= (const SCIterator &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)
 
static real_t getUnitCellX (const Vector3< real_t > &spacing)
 
static real_t getUnitCellY (const Vector3< real_t > &spacing)
 
static real_t getUnitCellZ (const Vector3< real_t > &spacing)
 

Private Member Functions

void updatePoint ()
 

Private Attributes

int i_
 
int iReturn_
 
int j_
 
int jReturn_
 
int k_
 
AABB aabb_
 
Vector3< real_tpointOfReference_
 
Vector3< real_tspacing_
 
Vector3< real_tpoint_
 
bool ended_
 

Constructor & Destructor Documentation

walberla::grid_generator::SCIterator::SCIterator ( 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, y and z direction
walberla::grid_generator::SCIterator::SCIterator ( const AABB &  domain,
const Vector3< real_t > &  pointOfReference,
const Vector3< 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, y and z direction
walberla::grid_generator::SCIterator::SCIterator ( )

end iterator

Member Function Documentation

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

Member Data Documentation

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

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