OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS > Struct Template Reference

Base descriptor of a particle system. More...

#include <base.h>

+ Inheritance diagram for olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >:
+ Collaboration diagram for olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >:

Public Types

template<typename BASE >
using derivedField
 Returns FIELD by provided BASE.
 
- Public Types inherited from olb::descriptors::FIELD_TUPLE< FIELDS... >
using fields_t
 
using decompose_into
 
using filter
 Returns FIELD_TUPLE with subset of FIELDS meeting COND.
 
- Public Types inherited from olb::meta::list< FIELDS... >
using get
 Returns INDEXth type of TYPES.
 
using decompose_into
 Export TYPES into arbitrary variadic template COLLECTION.
 
using map
 
using map_to_callable_result
 
using push
 
using append
 
using include
 Merge TYPES and UYPES into new list.
 
using first_with_base
 Returns first type of TYPES that is derived from BASE.
 
using first_with_base_or_fallback
 Returns first type of TYPES that is derived from BASE.
 

Static Public Member Functions

template<typename FIELD >
static constexpr std::size_t size ()
 Returns size of given FIELD.
 
template<typename ... NESTED_FIELDS>
static constexpr bool providesNested ()
 Returns whether WANTED_FIELD (last in NESTED_FIELDS) is provided by CONCRETE_FIELD_TUPLE.
 
- Static Public Member Functions inherited from olb::descriptors::FIELD_TUPLE< FIELDS... >
static constexpr bool provides ()
 Returns whether WANTED_FIELD is contained in FIELDS.
 
static bool provides (std::type_index field)
 Returns whether field is contained in FIELDS.
 
- Static Public Member Functions inherited from olb::meta::list< FIELDS... >
static constexpr unsigned index ()
 Index of first instance of TYPE in TYPES.
 
static constexpr void for_each (F f)
 Calls f for each type of TYPES by-value (in reversed order!)
 
static constexpr bool contains ()
 

Static Public Attributes

static constexpr int d = D
 Number of dimensions.
 
static constexpr int q = 0
 Number of velocities.
 
- Static Public Attributes inherited from olb::descriptors::FIELD_TUPLE< FIELDS... >
static constexpr std::size_t field_count
 Number of fields.
 
- Static Public Attributes inherited from olb::meta::list< FIELDS... >
static constexpr unsigned size
 

Additional Inherited Members

- Public Member Functions inherited from olb::descriptors::FIELD_TUPLE< FIELDS... >
 FIELD_TUPLE ()=delete
 Deleted constructor to enforce pure usage as type and prevent implicit narrowing conversions.
 

Detailed Description

template<unsigned D, typename... FIELDS>
struct olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >

Base descriptor of a particle system.

Definition at line 141 of file base.h.

Member Typedef Documentation

◆ derivedField

template<unsigned D, typename... FIELDS>
template<typename BASE >
using olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >::derivedField
Initial value:
std::conditional_t<
typename meta::list_item_with_base_default_base<BASE,FIELDS...>::type,
FIELDS...
>(),
void
>
constexpr bool contains()
Returns true iff a given type list contains WANTED.
Definition meta.h:125
std::conditional_t< std::is_base_of< BASE, HEAD >::value, HEAD, typename list_item_with_base_default_base< BASE, TAIL... >::type > type
Definition meta.h:146

Returns FIELD by provided BASE.

returns void, if FIELD_TUPE does not provide BASE field

Definition at line 158 of file base.h.

Member Function Documentation

◆ providesNested()

template<unsigned D, typename... FIELDS>
template<typename ... NESTED_FIELDS>
static constexpr bool olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >::providesNested ( )
inlinestaticconstexpr

Returns whether WANTED_FIELD (last in NESTED_FIELDS) is provided by CONCRETE_FIELD_TUPLE.

Offers the same funcionality as it overloaded pendant in in FIELD_TUPLE, however allows beeing called with multiple BASE types (as currently used in the particle framework)

Definition at line 173 of file base.h.

References olb::meta::derived_type_in_nested< BASE, HEAD, TAIL >::contains().

+ Here is the call graph for this function:

◆ size()

template<unsigned D, typename... FIELDS>
template<typename FIELD >
static constexpr std::size_t olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >::size ( )
inlinestaticconstexpr

Returns size of given FIELD.

Definition at line 149 of file base.h.

149 {
150 return FIELD::template size<PARTICLE_DESCRIPTOR>();
151 }
static constexpr std::size_t size()
Returns size of given FIELD.
Definition base.h:149

References olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >::size().

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

Member Data Documentation

◆ d

template<unsigned D, typename... FIELDS>
int olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >::d = D
staticconstexpr

Number of dimensions.

Definition at line 143 of file base.h.

◆ q

template<unsigned D, typename... FIELDS>
int olb::descriptors::PARTICLE_DESCRIPTOR< D, FIELDS >::q = 0
staticconstexpr

Number of velocities.

Definition at line 145 of file base.h.


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