ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
orb5x::QuadtreeBox Struct Reference

Axis-aligned leaf or internal node in \((v_\parallel,v_\perp)\). More...

#include "quadtree.hpp"

+ Collaboration diagram for orb5x::QuadtreeBox:

Public Member Functions

 QuadtreeBox (Real xmin_, Real xmax_, Real ymin_, Real ymax_, int max_num_el_, QuadtreeBox *parent_=nullptr)
 Construct an empty quadtree node with preallocated index storage.
 
 ~QuadtreeBox ()=default
 Recursively destroy all descendants through their owning child pointers.
 

Public Attributes

std::vector< int > element_list
 Fixed-capacity storage for one-based marker indices.
 
int max_num_el
 Leaf capacity at which the node is subdivided.
 
std::unique_ptr< QuadtreeBox > north_east
 Child with high v_parallel and high v_perp.
 
std::unique_ptr< QuadtreeBox > north_west
 Child with low v_parallel and high v_perp.
 
int num_el
 Number of valid one-based indices currently stored by this node.
 
QuadtreeBox * parent
 Non-owning parent link; null for the root.
 
std::unique_ptr< QuadtreeBox > south_east
 Child with high v_parallel and low v_perp.
 
std::unique_ptr< QuadtreeBox > south_west
 Child with low v_parallel and low v_perp.
 
Real xmax
 Inclusive upper parallel-velocity bound, in normalized velocity units.
 
Real xmin
 Inclusive lower parallel-velocity bound, in normalized velocity units.
 
Real ymax
 Inclusive upper perpendicular-velocity bound, in normalized velocity units.
 
Real ymin
 Inclusive lower perpendicular-velocity bound, in normalized velocity units.
 

Detailed Description

Axis-aligned leaf or internal node in \((v_\parallel,v_\perp)\).

A leaf stores one-based marker indices until max_num_el is reached. It is then split into four equal quadrants and subsequent traversal operates on its descendants. Child ownership is recursive through std::unique_ptr; parent is a non-owning link.

Constructor & Destructor Documentation

◆ QuadtreeBox()

orb5x::QuadtreeBox::QuadtreeBox ( Real  xmin_,
Real  xmax_,
Real  ymin_,
Real  ymax_,
int  max_num_el_,
QuadtreeBox *  parent_ = nullptr 
)

Construct an empty quadtree node with preallocated index storage.

Parameters
[in]xmin_Inclusive lower parallel-velocity bound.
[in]xmax_Inclusive upper parallel-velocity bound.
[in]ymin_Inclusive lower perpendicular-velocity bound.
[in]ymax_Inclusive upper perpendicular-velocity bound.
[in]max_num_el_Maximum number of indices retained in a leaf.
[in]parent_Non-owning parent pointer, or null for a root node.

◆ ~QuadtreeBox()

orb5x::QuadtreeBox::~QuadtreeBox ( )
default

Recursively destroy all descendants through their owning child pointers.

Member Data Documentation

◆ element_list

std::vector<int> orb5x::QuadtreeBox::element_list

Fixed-capacity storage for one-based marker indices.

◆ max_num_el

int orb5x::QuadtreeBox::max_num_el

Leaf capacity at which the node is subdivided.

◆ north_east

std::unique_ptr<QuadtreeBox> orb5x::QuadtreeBox::north_east

Child with high v_parallel and high v_perp.

◆ north_west

std::unique_ptr<QuadtreeBox> orb5x::QuadtreeBox::north_west

Child with low v_parallel and high v_perp.

◆ num_el

int orb5x::QuadtreeBox::num_el

Number of valid one-based indices currently stored by this node.

◆ parent

QuadtreeBox* orb5x::QuadtreeBox::parent

Non-owning parent link; null for the root.

◆ south_east

std::unique_ptr<QuadtreeBox> orb5x::QuadtreeBox::south_east

Child with high v_parallel and low v_perp.

◆ south_west

std::unique_ptr<QuadtreeBox> orb5x::QuadtreeBox::south_west

Child with low v_parallel and low v_perp.

◆ xmax

Real orb5x::QuadtreeBox::xmax

Inclusive upper parallel-velocity bound, in normalized velocity units.

◆ xmin

Real orb5x::QuadtreeBox::xmin

Inclusive lower parallel-velocity bound, in normalized velocity units.

◆ ymax

Real orb5x::QuadtreeBox::ymax

Inclusive upper perpendicular-velocity bound, in normalized velocity units.

◆ ymin

Real orb5x::QuadtreeBox::ymin

Inclusive lower perpendicular-velocity bound, in normalized velocity units.


The documentation for this struct was generated from the following file: