OpenLB 1.7
|
#include <particle.h>
Public Types | |
using | Communicatable = typename GroupedDataCommunicatableHelper<DATA,PARTICLETYPE>::type |
Define Communicatable. | |
Public Member Functions | |
Particle (DATA &dynamicFieldGroupsD, std::vector< std::shared_ptr< dynamics::ParticleDynamics< T, PARTICLETYPE > > > &dynamicsVector, std::size_t iParticle) | |
void | init () |
Initialize. | |
template<bool multiOutput = PARTICLETYPE::template providesNested<descriptors::PARALLELIZATION>()> | |
void | print (std::size_t iParticle) |
Print. | |
template<bool multiOutput = PARTICLETYPE::template providesNested<descriptors::PARALLELIZATION>()> | |
void | print () |
std::size_t | getId () const |
Return memory ID of the currently represented particle. | |
void | setId (std::size_t iParticle) |
Jump to arbitrary particle memory ID. | |
void | advanceId () |
Jump to next particle in linearization sequence. | |
void | addDynamics (std::shared_ptr< dynamics::ParticleDynamics< T, PARTICLETYPE > > &dynamicsSPtr) |
Add dynamics. | |
template<typename DYNAMICS , typename ... Args> | |
void | defineDynamics (Args &&...args) |
Define dynamics (factory method) | |
template<bool boundsCheck = false> | |
dynamics::ParticleDynamics< T, PARTICLETYPE > * | getDynamics (unsigned iDyn=0) |
Get a pointer to specific dynamics. | |
void | process (T timeStepSize, unsigned short iDyn=0) |
Apply processing to the particle according to dynamics at iDyn. | |
template<typename GROUP , typename FIELD > | |
std::enable_if_t<(PARTICLETYPE::template size< typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > >() > 1), FieldD< T, PARTICLETYPE, typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > > | getField () |
Return copy of descriptor-declared FIELD as a vector. | |
template<typename GROUP , typename FIELD > | |
std::enable_if_t<(PARTICLETYPE::templatesize< typenamePARTICLETYPE::templatederivedField< GROUP >::templatederivedField< FIELD > >()==1), typenamePARTICLETYPE::templatederivedField< GROUP >::template derivedField< FIELD >::template value_type< T > | getField () |
Return copy of descriptor-declared FIELD as a scalar (more specifically as value type of FIELD) | |
template<typename GROUP , typename FIELD > | |
std::enable_if_t<(PARTICLETYPE::template size< typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > >() > 1), void > | setField (const FieldD< T, PARTICLETYPE, typename PARTICLETYPE::template derivedField< GROUP > ::template derivedField< FIELD > > &v) |
Set descriptor-declared FIELD. | |
template<typename GROUP , typename FIELD > | |
std::enable_if_t<(PARTICLETYPE::template size< typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > >()==1), void > | setField (typename PARTICLETYPE::template derivedField< GROUP > ::template derivedField< FIELD > ::template value_type< T > value) |
Set descriptor-declared FIELD. | |
Communicatable | getCommunicatable () |
Get communicatable necessary for serialization. | |
std::size_t | getSerialSize () const |
Get serialized size. | |
std::size_t | serialize (std::uint8_t *buffer) const |
Serialize data. | |
std::size_t | deserialize (const std::uint8_t *buffer) |
Deserialize data. | |
Definition at line 42 of file particle.h.
using olb::particles::Particle< T, PARTICLETYPE >::Communicatable = typename GroupedDataCommunicatableHelper<DATA,PARTICLETYPE>::type |
Define Communicatable.
Definition at line 130 of file particle.h.
olb::particles::Particle< T, PARTICLETYPE >::Particle | ( | DATA & | dynamicFieldGroupsD, |
std::vector< std::shared_ptr< dynamics::ParticleDynamics< T, PARTICLETYPE > > > & | dynamicsVector, | ||
std::size_t | iParticle ) |
Definition at line 37 of file particle.hh.
void olb::particles::Particle< T, PARTICLETYPE >::addDynamics | ( | std::shared_ptr< dynamics::ParticleDynamics< T, PARTICLETYPE > > & | dynamicsSPtr | ) |
Add dynamics.
Definition at line 85 of file particle.hh.
void olb::particles::Particle< T, PARTICLETYPE >::advanceId | ( | ) |
Jump to next particle in linearization sequence.
Definition at line 79 of file particle.hh.
void olb::particles::Particle< T, PARTICLETYPE >::defineDynamics | ( | Args &&... | args | ) |
Define dynamics (factory method)
Definition at line 93 of file particle.hh.
|
inline |
Deserialize data.
Definition at line 146 of file particle.h.
|
inline |
Get communicatable necessary for serialization.
Definition at line 132 of file particle.h.
dynamics::ParticleDynamics< T, PARTICLETYPE > * olb::particles::Particle< T, PARTICLETYPE >::getDynamics | ( | unsigned | iDyn = 0 | ) |
Get a pointer to specific dynamics.
Definition at line 99 of file particle.hh.
std::enable_if_t<( PARTICLETYPE::template size< typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > >() > 1), FieldD< T, PARTICLETYPE, typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > > olb::particles::Particle< T, PARTICLETYPE >::getField | ( | ) |
Return copy of descriptor-declared FIELD as a vector.
std::enable_if_t<(PARTICLETYPE::templatesize< typenamePARTICLETYPE::templatederivedField< GROUP >::templatederivedField< FIELD > >()==1), typenamePARTICLETYPE::templatederivedField< GROUP >::template derivedField< FIELD >::template value_type< T > olb::particles::Particle< T, PARTICLETYPE >::getField | ( | ) |
Return copy of descriptor-declared FIELD as a scalar (more specifically as value type of FIELD)
std::size_t olb::particles::Particle< T, PARTICLETYPE >::getId | ( | ) | const |
Return memory ID of the currently represented particle.
Definition at line 67 of file particle.hh.
|
inline |
Get serialized size.
Definition at line 136 of file particle.h.
void olb::particles::Particle< T, PARTICLETYPE >::init | ( | ) |
Initialize.
Definition at line 47 of file particle.hh.
void olb::particles::Particle< T, PARTICLETYPE >::print | ( | ) |
Definition at line 61 of file particle.hh.
void olb::particles::Particle< T, PARTICLETYPE >::print | ( | std::size_t | iParticle | ) |
Print.
Definition at line 54 of file particle.hh.
void olb::particles::Particle< T, PARTICLETYPE >::process | ( | T | timeStepSize, |
unsigned short | iDyn = 0 ) |
Apply processing to the particle according to dynamics at iDyn.
Definition at line 110 of file particle.hh.
References olb::particles::access::isMotionComputationEnabled(), and olb::particles::dynamics::ParticleDynamics< T, PARTICLETYPE >::process().
|
inline |
Serialize data.
Definition at line 141 of file particle.h.
std::enable_if_t<(PARTICLETYPE::template size< typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > >() > 1), void > olb::particles::Particle< T, PARTICLETYPE >::setField | ( | const FieldD< T, PARTICLETYPE, typename PARTICLETYPE::template derivedField< GROUP > ::template derivedField< FIELD > > & | v | ) |
Set descriptor-declared FIELD.
Definition at line 164 of file particle.hh.
std::enable_if_t<(PARTICLETYPE::template size< typename PARTICLETYPE::template derivedField< GROUP >::template derivedField< FIELD > >()==1), void > olb::particles::Particle< T, PARTICLETYPE >::setField | ( | typename PARTICLETYPE::template derivedField< GROUP > ::template derivedField< FIELD > ::template value_type< T > | value | ) |
Set descriptor-declared FIELD.
Definition at line 186 of file particle.hh.
void olb::particles::Particle< T, PARTICLETYPE >::setId | ( | std::size_t | iParticle | ) |
Jump to arbitrary particle memory ID.
Definition at line 73 of file particle.hh.