![]() |
OpenLB 1.8.1
|
Highest-level interface to read-only Cell data. More...
#include <cell.h>
Inheritance diagram for olb::ConstCell< T, DESCRIPTOR >:
Collaboration diagram for olb::ConstCell< T, DESCRIPTOR >: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. | |
| const Dynamics< T, DESCRIPTOR > * | getDynamics () const |
| bool | isPadding () const |
| 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. | |
| 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.
Definition at line 36 of file interface.h.
| 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 ) |
Definition at line 43 of file cell.hh.
| 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 249 of file cell.hh.
Here is the caller graph for this function:| void olb::ConstCell< T, DESCRIPTOR >::computeFeq | ( | T | fEq[descriptors::q< DESCRIPTOR >()] | ) | const |
Compute equilibrium part of cell distribution.
Definition at line 228 of file cell.hh.
References olb::norm_squared(), and olb::Vector().
Here is the call graph for this function:| void olb::ConstCell< T, DESCRIPTOR >::computeField | ( | T * | data | ) | const |
Copy FIELD content to given memory location.
Definition at line 187 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 240 of file cell.hh.
References olb::lbm< DESCRIPTOR >::computeFneq(), and olb::descriptors::d().
Here is the call graph for this function:| 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 |
Compute particle density on the cell.
| 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 214 of file cell.hh.
References olb::descriptors::d().
Here is the call graph for this function:| void olb::ConstCell< T, DESCRIPTOR >::computeU | ( | T | u[descriptors::d< DESCRIPTOR >()] | ) | const |
Compute fluid velocity on the cell.
| 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 |
Return copy of descriptor-declared FIELD as a vector.
Definition at line 145 of file cell.hh.
| auto olb::ConstCell< T, DESCRIPTOR >::getFieldComponent | ( | unsigned | iD | ) | const |
| auto olb::ConstCell< T, DESCRIPTOR >::getFieldPointer | ( | FIELD | field = FIELD() | ) | const |
|
inline |
Definition at line 99 of file cell.h.
References olb::ConstCell< T, DESCRIPTOR >::_block, olb::ConstCell< T, DESCRIPTOR >::_iCell, and olb::BlockStructureD< D >::isPadding().
Here is the call graph for this function:| ConstCell< T, DESCRIPTOR > olb::ConstCell< T, DESCRIPTOR >::neighbor | ( | Vector< int, DESCRIPTOR::d > | c | ) | const |
Definition at line 90 of file cell.hh.
| bool olb::ConstCell< T, DESCRIPTOR >::operator!= | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
Definition at line 126 of file cell.hh.
References olb::ConstCell< T, DESCRIPTOR >::getCellId().
Here is the call graph for this function:| bool olb::ConstCell< T, DESCRIPTOR >::operator< | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
Definition at line 132 of file cell.hh.
References olb::ConstCell< T, DESCRIPTOR >::getCellId().
Here is the call graph for this function:| bool olb::ConstCell< T, DESCRIPTOR >::operator<= | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
Definition at line 138 of file cell.hh.
References olb::ConstCell< T, DESCRIPTOR >::getCellId().
Here is the call graph for this function:| bool olb::ConstCell< T, DESCRIPTOR >::operator== | ( | ConstCell< T, DESCRIPTOR > & | rhs | ) | const |
Definition at line 120 of file cell.hh.
References olb::ConstCell< T, DESCRIPTOR >::getCellId().
Here is the call graph for this function:| 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 91 of file cell.h.
References olb::ConstCell< T, DESCRIPTOR >::_block, olb::ConstCell< T, DESCRIPTOR >::_iCell, olb::ConstCell< T, DESCRIPTOR >::_populations, and olb::BlockLattice< T, DESCRIPTOR >::getPopulationPointers().
Here is the call graph for this function:
|
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 |