OpenLB 1.7
|
Implementation of the Cell concept for vectorized collision operators. More...
#include <operator.h>
Public Types | |
using | value_t = V |
using | descriptor_t = DESCRIPTOR |
Public Member Functions | |
Cell (ConcreteBlockLattice< T, DESCRIPTOR, Platform::CPU_SIMD > &lattice, std::size_t iCell, Mask< T > &mask) | |
Load r/w fields into SIMD packs. | |
~Cell () | |
Store modified r/w fields back into lattice taking into account the mask. | |
V & | operator[] (unsigned iPop) |
Return reference to iPop population pack. | |
template<typename FIELD > | |
auto | getField () const |
Return pack-valued copy of FIELD. | |
template<typename FIELD > | |
void | setField (FieldD< V, DESCRIPTOR, FIELD > &&value) |
Set compoents of FIELD from pack-valued vector. | |
template<typename FIELD > | |
std::enable_if_t< rw_fields::template contains< FIELD >(), FieldD< V, DESCRIPTOR, FIELD > & > | getFieldPointer () |
Return reference to pack-valued interim storage vector of r/w field. | |
template<typename FIELD > | |
std::enable_if_t<!rw_fields::template contains< FIELD >(), FieldD< V, DESCRIPTOR, FIELD > > | getFieldPointer () |
Return pack-valued copy of non r/w field. | |
template<typename FIELD > | |
std::enable_if_t< rw_fields::template contains< FIELD >(), V & > | getFieldComponent (unsigned iD) |
Return reference to pack-valued interim storage component of r/w field. | |
template<typename FIELD > | |
std::enable_if_t<!rw_fields::template contains< FIELD >(), V > | getFieldComponent (unsigned iD) |
Return pack-valued copy of non r/w field component. | |
Implementation of the Cell concept for vectorized collision operators.
Any fields that are potentially changed by a specific collision operator must be declared as RW_FIELDS to mask any writeback operations.
Read-only fields require no special consideration.
Definition at line 109 of file operator.h.
using olb::cpu::simd::Cell< T, DESCRIPTOR, V, RW_FIELDS >::descriptor_t = DESCRIPTOR |
Definition at line 125 of file operator.h.
using olb::cpu::simd::Cell< T, DESCRIPTOR, V, RW_FIELDS >::value_t = V |
Definition at line 124 of file operator.h.
|
inline |
Load r/w fields into SIMD packs.
Definition at line 128 of file operator.h.
References olb::meta::list< TYPES >::for_each().
|
inline |
Store modified r/w fields back into lattice taking into account the mask.
Definition at line 145 of file operator.h.
References olb::meta::list< TYPES >::for_each(), and olb::cpu::simd::maskstore().
|
inline |
Return pack-valued copy of FIELD.
Definition at line 165 of file operator.h.
|
inline |
Return reference to pack-valued interim storage component of r/w field.
Definition at line 215 of file operator.h.
|
inline |
Return pack-valued copy of non r/w field component.
Definition at line 222 of file operator.h.
|
inline |
Return reference to pack-valued interim storage vector of r/w field.
Definition at line 201 of file operator.h.
|
inline |
Return pack-valued copy of non r/w field.
Definition at line 208 of file operator.h.
|
inline |
Return reference to iPop population pack.
Definition at line 159 of file operator.h.
|
inline |
Set compoents of FIELD from pack-valued vector.
Definition at line 187 of file operator.h.
References olb::cpu::simd::maskstore().