OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD > Class Template Referenceabstract

Platform-agnostic interface to concrete host-side field arrays. More...

#include <fieldArrayD.h>

+ Inheritance diagram for olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >:
+ Collaboration diagram for olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >:

Classes

class  const_ptr
 Read-only proxy for accessing a column vector entry. More...
 
class  ptr
 Proxy for accessing a column vector entry. More...
 

Public Member Functions

const auto & operator[] (unsigned iDim) const
 
auto & operator[] (unsigned iDim)
 
auto get (std::size_t i) const
 
void set (std::size_t i, const FieldD< T, DESCRIPTOR, FIELD > &data)
 
const_ptr getPointer (std::size_t i) const
 
ptr getPointer (std::size_t i)
 
virtual void resize (std::size_t newCount)=0
 
virtual void setProcessingContext (ProcessingContext context)=0
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename FIELD>
class olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >

Platform-agnostic interface to concrete host-side field arrays.

Definition at line 50 of file fieldArrayD.h.

Member Function Documentation

◆ get()

template<typename T , typename DESCRIPTOR , typename FIELD >
auto olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::get ( std::size_t i) const
inline

Definition at line 69 of file fieldArrayD.h.

70 {
71 if constexpr (DESCRIPTOR::template size<FIELD>() == 1) {
72 return operator[](0)[i];
73 } else {
74 return Vector<typename FIELD::template value_type<T>,
75 DESCRIPTOR::template size<FIELD>()>([this,i](unsigned iD) {
76 return operator[](iD)[i];
77 });
78 }
79 }
const auto & operator[](unsigned iDim) const
Definition fieldArrayD.h:59

References olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::operator[]().

+ Here is the call graph for this function:

◆ getPointer() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
ptr olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::getPointer ( std::size_t i)
inline

Definition at line 93 of file fieldArrayD.h.

94 {
95 return ptr(*this, i);
96 }

◆ getPointer() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
const_ptr olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::getPointer ( std::size_t i) const
inline

Definition at line 88 of file fieldArrayD.h.

89 {
90 return const_ptr(*this, i);
91 }

◆ operator[]() [1/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
auto & olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::operator[] ( unsigned iDim)
inline

Definition at line 64 of file fieldArrayD.h.

65 {
66 return getAbstractColumn(iDim);
67 }

◆ operator[]() [2/2]

template<typename T , typename DESCRIPTOR , typename FIELD >
const auto & olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::operator[] ( unsigned iDim) const
inline

Definition at line 59 of file fieldArrayD.h.

60 {
61 return getAbstractColumn(iDim);
62 }
+ Here is the caller graph for this function:

◆ resize()

template<typename T , typename DESCRIPTOR , typename FIELD >
virtual void olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::resize ( std::size_t newCount)
pure virtual

◆ set()

template<typename T , typename DESCRIPTOR , typename FIELD >
void olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::set ( std::size_t i,
const FieldD< T, DESCRIPTOR, FIELD > & data )
inline

Definition at line 81 of file fieldArrayD.h.

82 {
83 for (unsigned iD=0; iD < DESCRIPTOR::template size<FIELD>(); ++iD) {
84 operator[](iD)[i] = data[iD];
85 }
86 }

References olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::operator[]().

+ Here is the call graph for this function:

◆ setProcessingContext()

template<typename T , typename DESCRIPTOR , typename FIELD >
virtual void olb::AbstractFieldArrayD< T, DESCRIPTOR, FIELD >::setProcessingContext ( ProcessingContext context)
pure virtual

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