walberla::lbm_generated::util Namespace Reference

Functions

void forEachSubdirection (const Vector3< cell_idx_t > mainDirection, const std::function< void(Vector3< cell_idx_t >) > &func)
 Iterates all sub-directions of a given direction vector and runs a callback on each of them. More...
 
bool forEachSubdirectionCancel (const Vector3< cell_idx_t > mainDirection, const std::function< bool(Vector3< cell_idx_t >) > &func)
 Iterates all sub-directions of a given direction vector and runs a callback on each of them. More...
 
void getSubdirections (const Vector3< cell_idx_t > mainDirection, std::vector< Vector3< cell_idx_t > > subdirs)
 
template<typename Stencil_T >
void forEachOrthogonalDirection (Vector3< cell_idx_t > d, std::function< void(Vector3< cell_idx_t >) > func)
 Iterates all directions orthogonal to d that are part of the given stencil, and executes a function on each of them. More...
 

Function Documentation

◆ forEachOrthogonalDirection()

template<typename Stencil_T >
void walberla::lbm_generated::util::forEachOrthogonalDirection ( Vector3< cell_idx_t d,
std::function< void(Vector3< cell_idx_t >) >  func 
)
inline

Iterates all directions orthogonal to d that are part of the given stencil, and executes a function on each of them.

Template Parameters
Stencil_TThe underlying stencil
Parameters
d
func

◆ forEachSubdirection()

void walberla::lbm_generated::util::forEachSubdirection ( const Vector3< cell_idx_t mainDirection,
const std::function< void(Vector3< cell_idx_t >) > &  func 
)
inline

Iterates all sub-directions of a given direction vector and runs a callback on each of them.

Subdirections are any nonzero directions obtained by truncating zero or more components of a direction vector to zero. The direction vector itself is contained in this set.

Parameters
mainDirectionThe direction whose subdirections will be iterated
funcThe callback that should be run for each subdirection

◆ forEachSubdirectionCancel()

bool walberla::lbm_generated::util::forEachSubdirectionCancel ( const Vector3< cell_idx_t mainDirection,
const std::function< bool(Vector3< cell_idx_t >) > &  func 
)
inline

Iterates all sub-directions of a given direction vector and runs a callback on each of them.

Subdirections are any nonzero directions obtained by truncating zero or more components of a direction vector to zero. The direction vector itself is contained in this set.

Parameters
mainDirectionThe direction whose subdirections will be iterated
funcThe callback that should be run for each subdirection. If the callback returns false, the iteration will be stopped.
Returns
true if the iteration completed, false if it was canceled

◆ getSubdirections()

void walberla::lbm_generated::util::getSubdirections ( const Vector3< cell_idx_t mainDirection,
std::vector< Vector3< cell_idx_t > >  subdirs 
)
inline