OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
olb::gpu::cuda::Cell< T, DESCRIPTOR > Class Template Reference

Device-side implementation of the Cell concept for post processors. More...

#include <context.hh>

+ Inheritance diagram for olb::gpu::cuda::Cell< T, DESCRIPTOR >:
+ Collaboration diagram for olb::gpu::cuda::Cell< T, DESCRIPTOR >:

Public Member Functions

 Cell (DeviceBlockLattice< T, DESCRIPTOR > &data, CellID iCell) __device__
 
Cell< T, DESCRIPTOR > neighbor (LatticeR< DESCRIPTOR::d > offset) __device__
 
Dynamics< T, DESCRIPTOR > & getDynamics () __device__
 
computeRho () __device__
 
void computeU (T *u) __device__
 
void computeJ (T *j) __device__
 
void computeRhoU (T &rho, T *u) __device__
 
void computeStress (T *pi) __device__
 
void computeAllMomenta (T &rho, T *u, T *pi) __device__
 
void defineRho (T &rho) __device__
 
void defineU (T *u) __device__
 
void defineRhoU (T &rho, T *u) __device__
 
void defineAllMomenta (T &rho, T *u, T *pi) __device__
 
void definePopulations (const T *f) __device__
 
void iniEquilibrium (T rho, T *u) __device__
 
void iniRegularized (T rho, T *u, T *pi) __device__
 
void inverseShiftRhoU (T &rho, T *u) __device__
 
- Public Member Functions inherited from olb::gpu::cuda::DataOnlyCell< T, DESCRIPTOR >
 DataOnlyCell (DeviceContext< T, DESCRIPTOR > &data, CellID iCell) __device__
 
template<typename FIELD >
FIELD::template value_type< T > getFieldComponent (unsigned iD) __device__
 
value_toperator[] (int iPop) __device__
 
template<typename FIELD >
auto getField () const __device__
 
template<typename FIELD >
FieldPtr< T, DESCRIPTOR, FIELD > getFieldPointer () __device__
 
template<typename FIELD >
void setField (FieldD< value_t, descriptor_t, FIELD > &&value) __device__
 
template<typename FIELD >
void setField (const FieldD< value_t, descriptor_t, FIELD > &value) __device__
 

Protected Member Functions

DeviceBlockLattice< T, DESCRIPTOR > & getBlock () __device__
 

Additional Inherited Members

- Public Types inherited from olb::gpu::cuda::DataOnlyCell< T, DESCRIPTOR >
using value_t = T
 
using descriptor_t = DESCRIPTOR
 
- Protected Attributes inherited from olb::gpu::cuda::DataOnlyCell< T, DESCRIPTOR >
DeviceContext< T, DESCRIPTOR > & _data
 
CellID _iCell
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::gpu::cuda::Cell< T, DESCRIPTOR >

Device-side implementation of the Cell concept for post processors.

Adds neighborhood and dynamically-dispatched momenta access to DataOnlyCell

Definition at line 248 of file context.hh.

Constructor & Destructor Documentation

◆ Cell()

template<typename T , typename DESCRIPTOR >
olb::gpu::cuda::Cell< T, DESCRIPTOR >::Cell ( DeviceBlockLattice< T, DESCRIPTOR > & data,
CellID iCell )
inline

Definition at line 255 of file context.hh.

255 :
256 DataOnlyCell<T,DESCRIPTOR>(data, iCell)
257 { }

Member Function Documentation

◆ computeAllMomenta()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::computeAllMomenta ( T & rho,
T * u,
T * pi )
inline

Definition at line 284 of file context.hh.

284 {
285 getDynamics().computeAllMomenta(*this, rho, u, pi);
286 }
Dynamics< T, DESCRIPTOR > & getDynamics() __device__
Definition context.hh:263

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ computeJ()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::computeJ ( T * j)
inline

Definition at line 273 of file context.hh.

273 {
274 getDynamics().computeJ(*this, j);
275 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ computeRho()

template<typename T , typename DESCRIPTOR >
T olb::gpu::cuda::Cell< T, DESCRIPTOR >::computeRho ( )
inline

Definition at line 267 of file context.hh.

267 {
268 return getDynamics().computeRho(*this);
269 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ computeRhoU()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::computeRhoU ( T & rho,
T * u )
inline

Definition at line 276 of file context.hh.

276 {
277 getDynamics().computeRhoU(*this, rho, u);
278 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ computeStress()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::computeStress ( T * pi)
inline

Definition at line 279 of file context.hh.

279 {
280 T rho, u[DESCRIPTOR::d] { };
281 getDynamics().computeRhoU(*this, rho, u);
282 getDynamics().computeStress(*this, rho, u, pi);
283 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ computeU()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::computeU ( T * u)
inline

Definition at line 270 of file context.hh.

270 {
271 getDynamics().computeU(*this, u);
272 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ defineAllMomenta()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::defineAllMomenta ( T & rho,
T * u,
T * pi )
inline

Definition at line 297 of file context.hh.

297 {
298 return getDynamics().defineAllMomenta(*this, rho, u, pi);
299 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ definePopulations()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::definePopulations ( const T * f)
inline

Definition at line 300 of file context.hh.

300 {
301 for (int iPop=0; iPop < descriptors::q<DESCRIPTOR>(); ++iPop) {
302 this->operator[](iPop) = f[iPop];
303 }
304 }
value_t & operator[](int iPop) __device__
Definition context.hh:159

References olb::gpu::cuda::DataOnlyCell< T, DESCRIPTOR >::operator[]().

+ Here is the call graph for this function:

◆ defineRho()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::defineRho ( T & rho)
inline

Definition at line 288 of file context.hh.

288 {
289 return getDynamics().defineRho(*this, rho);
290 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ defineRhoU()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::defineRhoU ( T & rho,
T * u )
inline

Definition at line 294 of file context.hh.

294 {
295 return getDynamics().defineRhoU(*this, rho, u);
296 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ defineU()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::defineU ( T * u)
inline

Definition at line 291 of file context.hh.

291 {
292 return getDynamics().defineU(*this, u);
293 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ getBlock()

template<typename T , typename DESCRIPTOR >
DeviceBlockLattice< T, DESCRIPTOR > & olb::gpu::cuda::Cell< T, DESCRIPTOR >::getBlock ( )
inlineprotected

Definition at line 250 of file context.hh.

250 {
251 return static_cast<DeviceBlockLattice<T,DESCRIPTOR>&>(this->_data);
252 }
DeviceContext< T, DESCRIPTOR > & _data
Definition context.hh:142

References olb::gpu::cuda::DataOnlyCell< T, DESCRIPTOR >::_data.

+ Here is the caller graph for this function:

◆ getDynamics()

template<typename T , typename DESCRIPTOR >
Dynamics< T, DESCRIPTOR > & olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics ( )
inline

Definition at line 263 of file context.hh.

263 {
264 return *this->template getField<DYNAMICS<T,DESCRIPTOR>>();
265 }
+ Here is the caller graph for this function:

◆ iniEquilibrium()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::iniEquilibrium ( T rho,
T * u )
inline

Definition at line 306 of file context.hh.

306 {
307 getDynamics().iniEquilibrium(*this, rho, u);
308 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ iniRegularized()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::iniRegularized ( T rho,
T * u,
T * pi )
inline

Definition at line 309 of file context.hh.

309 {
310 getDynamics().iniRegularized(*this, rho, u, pi);
311 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ inverseShiftRhoU()

template<typename T , typename DESCRIPTOR >
void olb::gpu::cuda::Cell< T, DESCRIPTOR >::inverseShiftRhoU ( T & rho,
T * u )
inline

Definition at line 312 of file context.hh.

312 {
313 getDynamics().inverseShiftRhoU(*this, rho, u);
314 }

References olb::gpu::cuda::Cell< T, DESCRIPTOR >::getDynamics().

+ Here is the call graph for this function:

◆ neighbor()

template<typename T , typename DESCRIPTOR >
Cell< T, DESCRIPTOR > olb::gpu::cuda::Cell< T, DESCRIPTOR >::neighbor ( LatticeR< DESCRIPTOR::d > offset)
inline

Definition at line 259 of file context.hh.

259 {
260 return {getBlock(), CellID(this->_iCell + getBlock().getNeighborDistance(offset))};
261 }
DeviceBlockLattice< T, DESCRIPTOR > & getBlock() __device__
Definition context.hh:250
std::uint32_t CellID
Type for sequential block-local cell indices.

References olb::gpu::cuda::DataOnlyCell< T, DESCRIPTOR >::_iCell, and olb::gpu::cuda::Cell< T, DESCRIPTOR >::getBlock().

+ Here is the call graph for this function:

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