OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Functions
olb::particles::creators Namespace Reference

Classes

struct  SpawnData
 

Functions

template<typename T , typename PARTICLETYPE >
std::unordered_set< int > prepareParallelResolvedParticle (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, Vector< T, PARTICLETYPE::d > position, T circumRadius, const T epsilon, int &globiCcentre, const T physDeltaX, const Vector< bool, PARTICLETYPE::d > &periodicity)
 
template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > assignParallelResolvedParticleToiC (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxSurface, std::size_t globID, int globiCcentre, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
 
template<typename T , typename PARTICLETYPE >
bool assignParallelResolvedParticle (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::unordered_set< int > &setOfICs, int globiC, std::size_t idxSurface, std::size_t globID, std::size_t &localID, int globiCcentre, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addResolvedObject (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, std::size_t idxSurface, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.), const Vector< bool, PARTICLETYPE::d > &periodicity=Vector< T, PARTICLETYPE::d >(false))
 
template<typename T , typename PARTICLETYPE , typename F >
std::size_t addSurface (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, F createUniqueIndicatorPtr)
 Adds surface (SmoothIndicator) to all block particle systems.
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addResolvedSphere3D (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T radius, T epsilon, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addResolvedCuboid3D (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &extend, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addResolvedCylinder3D (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &normal, T height, T radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addResolvedArbitraryShape3D (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T latticeSpacing, std::shared_ptr< IndicatorF3D< T > > indPtr, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addResolvedCircle2D (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 2 > &position, T radius, T epsilon, T density=0., const Vector< T, 2 > &velocity=Vector< T, 2 >(0.), const Vector< bool, 2 > &periodicity=Vector< bool, 2 >(false))
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addSubgridSphere3D (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T radius, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 
template<typename T , typename PARTICLETYPE >
ParallelParticleLocator addSubgridSphereWithSpecies3D (SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T radius, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const int species=0)
 
template<typename T , unsigned D>
calcParticleVolume (const std::vector< SpawnData< T, D > > &spawnData, const std::function< T(const std::size_t &)> &getParticleVolume)
 
template<typename T , unsigned D>
calcParticleVolumeFraction (const std::vector< SpawnData< T, D > > &spawnData, const T fluidVolume, const std::function< T(const std::size_t &)> &getParticleVolume)
 
template<typename T , unsigned D>
void extendSpawnData (std::vector< SpawnData< T, D > > &spawnData, const T wantedParticleVolumeFraction, IndicatorF< T, D > &fluidDomain, const T fluidDomainVolume, const std::function< T(const std::size_t &)> &getCircumRadius, const std::function< T(const std::size_t &)> &getParticleVolume)
 
template<typename T , unsigned D>
std::vector< SpawnData< T, D > > setParticles (const T wantedParticleVolumeFraction, IndicatorF< T, D > &fluidDomain, const T fluidDomainVolume, const std::function< T(const std::size_t &)> &getCircumRadius, const std::function< T(const std::size_t &)> &getParticleVolume, const std::function< void(const SpawnData< T, D > &, const std::size_t &)> createParticle)
 
std::vector< std::vector< std::string > > readParticlePositions (const std::string &filename)
 
template<typename T , unsigned D>
void saveParticlePositions (const std::string &filename, const std::vector< SpawnData< T, D > > &spawnData, const std::function< std::string(const std::size_t &)> &evalIdentifier)
 
template<typename T , unsigned D>
std::vector< SpawnData< T, D > > setParticles (const std::string &filename, const T wantedParticleVolumeFraction, IndicatorF< T, D > &fluidDomain, const T fluidDomainVolume, const std::function< T(const std::size_t &)> &getParticleVolume, const std::function< void(const SpawnData< T, D > &, const std::string &)> createParticle)
 
template<typename T , unsigned D>
void extendSpawnData (std::vector< SpawnData< T, D > > &spawnData, const T wantedParticleVolumeFraction, IndicatorF< T, D > &fluidDomain, const T fluidDomainVolume, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMin, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMax, const std::function< T(const std::size_t &)> &getParticleVolume)
 
template<typename T , unsigned D>
std::vector< SpawnData< T, D > > setParticles (const T wantedParticleVolumeFraction, IndicatorF< T, D > &fluidDomain, const T fluidDomainVolume, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMin, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMax, const std::function< T(const std::size_t &)> &getParticleVolume, const std::function< void(const SpawnData< T, D > &, const std::size_t &)> createParticle)
 
template<typename T , unsigned D>
void extendSpawnData (std::vector< SpawnData< T, D > > &spawnData, const T wantedParticleVolumeFraction, IndicatorF< T, D > &fluidDomain, const T fluidDomainVolume, const T deltaX, const T contactDetectionDistance, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMin, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMax, const std::function< T(const std::size_t &, const SpawnData< T, D > &, const PhysR< T, D > &)> &signedDistanceToParticle, const std::function< T(const std::size_t &)> &getParticleVolume)
 
template<typename T , unsigned D>
std::vector< SpawnData< T, D > > setParticles (const T wantedParticleVolumeFraction, IndicatorF< T, D > &fluidDomain, const T fluidDomainVolume, const T deltaX, const T contactDetectionDistance, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMin, const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> &getMax, const std::function< T(const std::size_t &, const SpawnData< T, D > &, const PhysR< T, D > &)> &signedDistanceToParticle, const std::function< T(const std::size_t &)> &getParticleVolume, const std::function< void(const SpawnData< T, D > &, const std::size_t &)> createParticle)
 
template<typename T , typename PARTICLETYPE >
std::vector< SpawnData< T, PARTICLETYPE::d > > updateParticlePositions (std::vector< SpawnData< T, PARTICLETYPE::d > > spawnData, XParticleSystem< T, PARTICLETYPE > &particleSystem, MPI_Comm particleCreatorComm=MPI_COMM_WORLD)
 Updates particle positions so that they can be easily written to a txt file with the function above.
 
template<typename T , typename PARTICLETYPE >
std::vector< SpawnData< T, PARTICLETYPE::d > > saveUpdatedParticlePositions (const std::string &filename, const std::vector< SpawnData< T, PARTICLETYPE::d > > &originalSpawnData, const std::function< std::string(const std::size_t &)> &evalIdentifier, XParticleSystem< T, PARTICLETYPE > &particleSystem, MPI_Comm particleCreatorComm=MPI_COMM_WORLD)
 
template<typename T , typename PARTICLETYPE , bool ROTATION_IS_OPTIONAL = false>
void setResolvedObject (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, std::size_t idxSurface, const Vector< T, 2 > &position, T density, T angle, const Vector< T, 2 > &velocity)
 
template<typename T , typename PARTICLETYPE >
void addResolvedObject (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxSurface, const Vector< T, 2 > &position, T density=0., T angle=0., const Vector< T, 2 > &velocity=Vector< T, 2 >(0.))
 Add resolved object as new particle with existing surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedCircle2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, T radius, T epsilon, T density=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Set resolved circle for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedCircle2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, Vector< T, 2 > position, T radius, T epsilon, T density=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Add resolved circle as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedCuboid2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, Vector< T, 2 > extend, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Set resolved cuboid for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedCuboid2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, Vector< T, 2 > position, Vector< T, 2 > extend, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Add resolved cuboid as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedTriangle2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, T radius, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Set resolved cuboid for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedTriangle2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, Vector< T, 2 > position, T radius, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Add resolved triangle as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedArbitraryShape2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, T latticeSpacing, std::shared_ptr< IndicatorF2D< T > > indPtr, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Set resolved cuboid for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedArbitraryShape2D (ParticleSystem< T, PARTICLETYPE > &particleSystem, Vector< T, 2 > position, T latticeSpacing, std::shared_ptr< IndicatorF2D< T > > indPtr, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
 Add resolved arbitrary shape as new particle with new surface.
 
template<typename T , typename PARTICLETYPE , bool IGNORE_WARNINGS = false>
void setResolvedSphere3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, T radius, T epsilon, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Set resolved sphere for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE , bool IGNORE_WARNINGS = false>
void addResolvedSphere3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position, T radius, T epsilon, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Add resolved sphere as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedCylinder3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, const Vector< T, 3 > &normal, T height, T radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Set resolved cylinder for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedCylinder3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &normal, T height, T radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Add resolved cylinder as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedCuboid3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, const Vector< T, 3 > &extend, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Set resolved cuboid for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedCuboid3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &extend, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Add resolved cuboid as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedCone3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position1, const Vector< T, 3 > &position2, T radius1, T radius2, T epsilon, T density=0, const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Set resolved cone for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedCone3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position1, const Vector< T, 3 > &position2, T radius1, T radius2, T epsilon, T density=0, const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Add resolved cone as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedEllipsoid3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, const Vector< T, 3 > &radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Set resolved ellipsoid for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedEllipsoid3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 Add resolved ellipsoid as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void setResolvedArbitraryShape3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 3 > position, T latticeSpacing, std::shared_ptr< IndicatorF3D< T > > indPtr, T epsilon, T density=0., Vector< T, 3 > angleInDegree=Vector< T, 3 >(0.), Vector< T, 3 > velocity=Vector< T, 3 >(0.))
 Set resolved cuboid for existing particle but new surface.
 
template<typename T , typename PARTICLETYPE >
void addResolvedArbitraryShape3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, Vector< T, 3 > position, T latticeSpacing, std::shared_ptr< IndicatorF3D< T > > indPtr, T epsilon, T density=0., Vector< T, 3 > angleInDegree=Vector< T, 3 >(0.), Vector< T, 3 > velocity=Vector< T, 3 >(0.))
 Add resolved arbitrary shape as new particle with new surface.
 
template<typename T , typename PARTICLETYPE >
void addSubgridSphere3D (ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position, T radius, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
 
template<typename PARTICLETYPE , bool ROTATION_IS_OPTIONAL = false>
void checkForErrors ()
 
template<typename T , typename PARTICLETYPE , bool ROTATION_IS_OPTIONAL = false>
Particle< T, PARTICLETYPE > setResolvedObject (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, std::size_t idxSurface, const Vector< T, PARTICLETYPE::d > &position, T density, Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > angleInDegree, const Vector< T, PARTICLETYPE::d > &velocity)
 Set new particle for existing surface (and return particle object)
 
template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > addResolvedObject (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxSurface, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
 Add resolved object as new particle with existing surface (and return particle object)
 
template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > setSubgridObject (ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, PARTICLETYPE::d > &position, T radius, T density, const Vector< T, PARTICLETYPE::d > &velocity, T shapeFactor=T{1})
 Set new particle (and return particle object)
 
template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > addSubgridObject (ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, PARTICLETYPE::d > &position, T radius, T density=0., const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
 Add subgrid object as new particle (and return particle object)
 

Function Documentation

◆ addResolvedArbitraryShape2D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedArbitraryShape2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
Vector< T, 2 > position,
T latticeSpacing,
std::shared_ptr< IndicatorF2D< T > > indPtr,
T epsilon,
T density = 0.,
T angle = 0.,
Vector< T, 2 > velocity = Vector<T,2> (0.) )

Add resolved arbitrary shape as new particle with new surface.

Set resolved arbitrary shape 2D at given index

Definition at line 252 of file particleCreatorFunctions2D.h.

258{
259 //Retrieve new index
260 std::size_t idxParticle = particleSystem.size();
261
262 //Initialize particle address
263 particleSystem.extend();
264
266 setResolvedArbitraryShape2D( particleSystem, idxParticle, position, latticeSpacing, indPtr,
267 epsilon, density, angle, velocity );
268}
constexpr std::size_t size()
Size of ParticleSystem.
void extend()
Extend particle system by one particle.
void setResolvedArbitraryShape2D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, T latticeSpacing, std::shared_ptr< IndicatorF2D< T > > indPtr, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
Set resolved cuboid for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedArbitraryShape2D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedArbitraryShape3D() [1/2]

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedArbitraryShape3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
Vector< T, 3 > position,
T latticeSpacing,
std::shared_ptr< IndicatorF3D< T > > indPtr,
T epsilon,
T density = 0.,
Vector< T, 3 > angleInDegree = Vector<T,3> (0.),
Vector< T, 3 > velocity = Vector<T,3> (0.) )

Add resolved arbitrary shape as new particle with new surface.

Set resolved arbitrary shape 3D at given index

Definition at line 336 of file particleCreatorFunctions3D.h.

343{
344 //Retrieve new index
345 std::size_t idxParticle = particleSystem.size();
346
347 //Initialize particle address
348 particleSystem.extend();
349
351 setResolvedArbitraryShape3D( particleSystem, idxParticle, position,
352 latticeSpacing, indPtr, epsilon, density, angleInDegree, velocity );
353}
void setResolvedArbitraryShape3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 3 > position, T latticeSpacing, std::shared_ptr< IndicatorF3D< T > > indPtr, T epsilon, T density=0., Vector< T, 3 > angleInDegree=Vector< T, 3 >(0.), Vector< T, 3 > velocity=Vector< T, 3 >(0.))
Set resolved cuboid for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedArbitraryShape3D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedArbitraryShape3D() [2/2]

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addResolvedArbitraryShape3D ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const Vector< T, 3 > & position,
T latticeSpacing,
std::shared_ptr< IndicatorF3D< T > > indPtr,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.),
const Vector< bool, 3 > & periodicity = Vector<bool,3>(false) )

Definition at line 345 of file particleParallelCreatorFunctions3D.h.

353{
354 //Get circumRadius and set angleInDegree
355 T circumRadius = SmoothIndicatorCustom3D<T,T,true>(
356 latticeSpacing, indPtr, PhysR<T, 3>(T {}), epsilon, angleInDegree).getCircumRadius();
357
358 //Get new global particle id
359 std::size_t globID = sParticleSystem.getGlobID();
360
361 //Prepare particle and get list of touching iCs
362 int globiCcentre;
363 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
364 position, circumRadius, epsilon, globiCcentre,
365 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
366 periodicity);
367
368 std::size_t idxSurface = addSurface(sParticleSystem,
369 [&](){
370 return std::make_unique<SmoothIndicatorCustom3D<T, T, true>>(
371 latticeSpacing, indPtr, PhysR<T, 3>(T {}), epsilon, angleInDegree);
372 });
373
374 //Iterate over particle systems
375 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
376 communication::forSystemsInSuperParticleSystem( sParticleSystem,
377 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
378 //Do for all iCs
379
380 //Assigne resolved particle to iCs specified in setOfICs
381 std::size_t localID=0;
382 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
383 idxSurface, globID, localID, globiCcentre,
384 position, density, angleInDegree, velocity );
385 //Set localID if centre
386 if (globiC==globiCcentre){ localIDcentre=localID; }
387 });
388
389 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
390}
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.
Plain old scalar vector.
Definition vector.h:47
SuperStructure< T, PARTICLETYPE::d > & getSuperStructure()

References addSurface(), assignParallelResolvedParticle(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and prepareParallelResolvedParticle().

+ Here is the call graph for this function:

◆ addResolvedCircle2D() [1/2]

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedCircle2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
Vector< T, 2 > position,
T radius,
T epsilon,
T density = 0.,
Vector< T, 2 > velocity = Vector<T,2>(0.) )

Add resolved circle as new particle with new surface.

Set resolved circle 2D at given index

Definition at line 109 of file particleCreatorFunctions2D.h.

112{
113 //Retrieve new index
114 std::size_t idxParticle = particleSystem.size();
115
116 //Initialize particle address
117 particleSystem.extend();
118
120 setResolvedCircle2D( particleSystem, idxParticle, position, radius, epsilon, density, velocity );
121}
void setResolvedCircle2D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, T radius, T epsilon, T density=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
Set resolved circle for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedCircle2D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedCircle2D() [2/2]

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addResolvedCircle2D ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const Vector< T, 2 > & position,
T radius,
T epsilon,
T density = 0.,
const Vector< T, 2 > & velocity = Vector<T,2> (0.),
const Vector< bool, 2 > & periodicity = Vector<bool,2>(false) )

Definition at line 394 of file particleParallelCreatorFunctions3D.h.

399{
400 //Get circumRadius and set angleInDegree
401 T circumRadius = SmoothIndicatorCircle2D<T,T,true>(
402 Vector<T,2> (0.), radius, epsilon).getCircumRadius();
404 angleInDegree(0.);
405
406 //Get new global particle id
407 std::size_t globID = sParticleSystem.getGlobID();
408
409 //Prepare particle and get list of touching iCs
410 int globiCcentre;
411 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
412 position, circumRadius, epsilon, globiCcentre,
413 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
414 periodicity);
415
416 std::size_t idxSurface = addSurface(sParticleSystem,
417 [&](){
418 return std::make_unique<SmoothIndicatorCircle2D<T, T, true>>(Vector<T,2> (0.), radius, epsilon );
419 });
420
421 //Iterate over particle systems
422 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
423 communication::forSystemsInSuperParticleSystem( sParticleSystem,
424 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
425 //Do for all iCs
426
427 //Assigne resolved particle to iCs specified in setOfICs
428 std::size_t localID=0;
429 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
430 idxSurface, globID, localID, globiCcentre,
431 position, density, angleInDegree, velocity );
432 //Set localID if centre
433 if (globiC==globiCcentre){ localIDcentre=localID; }
434 });
435
436 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
437}
implements a smooth circle in 2D with an _epsilon sector
std::unordered_set< int > prepareParallelResolvedParticle(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, Vector< T, PARTICLETYPE::d > position, T circumRadius, const T epsilon, int &globiCcentre, const T physDeltaX, const Vector< bool, PARTICLETYPE::d > &periodicity)
std::size_t addSurface(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, F createUniqueIndicatorPtr)
Adds surface (SmoothIndicator) to all block particle systems.

References addSurface(), assignParallelResolvedParticle(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and prepareParallelResolvedParticle().

+ Here is the call graph for this function:

◆ addResolvedCone3D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedCone3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
const Vector< T, 3 > & position1,
const Vector< T, 3 > & position2,
T radius1,
T radius2,
T epsilon,
T density = 0,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Add resolved cone as new particle with new surface.

Set resolved cone 3D at given index

Definition at line 233 of file particleCreatorFunctions3D.h.

238{
239 //Retrieve new index
240 std::size_t idxParticle = particleSystem.size();
241
242 //Initialize particle address
243 particleSystem.extend();
244
246 setResolvedCone3D( particleSystem, idxParticle,
247 position1, position2, radius1, radius2, epsilon, density, angleInDegree, velocity );
248}
void setResolvedCone3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position1, const Vector< T, 3 > &position2, T radius1, T radius2, T epsilon, T density=0, const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Set resolved cone for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedCone3D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedCuboid2D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedCuboid2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
Vector< T, 2 > position,
Vector< T, 2 > extend,
T epsilon,
T density = 0.,
T angle = 0.,
Vector< T, 2 > velocity = Vector<T,2> (0.) )

Add resolved cuboid as new particle with new surface.

Set resolved cuboid 2D at given index

Definition at line 155 of file particleCreatorFunctions2D.h.

159{
160 //Retrieve new index
161 std::size_t idxParticle = particleSystem.size();
162
163 //Initialize particle address
164 particleSystem.extend();
165
167 setResolvedCuboid2D( particleSystem, idxParticle, position,
168 extend, epsilon, density, angle, velocity );
169}
void setResolvedCuboid2D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, Vector< T, 2 > extend, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
Set resolved cuboid for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedCuboid2D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedCuboid3D() [1/2]

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedCuboid3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
const Vector< T, 3 > & position,
const Vector< T, 3 > & extend,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Add resolved cuboid as new particle with new surface.

Set resolved cuboid 3D at given index

Definition at line 183 of file particleCreatorFunctions3D.h.

187{
188 //Retrieve new index
189 std::size_t idxParticle = particleSystem.size();
190
191 //Initialize particle address
192 particleSystem.extend();
193
195 setResolvedCuboid3D( particleSystem, idxParticle, position,
196 extend, epsilon, density, angleInDegree, velocity );
197}
void setResolvedCuboid3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, const Vector< T, 3 > &extend, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Set resolved cuboid for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedCuboid3D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedCuboid3D() [2/2]

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addResolvedCuboid3D ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const Vector< T, 3 > & position,
const Vector< T, 3 > & extend,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.),
const Vector< bool, 3 > & periodicity = Vector<bool,3>(false) )

Definition at line 249 of file particleParallelCreatorFunctions3D.h.

256{
257 //Get circumRadius
258 T circumRadius = SmoothIndicatorCuboid3D<T,T,true>(
259 extend[0], extend[1], extend[2], Vector<T,3>(0.), epsilon ).getCircumRadius();
260
261 //Get new global particle id
262 std::size_t globID = sParticleSystem.getGlobID();
263
264 //Prepare particle and get list of touching iCs
265 int globiCcentre;
266 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
267 position, circumRadius, epsilon, globiCcentre,
268 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
269 periodicity);
270
271 std::size_t idxSurface = addSurface(sParticleSystem,
272 [&](){
273 return std::make_unique<SmoothIndicatorCuboid3D<T, T, true>>(
274 extend[0], extend[1], extend[2], Vector<T,3>(0.), epsilon );
275 });
276
277 //Iterate over particle systems
278 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
279 communication::forSystemsInSuperParticleSystem( sParticleSystem,
280 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
281 //Do for all iCs
282
283 //Assigne resolved particle to iCs specified in setOfICs
284 std::size_t localID=0;
285 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
286 idxSurface, globID, localID, globiCcentre,
287 position, density, angleInDegree, velocity );
288 //Set localID if centre
289 if (globiC==globiCcentre){ localIDcentre=localID; }
290 });
291
292 //Return globiC, globID, localiD
293 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
294}
implements a smooth particle cuboid in 3D with an _epsilon sector.

References addSurface(), assignParallelResolvedParticle(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and prepareParallelResolvedParticle().

+ Here is the call graph for this function:

◆ addResolvedCylinder3D() [1/2]

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedCylinder3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
const Vector< T, 3 > & position,
const Vector< T, 3 > & normal,
T height,
T radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Add resolved cylinder as new particle with new surface.

Set resolved cylinder 3D at given index

Definition at line 134 of file particleCreatorFunctions3D.h.

139{
140 //Retrieve new index
141 std::size_t idxParticle = particleSystem.size();
142
143 //Initialize particle address
144 particleSystem.extend();
145
147 setResolvedCylinder3D( particleSystem, idxParticle, position,
148 normal, height, radius, epsilon, density, angleInDegree, velocity );
149}
void setResolvedCylinder3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, const Vector< T, 3 > &normal, T height, T radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Set resolved cylinder for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedCylinder3D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedCylinder3D() [2/2]

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addResolvedCylinder3D ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const Vector< T, 3 > & position,
const Vector< T, 3 > & normal,
T height,
T radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.),
const Vector< bool, 3 > & periodicity = Vector<bool,3>(false) )

Definition at line 298 of file particleParallelCreatorFunctions3D.h.

305{
306 //Get circumRadius and set angleInDegree
307 T circumRadius = SmoothIndicatorCylinder3D<T,T,true>(Vector<T,3>(0.), normal, radius, height, epsilon ).getCircumRadius();
308
309 //Get new global particle id
310 std::size_t globID = sParticleSystem.getGlobID();
311
312 //Prepare particle and get list of touching iCs
313 int globiCcentre;
314 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
315 position, circumRadius, epsilon, globiCcentre,
316 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
317 periodicity);
318
319 std::size_t idxSurface = addSurface(sParticleSystem,
320 [&](){
321 return std::make_unique<SmoothIndicatorCylinder3D<T, T, true>>(
322 Vector<T,3>(0.), normal, radius, height, epsilon );
323 });
324
325 //Iterate over particle systems
326 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
327 communication::forSystemsInSuperParticleSystem( sParticleSystem,
328 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
329 //Do for all iCs
330
331 //Assigne resolved particle to iCs specified in setOfICs
332 std::size_t localID=0;
333 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
334 idxSurface, globID, localID, globiCcentre,
335 position, density, angleInDegree, velocity );
336 //Set localID if centre
337 if (globiC==globiCcentre){ localIDcentre=localID; }
338 });
339
340 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
341}
implements a smooth particle cylinder in 3D with an _epsilon sector.

References addSurface(), assignParallelResolvedParticle(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and prepareParallelResolvedParticle().

+ Here is the call graph for this function:

◆ addResolvedEllipsoid3D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedEllipsoid3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
const Vector< T, 3 > & position,
const Vector< T, 3 > & radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Add resolved ellipsoid as new particle with new surface.

Set resolved ellipsoid 3D at given index

Definition at line 284 of file particleCreatorFunctions3D.h.

290{
291 //Retrieve new index
292 std::size_t idxParticle = particleSystem.size();
293
294 //Initialize particle address
295 particleSystem.extend();
296
298 setResolvedEllipsoid3D( particleSystem, idxParticle, position,
299 radius, epsilon, density, angleInDegree, velocity );
300}
void setResolvedEllipsoid3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, const Vector< T, 3 > &radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Set resolved ellipsoid for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedEllipsoid3D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedObject() [1/3]

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedObject ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxSurface,
const Vector< T, 2 > & position,
T density = 0.,
T angle = 0.,
const Vector< T, 2 > & velocity = Vector<T,2> (0.) )

Add resolved object as new particle with existing surface.

Set resolved object 2D at given index

Definition at line 62 of file particleCreatorFunctions2D.h.

66{
68 addResolvedObject( particleSystem, idxSurface, position, density,
70}
ParallelParticleLocator addResolvedObject(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, std::size_t idxSurface, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.), const Vector< bool, PARTICLETYPE::d > &periodicity=Vector< T, PARTICLETYPE::d >(false))
Converts dimensions by deriving from given cartesian dimension D.

References addResolvedObject().

+ Here is the call graph for this function:

◆ addResolvedObject() [2/3]

template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > olb::particles::creators::addResolvedObject ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxSurface,
const Vector< T, PARTICLETYPE::d > & position,
T density = 0.,
const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > & angleInDegree = Vector<T,utilities::dimensions::convert<PARTICLETYPE::d>::rotation> (0.),
const Vector< T, PARTICLETYPE::d > & velocity = Vector<T,PARTICLETYPE::d> (0.) )

Add resolved object as new particle with existing surface (and return particle object)

Set resolved object 3D at given index

Return new particle object

Definition at line 101 of file particleCreatorHelperFunctions.h.

106{
107 //Retrieve new index
108 std::size_t idxParticle = particleSystem.size();
109
110 //Initialize particle address
111 particleSystem.extend();
112
114 setResolvedObject( particleSystem, idxParticle, idxSurface, position, density, angleInDegree, velocity );
115
117 return particleSystem.get(idxParticle);
118}
auto & get()
Expose container.
void setResolvedObject(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, std::size_t idxSurface, const Vector< T, 2 > &position, T density, T angle, const Vector< T, 2 > &velocity)

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), olb::particles::ParticleSystem< T, PARTICLETYPE >::get(), setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedObject() [3/3]

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addResolvedObject ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
std::size_t idxSurface,
const Vector< T, PARTICLETYPE::d > & position,
T density = 0.,
const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > & angleInDegree = Vector<T,utilities::dimensions::convert<PARTICLETYPE::d>::rotation> (0.),
const Vector< T, PARTICLETYPE::d > & velocity = Vector<T,PARTICLETYPE::d> (0.),
const Vector< bool, PARTICLETYPE::d > & periodicity = Vector<T,PARTICLETYPE::d>(false) )

Definition at line 129 of file particleParallelCreatorFunctions3D.h.

137{
138 //Retrieve circumRadius from smoothIndicator
139 constexpr unsigned D = PARTICLETYPE::d;
140 typedef SmoothIndicatorF<T,T,D,true> SIndicatorBaseType;
141 auto bParticleSystems = sParticleSystem.getBlockParticleSystems();
142 auto& particleSystem = *bParticleSystems[0]; //Use first randomly
143 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
144 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
145 T circumRadius = vectorOfIndicators[idxSurface]->getCircumRadius();
146 //Get new global particle id
147 std::size_t globID = sParticleSystem.getGlobID();
148 //Prepare particle and get list of touching iCs
149 int globiCcentre;
150 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
151 position, circumRadius, vectorOfIndicators[idxSurface].get()->getEpsilon(), globiCcentre,
152 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
153 periodicity);
154
155 //Iterate over particle systems
156 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
157 communication::forSystemsInSuperParticleSystem( sParticleSystem,
158 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
159 //Assigne resolved particle to iCs specified in setOfICs
160 std::size_t localID=0;
161 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
162 idxSurface, globID, localID, globiCcentre,
163 position, density, angleInDegree, velocity );
164 //Set localID if centre
165 if (globiC==globiCcentre){ localIDcentre=localID; }
166 });
167
168 //Return globiC, globID, localiD
169 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
170}
std::vector< ParticleSystem< T, PARTICLETYPE > * > & getBlockParticleSystems()
bool assignParallelResolvedParticle(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::unordered_set< int > &setOfICs, int globiC, std::size_t idxSurface, std::size_t globID, std::size_t &localID, int globiCcentre, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
std::conditional_t< D==2, SmoothIndicatorF2D< T, T, PARTICLE >, SmoothIndicatorF3D< T, T, PARTICLE > > SmoothIndicatorF
Definition aliases.h:278

References assignParallelResolvedParticle(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getBlockParticleSystems(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and prepareParallelResolvedParticle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addResolvedSphere3D() [1/2]

template<typename T , typename PARTICLETYPE , bool IGNORE_WARNINGS = false>
void olb::particles::creators::addResolvedSphere3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
const Vector< T, 3 > & position,
T radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Add resolved sphere as new particle with new surface.

Set resolved sphere 3D at given index

Definition at line 86 of file particleCreatorFunctions3D.h.

89{
90 //Retrieve new index
91 std::size_t idxParticle = particleSystem.size();
92
93 //Initialize particle address
94 particleSystem.extend();
95
97 setResolvedSphere3D<T,PARTICLETYPE,IGNORE_WARNINGS>(
98 particleSystem, idxParticle, position, radius, epsilon, density, velocity );
99}

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addResolvedSphere3D() [2/2]

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addResolvedSphere3D ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const Vector< T, 3 > & position,
T radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & velocity = Vector<T,3> (0.),
const Vector< bool, 3 > & periodicity = Vector<bool,3>(false) )

Definition at line 201 of file particleParallelCreatorFunctions3D.h.

206{
207 //Get circumRadius and set angleInDegree
208 T circumRadius = SmoothIndicatorSphere3D<T,T,true>(
209 Vector<T,3> (0.), radius, epsilon).getCircumRadius();
211 angleInDegree(0.);
212
213 //Get new global particle id
214 std::size_t globID = sParticleSystem.getGlobID();
215
216 //Prepare particle and get list of touching iCs
217 int globiCcentre;
218 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
219 position, circumRadius, epsilon, globiCcentre,
220 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
221 periodicity);
222
223 std::size_t idxSurface = addSurface(sParticleSystem,
224 [&](){
225 return std::make_unique<SmoothIndicatorSphere3D<T, T, true>>(Vector<T,3> (0.), radius, epsilon );
226 });
227
228 //Iterate over particle systems
229 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
230 communication::forSystemsInSuperParticleSystem( sParticleSystem,
231 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
232 //Do for all iCs
233
234 //Assigne resolved particle to iCs specified in setOfICs
235 std::size_t localID=0;
236 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
237 idxSurface, globID, localID, globiCcentre,
238 position, density, angleInDegree, velocity );
239 //Set localID if centre
240 if (globiC==globiCcentre){ localIDcentre=localID; }
241 });
242
243 //Return globiC, globID, localiD
244 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
245}
implements a smooth sphere in 3D with an _epsilon sector

References addSurface(), assignParallelResolvedParticle(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and prepareParallelResolvedParticle().

+ Here is the call graph for this function:

◆ addResolvedTriangle2D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addResolvedTriangle2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
Vector< T, 2 > position,
T radius,
T epsilon,
T density = 0.,
T angle = 0.,
Vector< T, 2 > velocity = Vector<T,2> (0.) )

Add resolved triangle as new particle with new surface.

Set resolved triangle 2D at given index

Definition at line 203 of file particleCreatorFunctions2D.h.

207{
208 //Retrieve new index
209 std::size_t idxParticle = particleSystem.size();
210
211 //Initialize particle address
212 particleSystem.extend();
213
215 setResolvedTriangle2D( particleSystem, idxParticle, position,
216 radius, epsilon, density, angle, velocity );
217}
void setResolvedTriangle2D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 2 > position, T radius, T epsilon, T density=0., T angle=0., Vector< T, 2 > velocity=Vector< T, 2 >(0.))
Set resolved cuboid for existing particle but new surface.

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), setResolvedTriangle2D(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addSubgridObject()

template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > olb::particles::creators::addSubgridObject ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
const Vector< T, PARTICLETYPE::d > & position,
T radius,
T density = 0.,
const Vector< T, PARTICLETYPE::d > & velocity = Vector<T,PARTICLETYPE::d> (0.) )

Add subgrid object as new particle (and return particle object)

Set subgrid object 3D at given index

Return new particle object

Definition at line 168 of file particleCreatorHelperFunctions.h.

172{
173 //Retrieve new index
174 std::size_t idxParticle = particleSystem.size();
175
176 //Initialize particle address
177 particleSystem.extend();
178
180 setSubgridObject( particleSystem, idxParticle, position, radius, density,velocity );
181
183 return particleSystem.get(idxParticle);
184}
Particle< T, PARTICLETYPE > setSubgridObject(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, PARTICLETYPE::d > &position, T radius, T density, const Vector< T, PARTICLETYPE::d > &velocity, T shapeFactor=T{1})
Set new particle (and return particle object)

References olb::particles::ParticleSystem< T, PARTICLETYPE >::extend(), olb::particles::ParticleSystem< T, PARTICLETYPE >::get(), setSubgridObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubgridSphere3D() [1/2]

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::addSubgridSphere3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
const Vector< T, 3 > & position,
T radius,
T density = 0.,
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Definition at line 360 of file particleCreatorFunctions3D.h.

364{
365 addSubgridObject( particleSystem,
366 position, radius, density, velocity );
367}
Particle< T, PARTICLETYPE > addSubgridObject(ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, PARTICLETYPE::d > &position, T radius, T density=0., const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
Add subgrid object as new particle (and return particle object)

References addSubgridObject().

+ Here is the call graph for this function:

◆ addSubgridSphere3D() [2/2]

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addSubgridSphere3D ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const Vector< T, 3 > & position,
T radius,
T density = 0.,
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Definition at line 443 of file particleParallelCreatorFunctions3D.h.

447{
448 using namespace descriptors;
449 //Retrieving cuboid geometry
450 auto& cuboidGeometry = sParticleSystem.getSuperStructure().getCuboidGeometry();
451 //Get global particle id
452 std::size_t globID = sParticleSystem.getGlobID();
453 //Find globiC the particle belongs to
454 int globiCcentre;
455 bool inDomain = cuboidGeometry.getC( position, globiCcentre );
456 if (!inDomain){ std::cerr << "ERROR: Particle added outside domain!" << std::endl; }
457
458 //Iterate over particle systems
459 std::size_t localID=0; //Return localID of particle inside particleSystem holding centre
460 communication::forSystemsInSuperParticleSystem( sParticleSystem,
461 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
462
463 //Do only on residence iC
464 if (globiC == globiCcentre){
465 //Run creator on particleSystem
466 addSubgridObject( particleSystem,
467 position, radius, density, velocity );
468 //Add additional data due to parallization
469 auto particle = particleSystem.get(particleSystem.size()-1);
470 particle.template setField<PARALLELIZATION,ID>( globID );
471 //Set localID
472 localID=particle.getId();
473 }
474 });
475
476 //Return globiC, globID, localiD
477 return ParallelParticleLocator(globiCcentre, globID, localID);
478}

References addSubgridObject(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::particles::ParticleSystem< T, PARTICLETYPE >::get(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubgridSphereWithSpecies3D()

template<typename T , typename PARTICLETYPE >
ParallelParticleLocator olb::particles::creators::addSubgridSphereWithSpecies3D ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
const Vector< T, 3 > & position,
T radius,
T density = 0.,
const Vector< T, 3 > & velocity = Vector<T,3> (0.),
const int species = 0 )

Definition at line 482 of file particleParallelCreatorFunctions3D.h.

487{
488 using namespace descriptors;
489 //Retrieving cuboid geometry
490 auto& cuboidGeometry = sParticleSystem.getSuperStructure().getCuboidGeometry();
491 //Get global particle id
492 std::size_t globID = sParticleSystem.getGlobID();
493 //Find globiC the particle belongs to
494 int globiCcentre;
495 bool inDomain = cuboidGeometry.getC( position, globiCcentre );
496 if (!inDomain){ std::cerr << "ERROR: Particle added outside domain!" << std::endl; }
497
498 //Iterate over particle systems
499 std::size_t localID=0; //Return localID of particle inside particleSystem holding centre
500 communication::forSystemsInSuperParticleSystem( sParticleSystem,
501 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
502
503 //Do only on residence iC
504 if (globiC == globiCcentre){
505 //Run creator on particleSystem
506 addSubgridObject( particleSystem,
507 position, radius, density, velocity );
508 //Add additional data due to parallization
509 auto particle = particleSystem.get(particleSystem.size()-1);
510 particle.template setField<PARALLELIZATION,ID>( globID );
511 //Add species type to particle
512 if constexpr( access::providesSpecies<PARTICLETYPE>() ){
513 particle.template setField<PHYSPROPERTIES,SPECIES>( species );
514 }
515 //Set localID
516 localID=particle.getId();
517 }
518 });
519
520 //Return globiC, globID, localiD
521 return ParallelParticleLocator(globiCcentre, globID, localID);
522}

References addSubgridObject(), olb::particles::communication::forSystemsInSuperParticleSystem(), olb::particles::ParticleSystem< T, PARTICLETYPE >::get(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getGlobID(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ addSurface()

template<typename T , typename PARTICLETYPE , typename F >
std::size_t olb::particles::creators::addSurface ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
F createUniqueIndicatorPtr )

Adds surface (SmoothIndicator) to all block particle systems.

Definition at line 174 of file particleParallelCreatorFunctions3D.h.

176{
177 typedef SmoothIndicatorF<T, T, PARTICLETYPE::d, true> SIndicatorBaseType;
178 std::size_t idxSurface = 0;
179
180 std::vector<olb::particles::ParticleSystem<T, PARTICLETYPE>*>&
181 blockParticleSystems = sParticleSystem.getBlockParticleSystems();
182 // Iteration over each element independent from cuboids to ensure that surfaces are added everywhere
183 // as some blocks may not have a corresponding cuboid
184 for (unsigned i = 0; i < blockParticleSystems.size(); ++i) {
185 auto& particleSystem = *blockParticleSystems[i];
186 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
187 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
188 if(i > 0 && idxSurface != vectorOfIndicators.size()) {
189 std::cerr << "ERROR: Number of particle surfaces don't match." << std::endl;
190 assert(false);
191 }
192 idxSurface = vectorOfIndicators.size();
193 vectorOfIndicators.push_back( createUniqueIndicatorPtr() );
194 }
195
196 return idxSurface;
197}

References olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getBlockParticleSystems().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignParallelResolvedParticle()

template<typename T , typename PARTICLETYPE >
bool olb::particles::creators::assignParallelResolvedParticle ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::unordered_set< int > & setOfICs,
int globiC,
std::size_t idxSurface,
std::size_t globID,
std::size_t & localID,
int globiCcentre,
const Vector< T, PARTICLETYPE::d > & position,
T density = 0.,
const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > & angleInDegree = Vector<T,utilities::dimensions::convert<PARTICLETYPE::d>::rotation> (0.),
const Vector< T, PARTICLETYPE::d > & velocity = Vector<T,PARTICLETYPE::d> (0.) )

Definition at line 102 of file particleParallelCreatorFunctions3D.h.

110{
111 //Check whether asignment needed for globiC
112 bool assigned=false;
113 if( setOfICs.find(globiC) != setOfICs.end() ) {
114 //Attach particle to cuboid with globiC (and retrieve new particle object)
115 auto particle = assignParallelResolvedParticleToiC( particleSystem, idxSurface,
116 globID, globiCcentre, position, density, angleInDegree, velocity );
117 //Declare assignement found
118 assigned=true;
119 //Retrieve localID
120 localID = particle.getId();
121 } //if( std::find() )
122 //Return whether assigned
123 return assigned;
124}
Particle< T, PARTICLETYPE > assignParallelResolvedParticleToiC(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxSurface, std::size_t globID, int globiCcentre, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))

References assignParallelResolvedParticleToiC().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assignParallelResolvedParticleToiC()

template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > olb::particles::creators::assignParallelResolvedParticleToiC ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxSurface,
std::size_t globID,
int globiCcentre,
const Vector< T, PARTICLETYPE::d > & position,
T density = 0.,
const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > & angleInDegree = Vector<T,utilities::dimensions::convert<PARTICLETYPE::d>::rotation> (0.),
const Vector< T, PARTICLETYPE::d > & velocity = Vector<T,PARTICLETYPE::d> (0.) )

Definition at line 79 of file particleParallelCreatorFunctions3D.h.

86{
87 using namespace descriptors;
88 //Add resolved object
89 auto particle = creators::addResolvedObject( particleSystem, idxSurface,
90 position, density, angleInDegree, velocity );
91 //Add additional data due to parallization
92 particle.template setField<PARALLELIZATION,ID>( globID );
93 particle.template setField<PARALLELIZATION,IC>( globiCcentre );
94 particle.template setField<SURFACE,SURFACE_ID>( idxSurface );
95 //Return particle object
96 return particle;
97}

References addResolvedObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calcParticleVolume()

template<typename T , unsigned D>
T olb::particles::creators::calcParticleVolume ( const std::vector< SpawnData< T, D > > & spawnData,
const std::function< T(const std::size_t &)> & getParticleVolume )

Definition at line 57 of file particleCreatorFunctions.h.

60{
61 T particleVolume(0);
62 std::size_t pID(0);
63
64 // Use with C++20:
65 //for(std::size_t pID = 0; [[maybe_unused]] const SpawnData<T,D>& entry : spawnData) {
66 for ([[maybe_unused]] const SpawnData<T, D>& entry : spawnData) {
67 particleVolume += getParticleVolume(pID++);
68 }
69 return particleVolume;
70}
+ Here is the caller graph for this function:

◆ calcParticleVolumeFraction()

template<typename T , unsigned D>
T olb::particles::creators::calcParticleVolumeFraction ( const std::vector< SpawnData< T, D > > & spawnData,
const T fluidVolume,
const std::function< T(const std::size_t &)> & getParticleVolume )

Definition at line 73 of file particleCreatorFunctions.h.

76{
77 return calcParticleVolume(spawnData, getParticleVolume) / fluidVolume;
78}
T calcParticleVolume(const std::vector< SpawnData< T, D > > &spawnData, const std::function< T(const std::size_t &)> &getParticleVolume)

References calcParticleVolume().

+ Here is the call graph for this function:

◆ checkForErrors()

template<typename PARTICLETYPE , bool ROTATION_IS_OPTIONAL = false>
void olb::particles::creators::checkForErrors ( )

Definition at line 36 of file particleCreatorHelperFunctions.h.

37{
38 using namespace descriptors;
39
40 static_assert(ROTATION_IS_OPTIONAL || PARTICLETYPE::template providesNested<SURFACE,ROT_MATRIX>(),
41 "A rotation matrix is necessary but not provided.");
42}

◆ extendSpawnData() [1/3]

template<typename T , unsigned D>
void olb::particles::creators::extendSpawnData ( std::vector< SpawnData< T, D > > & spawnData,
const T wantedParticleVolumeFraction,
IndicatorF< T, D > & fluidDomain,
const T fluidDomainVolume,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMin,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMax,
const std::function< T(const std::size_t &)> & getParticleVolume )

Definition at line 263 of file particleCreatorFunctions.h.

272{
273 constexpr unsigned maxTries = 1e6;
274 const auto getPoints = [&](const PhysR<T, D>& position,
275 const PhysR<T, D>& min, const PhysR<T, D>& max) {
276 std::vector<PhysR<T, D>> points;
277 if constexpr (D == 3) {
278 points.reserve(9);
279 points.push_back(PhysR<T, D>(min[0], min[1], min[2]));
280 points.push_back(PhysR<T, D>(min[0], min[1], max[2]));
281 points.push_back(PhysR<T, D>(min[0], max[1], min[2]));
282 points.push_back(PhysR<T, D>(min[0], max[1], max[2]));
283 points.push_back(PhysR<T, D>(max[0], min[1], max[2]));
284 points.push_back(PhysR<T, D>(max[0], min[1], min[2]));
285 points.push_back(PhysR<T, D>(max[0], max[1], min[2]));
286 points.push_back(PhysR<T, D>(max[0], max[1], max[2]));
287 }
288 else {
289 points.reserve(5);
290 points.push_back(PhysR<T, D>(min[0], min[1]));
291 points.push_back(PhysR<T, D>(min[0], max[1]));
292 points.push_back(PhysR<T, D>(max[0], min[1]));
293 points.push_back(PhysR<T, D>(max[0], max[1]));
294 }
295 points.push_back(position);
296 return points;
297 };
298
299 OstreamManager clout(std::cout, "ParticleSeeding");
300 //Create randomizer
301 util::Randomizer<T> randomizer;
302
303 std::size_t pID = spawnData.size();
304 unsigned count = 0;
305 T currVolumeOfParticles = calcParticleVolume(spawnData, getParticleVolume);
306 bool isPositionValid;
307
308 const Vector<T, D> extent = fluidDomain.getMax() - fluidDomain.getMin();
309
310 while (currVolumeOfParticles / fluidDomainVolume <
311 wantedParticleVolumeFraction &&
312 count < maxTries) {
313 isPositionValid = true;
314
315 // Randomize position
316 PhysR<T, D> randomPosition = randomizer.template generate<PhysR<T, D>>();
317 randomPosition *= extent;
318 randomPosition += fluidDomain.getMin();
319 const std::vector<PhysR<T, D>> pointsToCheck =
320 getPoints(randomPosition, getMin(pID, randomPosition),
321 getMax(pID, randomPosition));
322
323 // check overlap with other particles
324 for (std::size_t iP = 0; iP < spawnData.size(); ++iP) {
325 const PhysR<T, D> min = getMin(iP, spawnData[iP].position);
326 const PhysR<T, D> max = getMax(iP, spawnData[iP].position);
327
328 for (const PhysR<T, D>& point : pointsToCheck) {
329 /*
330 const int count = std::count(cornerPoints.begin(), cornerPoints.end(), corner);
331 if (count > 1) {
332 clout<< "WARNING: Same point was checked twice during the particle seeding";
333 }
334 */
335
336 bool overlap = true;
337 for (unsigned iD = 0; iD < D; ++iD) {
338 overlap = overlap && min[iD] <= point[iD] && max[iD] >= point[iD];
339 }
340 if (overlap) {
341 isPositionValid = false;
342 break;
343 }
344 }
345
346 if (!isPositionValid) {
347 break;
348 }
349 }
350 if (!isPositionValid) {
351 ++count;
352 continue;
353 }
354
355 // check overlap with boundaries (should work for convex geometries)
356 // for better results an iteration over the whole volume could be added
357 for (const PhysR<T, D>& point : pointsToCheck) {
358 bool isInside;
359 fluidDomain(&isInside, point.data());
360 if (!isInside) {
361 isPositionValid = false;
362 break;
363 }
364 }
365
366 if (isPositionValid) {
367 spawnData.push_back(SpawnData<T, D>(
368 randomPosition,
369 Vector<T, utilities::dimensions::convert<D>::rotation>(T {0.})));
370 count = 0;
371 currVolumeOfParticles += getParticleVolume(pID++);
372 }
373 else {
374 ++count;
375 }
376 }
377 if (count >= maxTries) {
378 clout << "WARNING: Could not set a particle volume fraction of "
379 << wantedParticleVolumeFraction
380 << ", only a particle volume fraction of "
381 << currVolumeOfParticles / fluidDomainVolume << " was possible."
382 << std::endl;
383 }
384
385 return;
386}

References calcParticleVolume().

+ Here is the call graph for this function:

◆ extendSpawnData() [2/3]

template<typename T , unsigned D>
void olb::particles::creators::extendSpawnData ( std::vector< SpawnData< T, D > > & spawnData,
const T wantedParticleVolumeFraction,
IndicatorF< T, D > & fluidDomain,
const T fluidDomainVolume,
const std::function< T(const std::size_t &)> & getCircumRadius,
const std::function< T(const std::size_t &)> & getParticleVolume )

Definition at line 81 of file particleCreatorFunctions.h.

87{
88 constexpr unsigned maxTries = 1e6;
89
90 OstreamManager clout(std::cout, "ParticleSeeding");
91 //Create randomizer
92 util::Randomizer<T> randomizer;
93
94 std::size_t pID = spawnData.size();
95 unsigned count = 0;
96 T currVolumeOfParticles = calcParticleVolume(spawnData, getParticleVolume);
97 bool isPositionValid;
98
99 const Vector<T, D> extent = fluidDomain.getMax() - fluidDomain.getMin();
100
101 while (currVolumeOfParticles / fluidDomainVolume <
102 wantedParticleVolumeFraction &&
103 count < maxTries) {
104 const T circumRadius = getCircumRadius(pID);
105 isPositionValid = true;
106
107 // Randomize position
108 PhysR<T, D> randomPosition = randomizer.template generate<PhysR<T, D>>();
109 randomPosition *= extent;
110 randomPosition += fluidDomain.getMin();
111
112 // check overlap with other particles
113 std::size_t i = 0;
114 for (const SpawnData<T, D>& entry : spawnData) {
115 const T distanceCenterOfMass = norm(entry.position - randomPosition);
116 if (distanceCenterOfMass <= circumRadius + getCircumRadius(i++)) {
117 ++count;
118 isPositionValid = false;
119 break;
120 }
121 }
122 if (!isPositionValid) {
123 continue;
124 }
125
126 // check overlap with boundaries (should work for convex geometries)
127 // for better results an iteration over the whole volume could be added
128 auto pointsOnHull = particles::discrete_points_on_hull::calculate(
129 randomPosition, circumRadius);
130 for (const PhysR<T, D>& pointOnHull : pointsOnHull) {
131 bool isInside;
132 fluidDomain(&isInside, pointOnHull.data());
133 if (!isInside) {
134 isPositionValid = false;
135 break;
136 }
137 }
138
139 if (isPositionValid) {
140 spawnData.push_back(SpawnData<T, D>(
141 randomPosition,
142 Vector<T, utilities::dimensions::convert<D>::rotation>(T {0})));
143 count = 0;
144 currVolumeOfParticles += getParticleVolume(pID++);
145 }
146 else {
147 ++count;
148 }
149 }
150 if (count >= maxTries) {
151 clout << "WARNING: Could not set a particle volume fraction of "
152 << wantedParticleVolumeFraction
153 << ", only a particle volume fraction of "
154 << currVolumeOfParticles / fluidDomainVolume << " was possible."
155 << std::endl;
156 }
157
158 return;
159}
class for marking output with some text
constexpr T norm(const ScalarVector< T, D, IMPL > &a)
Euclidean vector norm.

References calcParticleVolume(), olb::particles::discrete_points_on_hull::calculate(), and olb::norm().

+ Here is the call graph for this function:

◆ extendSpawnData() [3/3]

template<typename T , unsigned D>
void olb::particles::creators::extendSpawnData ( std::vector< SpawnData< T, D > > & spawnData,
const T wantedParticleVolumeFraction,
IndicatorF< T, D > & fluidDomain,
const T fluidDomainVolume,
const T deltaX,
const T contactDetectionDistance,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMin,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMax,
const std::function< T(const std::size_t &, const SpawnData< T, D > &, const PhysR< T, D > &)> & signedDistanceToParticle,
const std::function< T(const std::size_t &)> & getParticleVolume )

Definition at line 411 of file particleCreatorFunctions.h.

422{
423 OstreamManager clout(std::cout, "ParticleSeeding");
424 constexpr unsigned maxTries = 1e6;
425
426 //Create randomizer
427 util::Randomizer<T> randomizer;
428
429 std::size_t pID = spawnData.size();
430 unsigned count = 0;
431 T currVolumeOfParticles = calcParticleVolume(spawnData, getParticleVolume);
432
433 const Vector<T, D> extent = fluidDomain.getMax() - fluidDomain.getMin();
434
435 while (currVolumeOfParticles / fluidDomainVolume <
436 wantedParticleVolumeFraction &&
437 count < maxTries) {
438 bool isPositionValid = true;
439
440 // Randomize position
441 PhysR<T, D> randomPosition = randomizer.template generate<PhysR<T, D>>();
442 randomPosition *= extent;
443 randomPosition += fluidDomain.getMin();
444
445 const PhysR<T, D> min = getMin(pID, randomPosition);
446 const PhysR<T, D> max = getMax(pID, randomPosition);
447 Vector<int, D> start;
448 Vector<int, D> end;
449 for (unsigned iD = 0; iD < D; ++iD) {
450 start[iD] = util::floor(min[iD] / deltaX);
451 end[iD] = util::ceil(max[iD] / deltaX);
452 }
453
454 const auto evalCurrentPosition = [&](const Vector<int, D>& pos,
455 bool& breakLoop) {
456 const PhysR<T, D> physPos = deltaX * pos;
457 if (signedDistanceToParticle(
458 pID,
459 SpawnData<T, D>(
460 randomPosition,
462 T {0.})),
463 physPos) < contactDetectionDistance) {
464
465 // Check wall intersection
466 if (fluidDomain.signedDistance(physPos) > -contactDetectionDistance) {
467 breakLoop = true;
468 isPositionValid = false;
469 return;
470 }
471
472 // Check intersection with particles
473 for (std::size_t i = 0; i < spawnData.size(); ++i) {
474 if (signedDistanceToParticle(i, spawnData[i], physPos) <
475 contactDetectionDistance) {
476 breakLoop = true;
477 isPositionValid = false;
478 return;
479 }
480 }
481 }
482 };
483
484 particles::contact::forEachPositionWithBreak(start, end,
485 evalCurrentPosition);
486
487 if (!isPositionValid) {
488 ++count;
489 }
490 else {
491 spawnData.push_back(SpawnData<T, D>(
492 randomPosition,
493 Vector<T, utilities::dimensions::convert<D>::rotation>(T {0})));
494 currVolumeOfParticles += getParticleVolume(pID++);
495 count = 0;
496 }
497 }
498
499 if (count >= maxTries) {
500 clout << "WARNING: Could not set a particle volume fraction of "
501 << wantedParticleVolumeFraction
502 << ", only a particle volume fraction of "
503 << currVolumeOfParticles / fluidDomainVolume << " was possible."
504 << std::endl;
505 }
506
507 return;
508}

References calcParticleVolume(), olb::util::ceil(), olb::util::floor(), and olb::particles::contact::forEachPositionWithBreak().

+ Here is the call graph for this function:

◆ prepareParallelResolvedParticle()

template<typename T , typename PARTICLETYPE >
std::unordered_set< int > olb::particles::creators::prepareParallelResolvedParticle ( SuperParticleSystem< T, PARTICLETYPE > & sParticleSystem,
Vector< T, PARTICLETYPE::d > position,
T circumRadius,
const T epsilon,
int & globiCcentre,
const T physDeltaX,
const Vector< bool, PARTICLETYPE::d > & periodicity )

Definition at line 46 of file particleParallelCreatorFunctions3D.h.

51{
52 //Retrieving cuboid geometry
53 auto& cuboidGeometry = sParticleSystem.getSuperStructure().getCuboidGeometry();
54 //Find globiC of particle centre
55 const bool inDomain = particles::communication::getCuboid(
56 cuboidGeometry, periodicity, position, globiCcentre);
57 //TODO: add error handling, when !inDomain
58 if (!inDomain){
59 std::cerr << "ERROR: Particle added outside domain!" << std::endl;
60 }
61 if constexpr (access::providesContactMaterial<PARTICLETYPE>()) {
62 // without particle enlargement for contact, since it is 0 at the time of creation
63 const T detectionDistance = T{0.5} * util::sqrt(PARTICLETYPE::d) * physDeltaX;
64 const T halfEpsilon = T{0.5} * epsilon;
65 circumRadius = circumRadius - halfEpsilon + util::max(halfEpsilon, detectionDistance);
66 }
67 sParticleSystem.updateOffsetFromCircumRadius(circumRadius);
68 //Find globiCs touching the surface hull
69 std::unordered_set<int> setOfICs = communication::getSurfaceTouchingICs( sParticleSystem,
70 position, circumRadius, periodicity, globiCcentre );
71 //Add globiCcentre to list
72 setOfICs.insert(globiCcentre);
73 //Return list of iCs
74 return setOfICs;
75}

References olb::particles::communication::getCuboid(), olb::SuperStructure< T, D >::getCuboidGeometry(), olb::particles::SuperParticleSystem< T, PARTICLETYPE >::getSuperStructure(), olb::particles::communication::getSurfaceTouchingICs(), olb::util::max(), olb::util::sqrt(), and olb::particles::SuperParticleSystem< T, PARTICLETYPE >::updateOffsetFromCircumRadius().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readParticlePositions()

std::vector< std::vector< std::string > > olb::particles::creators::readParticlePositions ( const std::string & filename)

Definition at line 183 of file particleCreatorFunctions.h.

184{
185 std::vector<std::vector<std::string>> content;
186 std::vector<std::string> row;
187 std::string line, word;
188
189 std::fstream file(filename, std::ios::in);
190 if (file.is_open()) {
191 while (getline(file, line)) {
192 row.clear();
193
194 std::stringstream str(line);
195
196 while (getline(str, word, ';')) {
197 row.push_back(word);
198 }
199 content.push_back(row);
200 }
201 }
202 else {
203 std::cerr << "Could not open the file " << filename << std::endl;
204 }
205
206 return content;
207}
+ Here is the caller graph for this function:

◆ saveParticlePositions()

template<typename T , unsigned D>
void olb::particles::creators::saveParticlePositions ( const std::string & filename,
const std::vector< SpawnData< T, D > > & spawnData,
const std::function< std::string(const std::size_t &)> & evalIdentifier )

Definition at line 210 of file particleCreatorFunctions.h.

213{
214 std::ofstream file;
215 file.open(filename.c_str(), std::ios::trunc);
216 std::size_t pID = 0;
217 for (const SpawnData<T, D>& entry : spawnData) {
218 for (unsigned iD = 0; iD < D; ++iD) {
219 file << std::setprecision(16) << entry.position[iD] << ';';
220 }
221 for (unsigned iD = 0; iD < utilities::dimensions::convert<D>::rotation;
222 ++iD) {
223 file << std::setprecision(16) << entry.angleInDegree[iD] << ';';
224 }
225 file << evalIdentifier(pID++) << std::endl;
226 }
227 file.close();
228}
+ Here is the caller graph for this function:

◆ saveUpdatedParticlePositions()

template<typename T , typename PARTICLETYPE >
std::vector< SpawnData< T, PARTICLETYPE::d > > olb::particles::creators::saveUpdatedParticlePositions ( const std::string & filename,
const std::vector< SpawnData< T, PARTICLETYPE::d > > & originalSpawnData,
const std::function< std::string(const std::size_t &)> & evalIdentifier,
XParticleSystem< T, PARTICLETYPE > & particleSystem,
MPI_Comm particleCreatorComm = MPI_COMM_WORLD )

Definition at line 650 of file particleCreatorFunctions.h.

660{
661 std::vector<SpawnData<T, PARTICLETYPE::d>> spawnData =
662 updateParticlePositions<T, PARTICLETYPE>(originalSpawnData, particleSystem
663#ifdef PARALLEL_MODE_MPI
664 ,
665 particleCreatorComm
666#endif
667 );
668 saveParticlePositions(filename, spawnData, evalIdentifier);
669 return spawnData;
670}
void saveParticlePositions(const std::string &filename, const std::vector< SpawnData< T, D > > &spawnData, const std::function< std::string(const std::size_t &)> &evalIdentifier)

References saveParticlePositions().

+ Here is the call graph for this function:

◆ setParticles() [1/4]

template<typename T , unsigned D>
std::vector< SpawnData< T, D > > olb::particles::creators::setParticles ( const std::string & filename,
const T wantedParticleVolumeFraction,
IndicatorF< T, D > & fluidDomain,
const T fluidDomainVolume,
const std::function< T(const std::size_t &)> & getParticleVolume,
const std::function< void(const SpawnData< T, D > &, const std::string &)> createParticle )

Definition at line 231 of file particleCreatorFunctions.h.

237{
238 std::vector<SpawnData<T, D>> spawnData;
239 std::vector<std::vector<std::string>> filecontent =
240 particles::creators::readParticlePositions(filename);
241 for (const std::vector<std::string>& line : filecontent) {
242 PhysR<T, D> particlePosition;
244 unsigned iD = 0;
245 for (; iD < D; ++iD) {
246 particlePosition[iD] = std::stod(line[iD]);
247 }
248 for (; iD < (D + utilities::dimensions::convert<D>::rotation); ++iD) {
249 particleAngle[iD - D] = std::stod(line[iD]);
250 }
251 SpawnData<T, D> tmpSpawnData(particlePosition, particleAngle);
252 spawnData.push_back(tmpSpawnData);
253 createParticle(tmpSpawnData, line[iD]);
254 }
255
256 return spawnData;
257}

References readParticlePositions().

+ Here is the call graph for this function:

◆ setParticles() [2/4]

template<typename T , unsigned D>
std::vector< SpawnData< T, D > > olb::particles::creators::setParticles ( const T wantedParticleVolumeFraction,
IndicatorF< T, D > & fluidDomain,
const T fluidDomainVolume,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMin,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMax,
const std::function< T(const std::size_t &)> & getParticleVolume,
const std::function< void(const SpawnData< T, D > &, const std::size_t &)> createParticle )

Definition at line 389 of file particleCreatorFunctions.h.

399{
400 std::vector<SpawnData<T, D>> spawnData;
401 extendSpawnData<T, D>(spawnData, wantedParticleVolumeFraction, fluidDomain,
402 fluidDomainVolume, getMin, getMax, getParticleVolume);
403
404 for (std::size_t pID = 0; pID < spawnData.size(); ++pID) {
405 createParticle(spawnData[pID], pID);
406 }
407 return spawnData;
408}

◆ setParticles() [3/4]

template<typename T , unsigned D>
std::vector< SpawnData< T, D > > olb::particles::creators::setParticles ( const T wantedParticleVolumeFraction,
IndicatorF< T, D > & fluidDomain,
const T fluidDomainVolume,
const std::function< T(const std::size_t &)> & getCircumRadius,
const std::function< T(const std::size_t &)> & getParticleVolume,
const std::function< void(const SpawnData< T, D > &, const std::size_t &)> createParticle )

Definition at line 162 of file particleCreatorFunctions.h.

169{
170 std::vector<SpawnData<T, D>> spawnData;
171 extendSpawnData<T, D>(spawnData, wantedParticleVolumeFraction, fluidDomain,
172 fluidDomainVolume, getCircumRadius, getParticleVolume);
173
174 std::size_t pID = 0;
175 for (const SpawnData<T, D>& entry : spawnData) {
176 createParticle(entry, pID++);
177 }
178
179 return spawnData;
180}

◆ setParticles() [4/4]

template<typename T , unsigned D>
std::vector< SpawnData< T, D > > olb::particles::creators::setParticles ( const T wantedParticleVolumeFraction,
IndicatorF< T, D > & fluidDomain,
const T fluidDomainVolume,
const T deltaX,
const T contactDetectionDistance,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMin,
const std::function< PhysR< T, D >(const std::size_t &, const PhysR< T, D > &)> & getMax,
const std::function< T(const std::size_t &, const SpawnData< T, D > &, const PhysR< T, D > &)> & signedDistanceToParticle,
const std::function< T(const std::size_t &)> & getParticleVolume,
const std::function< void(const SpawnData< T, D > &, const std::size_t &)> createParticle )

Definition at line 511 of file particleCreatorFunctions.h.

524{
525 std::vector<SpawnData<T, D>> spawnData;
526 extendSpawnData<T, D>(spawnData, wantedParticleVolumeFraction, fluidDomain,
527 fluidDomainVolume, deltaX, contactDetectionDistance,
528 getMin, getMax, signedDistanceToParticle,
529 getParticleVolume);
530
531 for (std::size_t pID = 0; pID < spawnData.size(); ++pID) {
532 createParticle(spawnData[pID], pID);
533 }
534 return spawnData;
535}

◆ setResolvedArbitraryShape2D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedArbitraryShape2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
Vector< T, 2 > position,
T latticeSpacing,
std::shared_ptr< IndicatorF2D< T > > indPtr,
T epsilon,
T density = 0.,
T angle = 0.,
Vector< T, 2 > velocity = Vector<T,2> (0.) )

Set resolved cuboid for existing particle but new surface.

Set resolved arbitrary shape with given suface

Definition at line 224 of file particleCreatorFunctions2D.h.

231{
232 using namespace descriptors;
233 typedef SmoothIndicatorF2D<T, T, true> SIndicatorBaseType;
234
235 //Create SmoothIndicator
236 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
237 new SmoothIndicatorCustom2D<T, T, true>(latticeSpacing, indPtr, Vector<T,2> (0.), epsilon, 0.));
238
239 //Pass smart pointer to particleSystem
240 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
241 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
242 std::size_t idxSurface = vectorOfIndicators.size();
243 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
244
246 setResolvedObject(particleSystem, idxParticle, idxSurface,
247 position, density, angle, velocity);
248}

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedArbitraryShape3D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedArbitraryShape3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
Vector< T, 3 > position,
T latticeSpacing,
std::shared_ptr< IndicatorF3D< T > > indPtr,
T epsilon,
T density = 0.,
Vector< T, 3 > angleInDegree = Vector<T,3> (0.),
Vector< T, 3 > velocity = Vector<T,3> (0.) )

Set resolved cuboid for existing particle but new surface.

Set resolved arbitrary shape with given suface

Definition at line 307 of file particleCreatorFunctions3D.h.

315{
316 using namespace descriptors;
317 typedef SmoothIndicatorF3D<T, T, true> SIndicatorBaseType;
318
319 //Create SmoothIndicator
320 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
321 new SmoothIndicatorCustom3D<T, T, true>(latticeSpacing, indPtr, Vector<T,3> (0.), epsilon, Vector<T,3> (0.)));
322
323 //Pass smart pointer to particleSystem
324 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
325 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
326 std::size_t idxSurface = vectorOfIndicators.size();
327 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
328
330 setResolvedObject(particleSystem, idxParticle, idxSurface,
331 position, density, angleInDegree, velocity);
332}

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedCircle2D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedCircle2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
Vector< T, 2 > position,
T radius,
T epsilon,
T density = 0.,
Vector< T, 2 > velocity = Vector<T,2>(0.) )

Set resolved circle for existing particle but new surface.

Set resolved circle 2D with given suface

Definition at line 77 of file particleCreatorFunctions2D.h.

82{
83 using namespace descriptors;
84 typedef SmoothIndicatorF2D<T, T, true> SIndicatorBaseType;
85
86 //Create SmoothIndicator
87 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
88 new SmoothIndicatorCircle2D<T, T, true>(Vector<T,2>(0.), radius, epsilon ));
89
90 //Pass smart pointer to particleSystem
91 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
92 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
93 std::size_t idxSurface = vectorOfIndicators.size();
94 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
95
96 // Safety mechanism for wrong particle type - It is better not to use rotation matrix!
97 if constexpr ( PARTICLETYPE::template providesNested<SURFACE,ROT_MATRIX>() ) {
98 OstreamManager clout(std::cout, "creatorCircle2D");
99 clout << "WARNING: A rotation matrix is provided but is not necessary for a circle." << std::endl;
100 }
101
103 setResolvedObject<T,PARTICLETYPE,true>(particleSystem, idxParticle, idxSurface,
104 position, density, 0., velocity);
105}

References olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedCone3D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedCone3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
const Vector< T, 3 > & position1,
const Vector< T, 3 > & position2,
T radius1,
T radius2,
T epsilon,
T density = 0,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Set resolved cone for existing particle but new surface.

Set resolved cone 3D with given suface

Definition at line 204 of file particleCreatorFunctions3D.h.

210{
211 using namespace descriptors;
212 typedef SmoothIndicatorF3D<T, T, true> SIndicatorBaseType;
213
214 //Create SmoothIndicator
215 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
216 new SmoothIndicatorCone3D<T, T, true>(position1, position2, radius1, radius2, epsilon ));
217
218 //Pass smart pointer to particleSystem
219 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
220 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
221 std::size_t idxSurface = vectorOfIndicators.size();
222 const Vector<T,3> position = sIndicatorPtr->calcCenterOfMass();
223 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
224
226 setResolvedObject(particleSystem, idxParticle, idxSurface,
227 position, density, angleInDegree, velocity);
228}
implements a smooth particle cone in 3D with an _epsilon sector

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedCuboid2D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedCuboid2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
Vector< T, 2 > position,
Vector< T, 2 > extend,
T epsilon,
T density = 0.,
T angle = 0.,
Vector< T, 2 > velocity = Vector<T,2> (0.) )

Set resolved cuboid for existing particle but new surface.

Set resolved cuboid 3D with given suface

Definition at line 128 of file particleCreatorFunctions2D.h.

133{
134 using namespace descriptors;
135 typedef SmoothIndicatorF2D<T, T, true> SIndicatorBaseType;
136
137 //Create SmoothIndicator
138 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
139 new SmoothIndicatorCuboid2D<T, T, true>(Vector<T,2>(0.), extend[0], extend[1], epsilon ));
140
141 //Pass smart pointer to particleSystem
142 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
143 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
144 std::size_t idxSurface = vectorOfIndicators.size();
145 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
146
148 setResolvedObject(particleSystem, idxParticle, idxSurface,
149 position, density, angle, velocity);
150}
implements a smooth cuboid in 2D with an _epsilon sector.

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedCuboid3D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedCuboid3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
const Vector< T, 3 > & position,
const Vector< T, 3 > & extend,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Set resolved cuboid for existing particle but new surface.

Set resolved cuboid 3D with given suface

Definition at line 156 of file particleCreatorFunctions3D.h.

161{
162 using namespace descriptors;
163 typedef SmoothIndicatorF3D<T, T, true> SIndicatorBaseType;
164
165 //Create SmoothIndicator
166 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
167 new SmoothIndicatorCuboid3D<T, T, true>(extend[0], extend[1], extend[2], Vector<T,3>(0.), epsilon ));
168
169 //Pass smart pointer to particleSystem
170 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
171 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
172 std::size_t idxSurface = vectorOfIndicators.size();
173 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
174
176 setResolvedObject(particleSystem, idxParticle, idxSurface,
177 position, density, angleInDegree, velocity);
178}

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedCylinder3D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedCylinder3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
const Vector< T, 3 > & position,
const Vector< T, 3 > & normal,
T height,
T radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Set resolved cylinder for existing particle but new surface.

Set resolved cylinder 3D with given suface

Definition at line 106 of file particleCreatorFunctions3D.h.

113{
114 using namespace descriptors;
115 typedef SmoothIndicatorF3D<T, T, true> SIndicatorBaseType;
116
117 //Create SmoothIndicator
118 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
119 new SmoothIndicatorCylinder3D<T, T, true>(Vector<T,3>(0.), normal, radius, height, epsilon ));
120
121 //Pass smart pointer to particleSystem
122 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
123 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
124 std::size_t idxSurface = vectorOfIndicators.size();
125 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
126
128 setResolvedObject(particleSystem, idxParticle, idxSurface,
129 position, density, angleInDegree, velocity);
130}

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedEllipsoid3D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedEllipsoid3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
const Vector< T, 3 > & position,
const Vector< T, 3 > & radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & angleInDegree = Vector<T,3> (0.),
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Set resolved ellipsoid for existing particle but new surface.

Set resolved ellipsoid 3D with given suface

Definition at line 255 of file particleCreatorFunctions3D.h.

262{
263 using namespace descriptors;
264 typedef SmoothIndicatorF3D<T, T, true> SIndicatorBaseType;
265
266 //Create SmoothIndicator
267 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
268 new SmoothIndicatorEllipsoid3D<T, T, true>(Vector<T,3>(0.), radius, epsilon, Vector<T,3>(0.) ));
269
270 //Pass smart pointer to particleSystem
271 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
272 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
273 std::size_t idxSurface = vectorOfIndicators.size();
274 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
275
277 setResolvedObject(particleSystem, idxParticle, idxSurface,
278 position, density, angleInDegree, velocity);
279}
implements a smooth particle ellipsoid in 3D with an _epsilon sector.

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setResolvedObject() [1/2]

template<typename T , typename PARTICLETYPE , bool ROTATION_IS_OPTIONAL = false>
void olb::particles::creators::setResolvedObject ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
std::size_t idxSurface,
const Vector< T, 2 > & position,
T density,
T angle,
const Vector< T, 2 > & velocity )

Definition at line 50 of file particleCreatorFunctions2D.h.

55{
56 setResolvedObject<T,PARTICLETYPE,ROTATION_IS_OPTIONAL>( particleSystem, idxParticle, idxSurface, position, density,
58}
+ Here is the caller graph for this function:

◆ setResolvedObject() [2/2]

template<typename T , typename PARTICLETYPE , bool ROTATION_IS_OPTIONAL = false>
Particle< T, PARTICLETYPE > olb::particles::creators::setResolvedObject ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
std::size_t idxSurface,
const Vector< T, PARTICLETYPE::d > & position,
T density,
Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > angleInDegree,
const Vector< T, PARTICLETYPE::d > & velocity )

Set new particle for existing surface (and return particle object)

Return new particle object

Definition at line 46 of file particleCreatorHelperFunctions.h.

53{
54 particles::creators::checkForErrors<PARTICLETYPE,ROTATION_IS_OPTIONAL>();
55
56 using namespace descriptors;
57 constexpr unsigned D = PARTICLETYPE::d;
58 typedef SmoothIndicatorF<T,T,D,true> SIndicatorBaseType;
59
60 //Retrieve smart pointer from particleSystem
61 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
62 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
63 auto sIndicatorPtr = vectorOfIndicators.at( idxSurface ).get();
64
65 //Initialize fields (Seems to be necessary for clang-1000.10.44.4 but not for gcc)
66 dynamics::initializeParticle<T,PARTICLETYPE>(particleSystem.get().data(), idxParticle);
67
68 //Calculate moment of inertia and mass
70 if constexpr(D==3) {
71 for (unsigned iD=0; iD<D; ++iD) {
72 momentOfInertia[iD] = sIndicatorPtr->calcMofiAndMass(density)[iD];
73 }
74 }
75 else {
76 momentOfInertia[0] = sIndicatorPtr->calcMofiAndMass(density)[0];
77 }
78
79 //Set values
80 auto particle = particleSystem.get( idxParticle );
81 particle.template setField<GENERAL,POSITION>( position );
82 particle.template setField<SURFACE,SINDICATOR>( sIndicatorPtr );
83 access::setDensity(particle, density);
84 particle.template setField<MOBILITY,VELOCITY>( velocity );
85 particle.template setField<PHYSPROPERTIES,MOFI>( utilities::dimensions::convert<D>::serialize_rotation(momentOfInertia) );
86
87 auto angle = util::degreeToRadian(angleInDegree);
88 particle.template setField<SURFACE,ANGLE>( utilities::dimensions::convert<D>::serialize_rotation(angle) );
89 if constexpr ( PARTICLETYPE::template providesNested<SURFACE,ROT_MATRIX>() ) {
90 const Vector<T,utilities::dimensions::convert<D>::matrix> rotationMatrix = util::calculateRotationMatrix<T,D>(
91 utilities::dimensions::convert<D>::serialize_rotation(angle) );
92 particle.template setField<SURFACE,ROT_MATRIX>( rotationMatrix );
93 }
94
96 return particle;
97}

References olb::util::degreeToRadian(), olb::particles::ParticleSystem< T, PARTICLETYPE >::get(), and olb::particles::access::setDensity().

+ Here is the call graph for this function:

◆ setResolvedSphere3D()

template<typename T , typename PARTICLETYPE , bool IGNORE_WARNINGS = false>
void olb::particles::creators::setResolvedSphere3D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
const Vector< T, 3 > & position,
T radius,
T epsilon,
T density = 0.,
const Vector< T, 3 > & velocity = Vector<T,3> (0.) )

Set resolved sphere for existing particle but new surface.

Set resolved sphere 3D with given suface

Definition at line 53 of file particleCreatorFunctions3D.h.

58{
59 using namespace descriptors;
60 typedef SmoothIndicatorF3D<T, T, true> SIndicatorBaseType;
61
62 //Create SmoothIndicator
63 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
64 new SmoothIndicatorSphere3D<T, T, true>(Vector<T,3> (0.), radius, epsilon ));
65
66 //Pass smart pointer to particleSystem
67 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
68 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
69 std::size_t idxSurface = vectorOfIndicators.size();
70 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
71
72 // Safety mechanism for wrong particle type - It is better not to use rotation matrix!
73 if constexpr ( PARTICLETYPE::template providesNested<SURFACE,ROT_MATRIX>()
74 && !IGNORE_WARNINGS ) {
75 OstreamManager clout(std::cout, "creatorSphere3D");
76 clout << "WARNING: A rotation matrix is provided but is not necessary for a sphere." << std::endl;
77 }
78
80 setResolvedObject<T,PARTICLETYPE,true>(particleSystem, idxParticle, idxSurface,
81 position, density, Vector<T,3>(0.), velocity);
82}

References olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:

◆ setResolvedTriangle2D()

template<typename T , typename PARTICLETYPE >
void olb::particles::creators::setResolvedTriangle2D ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
Vector< T, 2 > position,
T radius,
T epsilon,
T density = 0.,
T angle = 0.,
Vector< T, 2 > velocity = Vector<T,2> (0.) )

Set resolved cuboid for existing particle but new surface.

Set resolved triangle 2D with given suface

Definition at line 176 of file particleCreatorFunctions2D.h.

181{
182 using namespace descriptors;
183 typedef SmoothIndicatorF2D<T, T, true> SIndicatorBaseType;
184
185 //Create SmoothIndicator
186 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
187 new SmoothIndicatorTriangle2D<T, T, true>(Vector<T,2>(0.), radius, epsilon ));
188
189 //Pass smart pointer to particleSystem
190 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
191 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
192 std::size_t idxSurface = vectorOfIndicators.size();
193 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
194
196 setResolvedObject(particleSystem, idxParticle, idxSurface,
197 position, density, angle, velocity);
198}
implements a smooth triangle in 2D with an _epsilon sector

References setResolvedObject(), and olb::particles::ParticleSystem< T, PARTICLETYPE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSubgridObject()

template<typename T , typename PARTICLETYPE >
Particle< T, PARTICLETYPE > olb::particles::creators::setSubgridObject ( ParticleSystem< T, PARTICLETYPE > & particleSystem,
std::size_t idxParticle,
const Vector< T, PARTICLETYPE::d > & position,
T radius,
T density,
const Vector< T, PARTICLETYPE::d > & velocity,
T shapeFactor = T{1} )

Set new particle (and return particle object)

Return new particle object

Definition at line 125 of file particleCreatorHelperFunctions.h.

131 {1})
132{
133 using namespace descriptors;
134 using namespace access;
135 constexpr unsigned D = PARTICLETYPE::d;
137
138 //Initialize fields (Seems to be necessary for clang-1000.10.44.4 but not for gcc)
139 particles::dynamics::initializeParticle<T,PARTICLETYPE>(
140 particleSystem.get().data(), idxParticle);
141
142 //Set values
143 auto particle = particleSystem.get( idxParticle );
144 particle.template setField<GENERAL,POSITION>( position );
145 particle.template setField<MOBILITY,VELOCITY>( velocity );
146 particle.template setField<PHYSPROPERTIES,RADIUS>( radius );
147 access::setDensity(particle, density, shapeFactor);
148
149 //Calculate moment of inertia and mass
150 Vector<T,Drot> momentOfInertia;
151 T mass = access::getMass(particle, shapeFactor);
152
153 //Calculate moment of inertia and mass
154 if constexpr(D==3) {
155 momentOfInertia = Vector<T,Drot>(2./5.*mass*radius*radius);
156 } else {
157 momentOfInertia[0] = 0.5*mass*radius*radius;
158 }
159
160 particle.template setField<PHYSPROPERTIES,MOFI>( utilities::dimensions::convert<D>::serialize_rotation(momentOfInertia) );
161
163 return particle;
164}
+ Here is the caller graph for this function:

◆ updateParticlePositions()

template<typename T , typename PARTICLETYPE >
std::vector< SpawnData< T, PARTICLETYPE::d > > olb::particles::creators::updateParticlePositions ( std::vector< SpawnData< T, PARTICLETYPE::d > > spawnData,
XParticleSystem< T, PARTICLETYPE > & particleSystem,
MPI_Comm particleCreatorComm = MPI_COMM_WORLD )

Updates particle positions so that they can be easily written to a txt file with the function above.

Definition at line 541 of file particleCreatorFunctions.h.

548{
549 using namespace descriptors;
550
551#ifdef PARALLEL_MODE_MPI
552 // Prepare a set of destination ranks from all other ranks
553 // -> every rank will know the position
554 auto& cuboidGeometry = particleSystem.getSuperStructure().getCuboidGeometry();
555 auto& loadBalancer = particleSystem.getSuperStructure().getLoadBalancer();
556 std::unordered_set<int> destRanksSet;
557 for (int iC = 0; iC < cuboidGeometry.getNc(); ++iC) {
558 int rank = loadBalancer.rank(iC);
559 if (rank != singleton::mpi().getRank()) {
560 destRanksSet.insert(rank);
561 }
562 }
563
564 // Preparations
565 std::multimap<int, std::unique_ptr<std::uint8_t[]>> dataMap;
566 using GENERAL_EVAL =
567 typename PARTICLETYPE ::template derivedField<descriptors::GENERAL>;
568 using POSITION_EVAL =
569 typename GENERAL_EVAL ::template derivedField<descriptors::POSITION>;
570 using SURFACE_EVAL =
571 typename PARTICLETYPE ::template derivedField<descriptors::SURFACE>;
572 using ANGLE_EVAL =
573 typename SURFACE_EVAL ::template derivedField<descriptors::ANGLE>;
574
577 1);
579
580 auto communicatableID = ConcreteCommunicatable(fieldID);
581 auto communicatablePosition = ConcreteCommunicatable(fieldPosition);
582 auto communicatableAngle = ConcreteCommunicatable(fieldAngle);
583 const std::vector<unsigned int> indices {0};
584 const std::size_t serialSize = communicatableID.size(indices) +
585 communicatablePosition.size(indices) +
586 communicatableAngle.size(indices);
587
588 // Obtain data for communication
589 communication::forParticlesInSuperParticleSystem<
590 T, PARTICLETYPE,
591 conditions::valid_particle_centres //only consider center for resolved
592 >(particleSystem, [&](Particle<T, PARTICLETYPE>& particle,
593 ParticleSystem<T, PARTICLETYPE>& bParticleSystem,
594 int globiC) {
595 fieldID.setField(0, particle.template getField<PARALLELIZATION, ID>());
596 fieldPosition.setField(0, access::getPosition(particle));
597 fieldAngle.setField(0, access::getAngle(particle));
598 spawnData[fieldID.getField(0)].position = fieldPosition.getField(0);
599 spawnData[fieldID.getField(0)].angleInDegree =
600 util::radianToDegree(fieldAngle.getField(0));
601 for (const int destRank : destRanksSet) {
602 std::unique_ptr<std::uint8_t[]> buffer(new std::uint8_t[serialSize] {});
603 std::uint8_t* bufferRaw = buffer.get();
604 std::size_t serialIdx = communicatableID.serialize(indices, bufferRaw);
605 serialIdx +=
606 communicatablePosition.serialize(indices, &bufferRaw[serialIdx]);
607 serialIdx +=
608 communicatableAngle.serialize(indices, &bufferRaw[serialIdx]);
609 dataMap.insert(std::make_pair(destRank, std::move(buffer)));
610 }
611 });
612
613 //Create non blocking mpi helper
614 singleton::MpiNonBlockingHelper mpiNbHelper;
615
616 std::map<int, std::vector<std::uint8_t>> rankDataMapSorted;
617 communication::fillSendBuffer(dataMap, rankDataMapSorted, serialSize);
618
619 // Send mapped data
620 communication::sendMappedData(rankDataMapSorted, destRanksSet, serialSize,
621 particleCreatorComm, mpiNbHelper);
622
623 // Receive positions from all other ranks
624 communication::receiveAndExecuteForData(
625 destRanksSet, serialSize, particleCreatorComm, mpiNbHelper,
626 [&](int rankOrig, std::uint8_t* buffer) {
627 std::size_t serialIdx = communicatableID.deserialize(indices, buffer);
628 serialIdx +=
629 communicatablePosition.deserialize(indices, &buffer[serialIdx]);
630 serialIdx +=
631 communicatableAngle.deserialize(indices, &buffer[serialIdx]);
632
633 spawnData[fieldID.getField(0)].position = fieldPosition.getField(0);
634 spawnData[fieldID.getField(0)].angleInDegree =
635 util::radianToDegree(fieldAngle.getField(0));
636 });
637
638#else
639 for (int i = 0; i < particleSystem.size(); ++i) {
640 spawnData[i].position = access::getPosition(particleSystem.get(i));
641 spawnData[i].angleInDegree =
642 util::radianToDegree(access::getAngle(particleSystem.get(i)));
643 }
644#endif
645
646 return spawnData;
647}
SoA storage for instances of a single FIELD.

References olb::particles::communication::fillSendBuffer(), olb::particles::communication::forParticlesInSuperParticleSystem(), olb::particles::access::getAngle(), olb::FieldArrayD< T, DESCRIPTOR, PLATFORM, FIELD >::getField(), olb::particles::access::getPosition(), olb::singleton::mpi(), olb::util::radianToDegree(), olb::particles::communication::receiveAndExecuteForData(), olb::particles::communication::sendMappedData(), and olb::FieldArrayD< T, DESCRIPTOR, PLATFORM, FIELD >::setField().

+ Here is the call graph for this function: