OpenLB 1.7
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
olb::particles::couple_lattice_to_parallel_particles< T, DESCRIPTOR, PARTICLETYPE, FORCEFUNCTOR > Struct Template Reference

Couple lattice to parallel particles. More...

#include <particleTasks.h>

+ Collaboration diagram for olb::particles::couple_lattice_to_parallel_particles< T, DESCRIPTOR, PARTICLETYPE, FORCEFUNCTOR >:

Static Public Member Functions

static auto execute (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const SuperGeometry< T, DESCRIPTOR::d > &sGeometry, SuperLattice< T, DESCRIPTOR > &sLattice, UnitConverter< T, DESCRIPTOR > const &converter, Vector< bool, DESCRIPTOR::d > periodicity=Vector< bool, DESCRIPTOR::d >(false), std::size_t iP0=0)
 

Static Public Attributes

static constexpr bool latticeCoupling = true
 
static constexpr bool particleLoop = false
 

Detailed Description

template<typename T, typename DESCRIPTOR, typename PARTICLETYPE, typename FORCEFUNCTOR = BlockLatticeMomentumExchangeForce<T,DESCRIPTOR,PARTICLETYPE>>
struct olb::particles::couple_lattice_to_parallel_particles< T, DESCRIPTOR, PARTICLETYPE, FORCEFUNCTOR >

Couple lattice to parallel particles.

Definition at line 164 of file particleTasks.h.

Member Function Documentation

◆ execute()

template<typename T , typename DESCRIPTOR , typename PARTICLETYPE , typename FORCEFUNCTOR = BlockLatticeMomentumExchangeForce<T,DESCRIPTOR,PARTICLETYPE>>
static auto olb::particles::couple_lattice_to_parallel_particles< T, DESCRIPTOR, PARTICLETYPE, FORCEFUNCTOR >::execute ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const SuperGeometry< T, DESCRIPTOR::d > & sGeometry,
SuperLattice< T, DESCRIPTOR > & sLattice,
UnitConverter< T, DESCRIPTOR > const & converter,
Vector< bool, DESCRIPTOR::d > periodicity = Vector<bool,DESCRIPTOR::d>(false),
std::size_t iP0 = 0 )
inlinestatic

Definition at line 165 of file particleTasks.h.

173 {
174 constexpr unsigned D = DESCRIPTOR::d;
175 const PhysR<T,D> min = communication::getCuboidMin<T,D>(sGeometry.getCuboidGeometry());
176 const PhysR<T,D> max = communication::getCuboidMax<T,D>(sGeometry.getCuboidGeometry(), min);
177
178 //Test output
180 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
181
182 auto& blockLattice = sLattice.getBlock(iC);
183 auto& blockGeometry = sGeometry.getBlockGeometry(iC);
184
185 //Momentum Exchange/Loss
186 FORCEFUNCTOR forceFunctor( blockLattice, blockGeometry,
187 particleSystem, converter, min, max, periodicity, iP0 );
188
189 //Store boundary force in particles
190 // - if not serialized, allows for additional filtering (e.g. active_particles)
191 if constexpr (FORCEFUNCTOR::serializeForce){
192 dynamics::applySerializableParticleForce( forceFunctor, particleSystem, iP0 );
193 } else {
194 using PCONDITION = conditions::active_particles; //TODO: remove hardcoded active_particle limitation
195 dynamics::applyLocalParticleForce<T,PARTICLETYPE,FORCEFUNCTOR,PCONDITION>(
196 forceFunctor, particleSystem, iP0 );
197 }
198 });
199 }
BlockGeometry< T, D > & getBlockGeometry(int locIC)
Read and write access to a single block geometry.
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.
Pack< T > min(Pack< T > rhs, Pack< T > lhs)
Definition 256.h:406
Pack< T > max(Pack< T > rhs, Pack< T > lhs)
Definition 256.h:416
void forSystemsInSuperParticleSystem(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, F f)
void applySerializableParticleForce(FORCEFUNCTOR &forceF, ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t iP0=0)
Apply boundary force provided by force functor to the particle center as torque and force.

References olb::particles::dynamics::applySerializableParticleForce(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::SuperLattice< T, DESCRIPTOR >::getBlock(), olb::SuperGeometry< T, D >::getBlockGeometry(), and olb::SuperStructure< T, D >::getCuboidGeometry().

+ Here is the call graph for this function:

Member Data Documentation

◆ latticeCoupling

template<typename T , typename DESCRIPTOR , typename PARTICLETYPE , typename FORCEFUNCTOR = BlockLatticeMomentumExchangeForce<T,DESCRIPTOR,PARTICLETYPE>>
constexpr bool olb::particles::couple_lattice_to_parallel_particles< T, DESCRIPTOR, PARTICLETYPE, FORCEFUNCTOR >::latticeCoupling = true
staticconstexpr

Definition at line 200 of file particleTasks.h.

◆ particleLoop

template<typename T , typename DESCRIPTOR , typename PARTICLETYPE , typename FORCEFUNCTOR = BlockLatticeMomentumExchangeForce<T,DESCRIPTOR,PARTICLETYPE>>
constexpr bool olb::particles::couple_lattice_to_parallel_particles< T, DESCRIPTOR, PARTICLETYPE, FORCEFUNCTOR >::particleLoop = false
staticconstexpr

Definition at line 201 of file particleTasks.h.


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