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

Couple particles to lattice. More...

#include <particleTasks.h>

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

Static Public Member Functions

static auto execute (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, Particle< T, PARTICLETYPE > &particle, const SuperGeometry< T, DESCRIPTOR::d > &sGeometry, SuperLattice< T, DESCRIPTOR > &sLattice, UnitConverter< T, DESCRIPTOR > const &converter, int globiC, Vector< bool, DESCRIPTOR::d > periodicity=Vector< bool, DESCRIPTOR::d >(false))
 

Static Public Attributes

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

Detailed Description

template<typename T, typename DESCRIPTOR, typename PARTICLETYPE>
struct olb::particles::couple_parallel_particles_to_lattice< T, DESCRIPTOR, PARTICLETYPE >

Couple particles to lattice.

Definition at line 262 of file particleTasks.h.

Member Function Documentation

◆ execute()

template<typename T , typename DESCRIPTOR , typename PARTICLETYPE >
static auto olb::particles::couple_parallel_particles_to_lattice< T, DESCRIPTOR, PARTICLETYPE >::execute ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
Particle< T, PARTICLETYPE > & particle,
const SuperGeometry< T, DESCRIPTOR::d > & sGeometry,
SuperLattice< T, DESCRIPTOR > & sLattice,
UnitConverter< T, DESCRIPTOR > const & converter,
int globiC,
Vector< bool, DESCRIPTOR::d > periodicity = Vector<bool,DESCRIPTOR::d>(false) )
inlinestatic

Definition at line 263 of file particleTasks.h.

272 {
273 constexpr unsigned D = DESCRIPTOR::d;
274 using namespace descriptors;
275
276 //Retrieve load balancer and local iC
277 auto& superStructure = sParticleSystem.getSuperStructure();
278 auto& loadBalancer = superStructure.getLoadBalancer();
279 int iC = loadBalancer.loc(globiC);
280
281 //Retrieve blockLattice and blockGeometry
282 auto& blockLattice = sLattice.getBlock(iC);
283 auto& blockGeometry = sGeometry.getBlockGeometry(iC);
284
285 //Write particle to field
286 if(isPeriodic(periodicity)) {
287 const PhysR<T,D> min = communication::getCuboidMin<T,D>(sGeometry.getCuboidGeometry());
288 const PhysR<T,D> max = communication::getCuboidMax<T,D>(sGeometry.getCuboidGeometry(), min);
289
290 setBlockParticleField( blockGeometry, blockLattice, converter, min, max,
291 particle, periodicity);
292 } else {
293 setBlockParticleField( blockGeometry, blockLattice, converter, particle );
294 }
295 }
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
constexpr bool isPeriodic(const Vector< bool, D > &periodic)
void setBlockParticleField(const BlockGeometry< T, DESCRIPTOR::d > &blockGeometry, BlockLattice< T, DESCRIPTOR > &blockLattice, UnitConverter< T, DESCRIPTOR > const &converter, Particle< T, PARTICLETYPE > &particle)

References olb::SuperLattice< T, DESCRIPTOR >::getBlock(), olb::SuperGeometry< T, D >::getBlockGeometry(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::SuperStructure< T, D >::getLoadBalancer(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), olb::particles::isPeriodic(), and olb::particles::setBlockParticleField().

+ Here is the call graph for this function:

Member Data Documentation

◆ latticeCoupling

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

Definition at line 296 of file particleTasks.h.

◆ particleLoop

template<typename T , typename DESCRIPTOR , typename PARTICLETYPE >
constexpr bool olb::particles::couple_parallel_particles_to_lattice< T, DESCRIPTOR, PARTICLETYPE >::particleLoop = true
staticconstexpr

Definition at line 297 of file particleTasks.h.


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