OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::descriptors::FIELD_BASE< C_0, C_1, C_2 > Struct Template Reference

Base of a field whose size is defined by [C_0,C_1,C_2]^T * [1,D,Q]. More...

#include <fields.h>

+ Inheritance diagram for olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >:
+ Collaboration diagram for olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >:

Public Types

template<typename T >
using value_type = T
 Return value type of field.
 
template<typename T >
using column_type = AbstractColumn<T>
 

Public Member Functions

 FIELD_BASE ()=default
 

Static Public Member Functions

template<typename DESCRIPTOR >
static constexpr std::size_t size ()
 Get size of field for descriptor.
 
template<typename T , typename DESCRIPTOR >
static constexpr auto getInitialValue ()
 Return value must be a correctly sized and typed olb::Vector.
 
template<typename T , typename DESCRIPTOR , typename FIELD >
static constexpr auto isValid (FieldD< T, DESCRIPTOR, FIELD > value)
 
static constexpr bool isSerializable ()
 

Detailed Description

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
struct olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >

Base of a field whose size is defined by [C_0,C_1,C_2]^T * [1,D,Q].

Definition at line 52 of file fields.h.

Member Typedef Documentation

◆ column_type

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
template<typename T >
using olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::column_type = AbstractColumn<T>

Definition at line 66 of file fields.h.

◆ value_type

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
template<typename T >
using olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::value_type = T

Return value type of field.

Most fields are stored using the same value type as the T type parameter of their associated lattice. However this template offers the possibility of declaring a different value type per field. See TYPED_FIELD_BASE.

Definition at line 63 of file fields.h.

Constructor & Destructor Documentation

◆ FIELD_BASE()

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::FIELD_BASE ( )
default

Member Function Documentation

◆ getInitialValue()

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
template<typename T , typename DESCRIPTOR >
static constexpr auto olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::getInitialValue ( )
inlinestaticconstexpr

Return value must be a correctly sized and typed olb::Vector.

Definition at line 81 of file fields.h.

81 {
82 return Vector<value_type<T>, DESCRIPTOR::template size<FIELD_BASE<C_0,C_1,C_2>>()>{};
83 }
Vector(T &&t, Ts &&... ts) -> Vector< std::remove_cvref_t< T >, 1+sizeof...(Ts)>
static constexpr std::size_t size()
Get size of field for descriptor.
Definition fields.h:70

References olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::size().

+ Here is the call graph for this function:

◆ isSerializable()

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
static constexpr bool olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::isSerializable ( )
inlinestaticconstexpr

Definition at line 90 of file fields.h.

90 {
91 return true;
92 }

◆ isValid()

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
template<typename T , typename DESCRIPTOR , typename FIELD >
static constexpr auto olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::isValid ( FieldD< T, DESCRIPTOR, FIELD > value)
inlinestaticconstexpr

Definition at line 86 of file fields.h.

86 {
87 return true;
88 }

◆ size()

template<unsigned C_0, unsigned C_1 = 0, unsigned C_2 = 0>
template<typename DESCRIPTOR >
static constexpr std::size_t olb::descriptors::FIELD_BASE< C_0, C_1, C_2 >::size ( )
inlinestaticconstexpr

Get size of field for descriptor.

Definition at line 70 of file fields.h.

70 {
71 return C_0
72 + C_1 * DESCRIPTOR::d
73 + C_2 * DESCRIPTOR::q;
74 }
+ Here is the caller graph for this function:

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