OpenLB 1.7
|
Highest-level interface to read-only Cell data. More...
#include <cell.h>
Public Types | |
using | value_t = T |
using | descriptor_t = DESCRIPTOR |
Public Member Functions | |
ConstCell (const BlockLattice< T, DESCRIPTOR > &block, std::size_t iCell) | |
std::size_t | getCellId () const |
Return memory ID of the currently represented cell. | |
void | setCellId (std::size_t iCell) |
Jump to arbitrary cell memory ID. | |
bool | operator== (ConstCell< T, DESCRIPTOR > &rhs) const |
bool | operator!= (ConstCell< T, DESCRIPTOR > &rhs) const |
bool | operator< (ConstCell< T, DESCRIPTOR > &rhs) const |
bool | operator<= (ConstCell< T, DESCRIPTOR > &rhs) const |
ConstCell< T, DESCRIPTOR > | neighbor (Vector< int, DESCRIPTOR::d > c) const |
T | operator[] (unsigned iPop) const |
Read-only access to distribution functions. | |
template<typename FIELD > | |
auto | getFieldPointer (FIELD field=FIELD()) const |
Return read-only field accessor. | |
template<typename FIELD > | |
auto | getFieldComponent (unsigned iD) const |
Return copy of field component. | |
template<typename FIELD > | |
auto | getField (FIELD field=FIELD()) const |
Return copy of descriptor-declared FIELD as a vector. | |
const Dynamics< T, DESCRIPTOR > * | getDynamics () const |
Get a pointer to the dynamics. | |
template<typename FIELD > | |
void | computeField (T *data) const |
Copy FIELD content to given memory location. | |
T | computeRho () const |
Compute particle density on the cell. | |
void | computeU (T u[descriptors::d< DESCRIPTOR >()]) const |
Compute fluid velocity on the cell. | |
void | computeJ (T j[descriptors::d< DESCRIPTOR >()]) const |
Compute fluid momentum (j = rho * u) on the cell. | |
void | computeStress (T pi[util::TensorVal< DESCRIPTOR >::n]) const |
Compute components of the stress tensor on the cell. | |
void | computeRhoU (T &rho, T u[descriptors::d< DESCRIPTOR >()]) const |
Compute fluid velocity and particle density on the cell. | |
void | computeFeq (T fEq[descriptors::q< DESCRIPTOR >()]) const |
Compute equilibrium part of cell distribution. | |
void | computeFneq (T fNeq[descriptors::q< DESCRIPTOR >()]) const |
Compute non-equilibrium part of cell distribution. | |
void | computeAllMomenta (T &rho, T u[descriptors::d< DESCRIPTOR >()], T pi[util::TensorVal< DESCRIPTOR >::n]) const |
Compute all momenta on the celll, up to second order. | |
Protected Attributes | |
friend | Cell< T, DESCRIPTOR > |
std::size_t | _iCell |
Memory ID of currently represented cell. | |
BlockLattice< T, DESCRIPTOR > & | _block |
Underlying BlockLattice. | |
Vector< T *, DESCRIPTOR::q > | _populations |
Pointers to population values of current cell. | |
Highest-level interface to read-only Cell data.
Only use where access to the specific ConcreteBlockLattice resp. Dynamics information is not (yet) possible.
using olb::ConstCell< T, DESCRIPTOR >::descriptor_t = DESCRIPTOR |
using olb::ConstCell< T, DESCRIPTOR >::value_t = T |
olb::ConstCell< T, DESCRIPTOR >::ConstCell | ( | const BlockLattice< T, DESCRIPTOR > & | block, |
std::size_t | iCell ) |
void olb::ConstCell< T, DESCRIPTOR >::computeAllMomenta | ( | T & | rho, |
T | u[descriptors::d< DESCRIPTOR >()], | ||
T | pi[util::TensorVal< DESCRIPTOR >::n] ) const |
Compute all momenta on the celll, up to second order.
Definition at line 259 of file cell.hh.
void olb::ConstCell< T, DESCRIPTOR >::computeFeq | ( | T | fEq[descriptors::q< DESCRIPTOR >()] | ) | const |
Compute equilibrium part of cell distribution.
Definition at line 238 of file cell.hh.
References olb::norm_squared().
void olb::ConstCell< T, DESCRIPTOR >::computeField | ( | T * | data | ) | const |
Copy FIELD content to given memory location.
Definition at line 181 of file cell.hh.
void olb::ConstCell< T, DESCRIPTOR >::computeFneq | ( | T | fNeq[descriptors::q< DESCRIPTOR >()] | ) | const |
Compute non-equilibrium part of cell distribution.
Definition at line 250 of file cell.hh.
References olb::lbm< DESCRIPTOR >::computeFneq().
void olb::ConstCell< T, DESCRIPTOR >::computeJ | ( | T | j[descriptors::d< DESCRIPTOR >()] | ) | const |
Compute fluid momentum (j = rho * u) on the cell.
T olb::ConstCell< T, DESCRIPTOR >::computeRho | ( | ) | const |
void olb::ConstCell< T, DESCRIPTOR >::computeRhoU | ( | T & | rho, |
T | u[descriptors::d< DESCRIPTOR >()] ) const |
void olb::ConstCell< T, DESCRIPTOR >::computeStress | ( | T | pi[util::TensorVal< DESCRIPTOR >::n] | ) | const |
Compute components of the stress tensor on the cell.
Definition at line 224 of file cell.hh.
void olb::ConstCell< T, DESCRIPTOR >::computeU | ( | T | u[descriptors::d< DESCRIPTOR >()] | ) | const |
std::size_t olb::ConstCell< T, DESCRIPTOR >::getCellId | ( | ) | const |
const Dynamics< T, DESCRIPTOR > * olb::ConstCell< T, DESCRIPTOR >::getDynamics | ( | ) | const |
auto olb::ConstCell< T, DESCRIPTOR >::getField | ( | FIELD | field = FIELD() | ) | const |
auto olb::ConstCell< T, DESCRIPTOR >::getFieldComponent | ( | unsigned | iD | ) | const |
auto olb::ConstCell< T, DESCRIPTOR >::getFieldPointer | ( | FIELD | field = FIELD() | ) | const |
ConstCell< T, DESCRIPTOR > olb::ConstCell< T, DESCRIPTOR >::neighbor | ( | Vector< int, DESCRIPTOR::d > | c | ) | const |
bool olb::ConstCell< T, DESCRIPTOR >::operator!= | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
Definition at line 120 of file cell.hh.
bool olb::ConstCell< T, DESCRIPTOR >::operator< | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
bool olb::ConstCell< T, DESCRIPTOR >::operator<= | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
bool olb::ConstCell< T, DESCRIPTOR >::operator== | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
T olb::ConstCell< T, DESCRIPTOR >::operator[] | ( | unsigned | iPop | ) | const |
Read-only access to distribution functions.
iPop | index of the accessed distribution function |
|
inline |
Jump to arbitrary cell memory ID.
Caller is responsible that this is valid.
Definition at line 90 of file cell.h.
References olb::ConstCell< T, DESCRIPTOR >::_block, olb::ConstCell< T, DESCRIPTOR >::_iCell, and olb::ConstCell< T, DESCRIPTOR >::_populations.
|
protected |
Underlying BlockLattice.
|
protected |
|
protected |
Pointers to population values of current cell.
Workaround to increase performance of post-processors, post-processing functors until they are ported to work on concrete lattices again (as is already the case for dynamics)
Validity of neighborhood accesses via these pointers not guaranteed (e.g. consider CPU_SIMD vs. CPU_SISD)
|
protected |