chombo-discharge
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Functions
CD_ParticleManagement.H File Reference

Namespace containing various particle management utilities. More...

#include <functional>
#include <string>
#include <utility>
#include <vector>
#include <RealVect.H>
#include <MayDay.H>
#include <CD_CellInfo.H>
#include <CD_ParticleSoA.H>
#include <CD_NamespaceHeader.H>
#include <CD_NamespaceFooter.H>
#include <CD_ParticleManagementImplem.H>
Include dependency graph for CD_ParticleManagement.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ParticleManagement::MergeParticle< Packed >
 Minimal, payload-agnostic description of one particle as input to a distributed merge. More...
 

Namespaces

namespace  ParticleManagement
 Namespace for various particle management tools.
 
namespace  ParticleManagement::detail
 Internal-only implementation details of the ParticleManagement API.
 

Typedefs

template<class P , class Traits = ParticleTraits<P>>
using ParticleManagement::ParticleMerger = std::function< void(ParticleSoA< P, Traits > &a_particles, const CellInfo &a_cellInfo, const int a_numTargetParticles)>
 Concept for splitting/merging particles.
 
template<class P >
using ParticleManagement::BinaryParticleReconcile = std::function< void(P &p1, P &p2, const P &p0)>
 Declaration of a reconciliation function when splitting particles.
 

Enumerations

enum class  ParticleManagement::ParticleMergeMethod {
  ParticleManagement::None , ParticleManagement::EqualWeightKD , ParticleManagement::Reinitialize , ParticleManagement::ReinitializeBVH ,
  ParticleManagement::NnSfc , ParticleManagement::NnPairTree , ParticleManagement::NnPairOneCell , ParticleManagement::NnPairHash ,
  ParticleManagement::KdCarve , ParticleManagement::KdPatch , ParticleManagement::KdSkinNn , ParticleManagement::External
}
 The specific super-particle merge methods. More...
 

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.
 

Detailed Description

Namespace containing various particle management utilities.

Author
Robert Marskar