OpenLB 1.7
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
olb::particles::conditions::valid_particle_matching_ID< selectedID > Struct Template Reference

#include <particleConditions.h>

+ Collaboration diagram for olb::particles::conditions::valid_particle_matching_ID< selectedID >:

Static Public Member Functions

template<typename T , typename PARTICLETYPE >
static bool value (Particle< T, PARTICLETYPE > &particle)
 

Static Public Attributes

static constexpr bool dynamic =true
 

Detailed Description

template<std::size_t selectedID>
struct olb::particles::conditions::valid_particle_matching_ID< selectedID >

Definition at line 156 of file particleConditions.h.

Member Function Documentation

◆ value()

template<std::size_t selectedID>
template<typename T , typename PARTICLETYPE >
static bool olb::particles::conditions::valid_particle_matching_ID< selectedID >::value ( Particle< T, PARTICLETYPE > & particle)
inlinestatic

Definition at line 158 of file particleConditions.h.

158 {
159 using namespace descriptors;
160 bool valid = access::isValid( particle );
161 bool match = false;
162 if constexpr ( PARTICLETYPE::template providesNested<PARALLELIZATION>() ) {
163 static_assert(PARTICLETYPE::template providesNested<PARALLELIZATION,ID>(), "Field PARALLELIZATION:ID has to be provided");
164 match = (particle.template getField<PARALLELIZATION,ID>() == selectedID);
165 } else {
166 match = (particle.getId() == selectedID);
167 }
168 return (valid && match);
169 }
bool isValid(Particle< T, PARTICLETYPE > particle)

References olb::particles::Particle< T, PARTICLETYPE >::getId(), and olb::particles::access::isValid().

+ Here is the call graph for this function:

Member Data Documentation

◆ dynamic

template<std::size_t selectedID>
constexpr bool olb::particles::conditions::valid_particle_matching_ID< selectedID >::dynamic =true
staticconstexpr

Definition at line 171 of file particleConditions.h.


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