|
chombo-discharge
|
Implementation of CD_ParticleManagement.H. More...
#include <algorithm>#include <array>#include <cstdint>#include <functional>#include <limits>#include <utility>#include <type_traits>#include <CH_Timer.H>#include <CD_Random.H>#include <CD_ParticleLoops.H>#include <CD_LoadBalancing.H>#include <CD_ParticleManagement.H>#include <CD_NamespaceHeader.H>#include <CD_NamespaceFooter.H>

Go to the source code of this file.
Namespaces | |
| namespace | ParticleManagement |
| Namespace for various particle management tools. | |
| namespace | ParticleManagement::detail |
| Internal-only implementation details of the ParticleManagement API. | |
Functions | |
| ParticleMergeMethod | ParticleManagement::mergeMethodFromString (const std::string &a_str) noexcept |
| Map a merge-algorithm selector string to a ParticleMergeMethod. | |
| template<class P , Real P::* weight, RealVect P::* position> | |
| void | ParticleManagement::detail::buildEqualWeightKDLeaves (const std::vector< P > &a_particles, const int a_maxLeaves, const BinaryParticleReconcile< P > &a_particleReconcile, std::vector< std::pair< const P *, const P * > > &a_leaves) noexcept |
| Build an equal-weight KD partition of a list of particles and return the leaf particle ranges. | |
| template<class P , RealVect P::* position> | |
| void | ParticleManagement::detail::mergeAdjacentNearest (std::vector< P > &a_particles, const std::size_t a_target, const std::function< void(P &, const P &)> &a_combine) noexcept |
| Merge an already spatially-ordered particle list down to a target count by repeatedly combining the nearest adjacent pair. | |
| template<class Packed , Real Packed::* packWeight, RealVect Packed::* packPosition, class P , class Traits = ParticleTraits<P>> | |
| ParticleMerger< P, Traits > | ParticleManagement::makeSfcNearestNeighborMerger (std::function< Packed(const ParticleSoA< P, Traits > &, std::size_t)> a_gather, std::function< void(Packed &, const Packed &)> a_combine, std::function< void(ParticleSoA< P, Traits > &, const Packed &)> a_scatter) noexcept |
| Create a space-filling-curve nearest-neighbor super-particle merger as a reusable ParticleMerger. | |
| template<class Packed , Real Packed::* packWeight, RealVect Packed::* packPosition, class P , class Traits = ParticleTraits<P>> | |
| ParticleMerger< P, Traits > | ParticleManagement::makeEqualWeightKDMerger (std::function< Packed(const ParticleSoA< P, Traits > &, std::size_t)> a_gather, BinaryParticleReconcile< Packed > a_reconcile, std::function< void(ParticleSoA< P, Traits > &, const Packed *, const Packed *, const CellInfo &)> a_scatterLeaf) noexcept |
| Create an equal-weight KD-tree super-particle merger as a reusable ParticleMerger. | |
| template<class Context , class P , class Traits = ParticleTraits<P>> | |
| ParticleMerger< P, Traits > | ParticleManagement::makeReinitializeMerger (std::function< std::pair< long long, Context >(const ParticleSoA< P, Traits > &)> a_aggregate, std::function< void(ParticleSoA< P, Traits > &, const RealVect &, long long, const Context &)> a_emit, std::function< RealVect()> a_probLo) noexcept |
| Create a reinitialize super-particle merger as a reusable ParticleMerger. | |
| template<typename P , typename Traits , typename T , typename > | |
| void | ParticleManagement::removePhysicalParticles (ParticleSoA< P, Traits > &a_particles, const T a_numPhysPartToRemove) noexcept |
| Remove physical particles from an SoA container (operates on the container-owned weight column). | |
| template<typename P , typename Traits > | |
| void | ParticleManagement::deleteParticles (ParticleSoA< P, Traits > &a_particles, const Real a_weightThresh) noexcept |
| Remove particles from an SoA container if their weight is below the threshold (swap-and-pop). | |
| template<typename T , typename > | |
| std::vector< T > | ParticleManagement::partitionParticleWeights (const T a_numPhysicalParticles, const T a_maxCompParticles) noexcept |
| Partition particle weights among a number of computational particles. | |
| template<typename T , typename > | |
| T | ParticleManagement::detail::partitionParticles (const T a_numParticles) |
| Partition particles so that all MPI rank draw a cumulative number of particles equal to a_numParticles. | |
| template<typename P , typename Traits , typename T , typename > | |
| void | ParticleManagement::drawRandomParticles (ParticleSoA< P, Traits > &a_particles, const T a_numParticles, const std::function< RealVect()> &a_distribution) |
| Draw random SoA particles into a free buffer, distributed according to a predefined distribution. | |
| template<typename P , typename Traits , typename T , typename > | |
| void | ParticleManagement::drawGaussianParticles (ParticleSoA< P, Traits > &a_particles, const T a_numParticles, const RealVect &a_center, const Real a_radius) noexcept |
| Draw Gaussian-distributed particles into an SoA container (unit weight; positions only). | |
| template<typename P , typename Traits , typename T , typename > | |
| void | ParticleManagement::drawBoxParticles (ParticleSoA< P, Traits > &a_particles, const T a_numParticles, const RealVect &a_loCorner, const RealVect &a_hiCorner) noexcept |
| Draw box-distributed particles into an SoA container (unit weight; positions only). | |
| template<typename P , typename Traits , typename T , typename > | |
| void | ParticleManagement::drawSphereParticles (ParticleSoA< P, Traits > &a_particles, const T a_numParticles, const RealVect &a_center, const Real a_radius) noexcept |
| Draw sphere-distributed particles into an SoA container (unit weight; positions only). | |
Implementation of CD_ParticleManagement.H.