chombo-discharge
|
Node in a particle-merging KD-tree. More...
#include <CD_KDNode.H>
Public Types | |
using | ParticleList = std::vector< P > |
List of particles. This is aliased because the KD-tree construction may require both random access and something sortable. | |
Public Member Functions | |
KDNode (const KDNode &)=delete | |
Disallowed constructor. | |
KDNode (const KDNode &&)=delete | |
Disallowed constructor. | |
KDNode & | operator= (const KDNode &)=delete |
Disallowed assignment. | |
KDNode & | operator= (const KDNode &&)=delete |
Disallowed assignment. | |
KDNode () | |
Default constructor. | |
KDNode (ParticleList &a_particles) | |
Valid constructor. Takes list of particles. More... | |
virtual | ~KDNode () |
Destructor. Does nothing. | |
const Real & | weight () const noexcept |
Get the node weight. | |
Real & | weight () noexcept |
Get the node weight. | |
const ParticleList & | getParticles () const noexcept |
Get particles in this node. | |
ParticleList & | getParticles () noexcept |
Get particles in this node. | |
bool | isLeafNode () const noexcept |
Is leaf node or not. | |
bool | isInteriorNode () const noexcept |
Is leaf node or not. | |
ParticleList | gatherParticles () const noexcept |
Gather particles further down in the subtree and return all particles (in the leaf nodes) | |
ParticleList | moveParticles () noexcept |
Move the particles list further down in the subtree into this vector. More... | |
std::shared_ptr< KDNode< P > > & | getLeft () noexcept |
Get the left node. | |
std::shared_ptr< KDNode< P > > & | getRight () noexcept |
Get the right node. | |
Protected Member Functions | |
void | gatherParticles (ParticleList &a_particles) const noexcept |
Gather particles further down in the subtree and return all particles (in the leaf nodes) More... | |
void | moveParticles (ParticleList &a_particles) noexcept |
Move particles further down in the subtree and return all particles (in the leaf nodes) More... | |
Protected Attributes | |
std::shared_ptr< KDNode > | m_left |
Left KD-node. | |
std::shared_ptr< KDNode > | m_right |
Right KD-node. | |
Real | m_weight |
Node weight. | |
ParticleList | m_particles |
List of particles. | |
Node in a particle-merging KD-tree.
This node type is used for partitioning particles into spatial subsets and merging/splitting them.
The template argument P is the particle type - the users decides how to merge/split/partition.
|
inline |
Valid constructor. Takes list of particles.
[in,out] | a_particles | List of particles to be partitioned later. |
|
inlineprotectednoexcept |
Gather particles further down in the subtree and return all particles (in the leaf nodes)
[in,out] | a_particles | List of particles |
|
inlinenoexcept |
Move the particles list further down in the subtree into this vector.
|
inlineprotectednoexcept |
Move particles further down in the subtree and return all particles (in the leaf nodes)
[in,out] | a_particles | List of particles |