OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM > Class Template Reference

#include <cell.h>

+ Collaboration diagram for olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >:

Public Types

using value_t = T
 
using descriptor_t = DESCRIPTOR
 

Public Member Functions

 PlainCell ()
 
 PlainCell (ConcreteBlockD< T, DESCRIPTOR, PLATFORM > &lattice, std::size_t iCell=0)
 
CellID getCellId () const
 
void setCellId (CellID iCell)
 
T & operator[] (unsigned iPop)
 
template<typename FIELD >
auto getField () const
 
template<typename FIELD >
void setField (const FieldD< T, DESCRIPTOR, FIELD > &v)
 
template<typename FIELD >
auto getFieldPointer ()
 
template<typename FIELD >
auto & getFieldComponent (unsigned iD)
 
Cell< T, DESCRIPTOR, PLATFORM > neighbor (LatticeR< DESCRIPTOR::d > offset)
 

Detailed Description

template<typename T, typename DESCRIPTOR, Platform PLATFORM>
class olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >

Definition at line 258 of file cell.h.

Member Typedef Documentation

◆ descriptor_t

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
using olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::descriptor_t = DESCRIPTOR

Definition at line 265 of file cell.h.

◆ value_t

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
using olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::value_t = T

Definition at line 264 of file cell.h.

Constructor & Destructor Documentation

◆ PlainCell() [1/2]

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::PlainCell ( )
inline

Definition at line 267 of file cell.h.

267 :
268 _lattice(nullptr),
269 _iCell(0) { }

◆ PlainCell() [2/2]

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::PlainCell ( ConcreteBlockD< T, DESCRIPTOR, PLATFORM > & lattice,
std::size_t iCell = 0 )
inline

Definition at line 271 of file cell.h.

271 :
272 _lattice(&lattice),
273 _iCell(iCell) { }

Member Function Documentation

◆ getCellId()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
CellID olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getCellId ( ) const
inline

Definition at line 275 of file cell.h.

275 {
276 return _iCell;
277 }

◆ getField()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
template<typename FIELD >
auto olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getField ( ) const
inline

Definition at line 288 of file cell.h.

288 {
289 return _lattice->template getField<FIELD>().getRow(_iCell);
290 }
auto getField() const
Definition cell.h:288

References olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getField().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFieldComponent()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
template<typename FIELD >
auto & olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getFieldComponent ( unsigned iD)
inline

Definition at line 303 of file cell.h.

303 {
304 return _lattice->template getField<FIELD>()[iD][_iCell];
305 }

References olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getField().

+ Here is the call graph for this function:

◆ getFieldPointer()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
template<typename FIELD >
auto olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getFieldPointer ( )
inline

Definition at line 298 of file cell.h.

298 {
299 return _lattice->template getField<FIELD>().getRowPointer(_iCell);
300 }

References olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getField().

+ Here is the call graph for this function:

◆ neighbor()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
Cell< T, DESCRIPTOR, PLATFORM > olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::neighbor ( LatticeR< DESCRIPTOR::d > offset)
inline

Definition at line 307 of file cell.h.

307 {
308 return {*_lattice, _iCell + _lattice->getNeighborDistance(offset)};
309 }

References olb::BlockStructureD< D >::getNeighborDistance().

+ Here is the call graph for this function:

◆ operator[]()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
T & olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::operator[] ( unsigned iPop)
inline

Definition at line 283 of file cell.h.

283 {
284 return _lattice->template getField<descriptors::POPULATION>()[iPop][_iCell];
285 }

References olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getField().

+ Here is the call graph for this function:

◆ setCellId()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
void olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::setCellId ( CellID iCell)
inline

Definition at line 279 of file cell.h.

279 {
280 _iCell = iCell;
281 }

◆ setField()

template<typename T , typename DESCRIPTOR , Platform PLATFORM>
template<typename FIELD >
void olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::setField ( const FieldD< T, DESCRIPTOR, FIELD > & v)
inline

Definition at line 293 of file cell.h.

293 {
294 return _lattice->template getField<FIELD>().setRow(_iCell, v);
295 }

References olb::cpu::PlainCell< T, DESCRIPTOR, PLATFORM >::getField().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: