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>

Public Types

using iterator_category = std::forward_iterator_tag
 
using value_type = Vector3< real_t >
 
using difference_type = std::ptrdiff_t
 
using pointer = Vector3< real_t > *
 
using reference = Vector3< real_t > &
 

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_
 

Member Typedef Documentation

◆ difference_type

◆ iterator_category

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ SCIterator() [1/3]

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

◆ SCIterator() [2/3]

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

◆ SCIterator() [3/3]

walberla::grid_generator::SCIterator::SCIterator ( )

end iterator

Member Function Documentation

◆ getUnitCellX() [1/2]

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

◆ getUnitCellX() [2/2]

static real_t walberla::grid_generator::SCIterator::getUnitCellX ( const Vector3< real_t > &  spacing)
inlinestatic

◆ getUnitCellY() [1/2]

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

◆ getUnitCellY() [2/2]

static real_t walberla::grid_generator::SCIterator::getUnitCellY ( const Vector3< real_t > &  spacing)
inlinestatic

◆ getUnitCellZ() [1/2]

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

◆ getUnitCellZ() [2/2]

static real_t walberla::grid_generator::SCIterator::getUnitCellZ ( const Vector3< real_t > &  spacing)
inlinestatic

◆ operator!=()

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

◆ operator*()

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

◆ operator++() [1/2]

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

◆ operator++() [2/2]

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

◆ operator==()

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

◆ updatePoint()

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

Member Data Documentation

◆ aabb_

AABB walberla::grid_generator::SCIterator::aabb_
private

◆ ended_

bool walberla::grid_generator::SCIterator::ended_
private

◆ i_

int walberla::grid_generator::SCIterator::i_
private

◆ iReturn_

int walberla::grid_generator::SCIterator::iReturn_
private

◆ j_

int walberla::grid_generator::SCIterator::j_
private

◆ jReturn_

int walberla::grid_generator::SCIterator::jReturn_
private

◆ k_

int walberla::grid_generator::SCIterator::k_
private

◆ point_

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

◆ pointOfReference_

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

◆ spacing_

Vector3<real_t> walberla::grid_generator::SCIterator::spacing_
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