25#ifndef PARTICLE_DISTRIBUTION_HH
26#define PARTICLE_DISTRIBUTION_HH
30 template <
typename T,
typename S>
45 template <
typename T,
typename S>
84 template <
typename T,
typename S>
87 FunctorPtr <AnalyticalF1D<T, S>> _distribution;
88 std::vector<T> _particleArray;
89 std::vector<T> _timeArray;
90 long long _numberOfParticles;
91 long long _numberOfParticleSizeGroups;
92 T _particleOffset = 0;
93 T _particleOffsetTime = 0;
94 long long _currentParticle = 0;
100 template <
typename C>
103 template <
typename DESCRIPTOR>
106 template <
typename C>
Smart pointer for managing the various ways of passing functors around.
Functor for a Gaussian (normal) distribution.
GaussDistribution(T standardDeviation, T mean, T scale=1)
bool operator()(T output[1], const S x[1])
IndicatorF3D is an application from .
Functor for a logarithmic normal distribution.
LogNormalDistribution(T standardDeviation, T geometricMean, T scale=1)
bool operator()(T output[1], const S x[1])
Particle distribution for time and size discretization.
void spawnSphericalParticles(SuperParticleSystem3D< T, Particle3D > &supParticleSystem, IndicatorF3D< S > &indicator, T density, C iT, bool loopAround=false, bool reshuffleAfterLoop=false)
T nextParticleRadius(bool loopAround=false, bool reshuffleAfterLoop=false)
~ParticleDistribution()
destructor
void deactivateParticles(SuperParticleSystem3D< T, Particle3D > &supParticleSystem, int beginID, int endID)
Sets the particle state 'active' to 'false' for particles with ids from 'beginID' to 'endID'.
void printParticleArray()
prints the particle Radii to the console
ParticleDistribution(FunctorPtr< AnalyticalF1D< T, S > > &&distribution, C numberOfParticles, C numberOfParticleSizeGroups, T minRadius, T maxRadius, T lengthConversion=1)
void printSizeMatrix()
prints the calculation matrix to the console
void shuffleParticleArray()
shuffles particle array using random_shuffle
bool calculateTimeArray(AnalyticalF1D< T, S > &timeDistribution, UnitConverter< T, DESCRIPTOR > &converter, T begin, T end)
bool calculateParticleArray(bool getExactParticleNumber=false)
void timeActivateParticles(SuperParticleSystem3D< T, Particle3D > &supParticleSystem, C iT, C idOfset=0)
void printTimeArray()
prints out all time-steps a new particle should appear
void preSpawnSphericalParticles(SuperParticleSystem3D< T, Particle3D > &supParticleSystem, IndicatorF3D< S > &indicator, T density, int beginID=1, bool shuffle=false)
void getParticleArray(std::vector< T > &particleArray)
The class superParticleSystem is the basis for particulate flows within OpenLB.
Conversion between physical and lattice units, as well as discretization.
Top level namespace for all of OpenLB.