basenode Struct Reference

#include <tree.h>

Inherited by fofnode, gravnode, and ngbnode.

Public Attributes

std::atomic< node_bit_fieldflag_already_fetched
vector< MyIntPosTypecenter
int sibling
int nextnode
int father
int OriginTask
int OriginNode
unsigned char level
unsigned char sibling_shmrank
unsigned char nextnode_shmrank
std::atomic_flag access
std::atomic< unsigned char > cannot_be_opened_locally
unsigned char not_empty: 1

Detailed Description

The tree node data structure. Nodes points to the actual memory allocated for the internal nodes, but is shifted such that Nodes[Sp.MaxPart] gives the first allocated node. Note that node numbers less than Sp.MaxPart are the leaf nodes that contain a single particle, and node numbers >= MaxPart+MaxNodes are "pseudo particles" that hang off the toplevel leaf nodes belonging to other tasks. These are not represented by this structure. Instead, the tree traversal for these are saved in the Nextnode, Prevnode and Father arrays, indexed with the node number in the case of real particles and by nodenumber-MaxNodes for pseudo particles.

Definition at line 47 of file tree.h.

Member Data Documentation

◆ access

std::atomic_flag access

Definition at line 68 of file tree.h.

◆ cannot_be_opened_locally

std::atomic<unsigned char> cannot_be_opened_locally

Definition at line 70 of file tree.h.

◆ center

geometrical center of node

Definition at line 51 of file tree.h.

◆ father

int father

The parent node of the node. (Is -1 for the root node.)

Definition at line 59 of file tree.h.

◆ flag_already_fetched

std::atomic<node_bit_field> flag_already_fetched

Definition at line 49 of file tree.h.

◆ level

unsigned char level

hold the tree level, used to store the side length of node in space efficient way

Definition at line 64 of file tree.h.

◆ nextnode

int nextnode

The next node in case the current node needs to be opened. Applying nextnode repeatedly results in a pure depth-first traversal of the tree.

Definition at line 57 of file tree.h.

◆ nextnode_shmrank

unsigned char nextnode_shmrank

Definition at line 66 of file tree.h.

◆ not_empty

unsigned char not_empty

Definition at line 73 of file tree.h.

◆ OriginNode

int OriginNode

Definition at line 62 of file tree.h.

◆ OriginTask

int OriginTask

Definition at line 61 of file tree.h.

◆ sibling

int sibling

Definition at line 53 of file tree.h.

◆ sibling_shmrank

unsigned char sibling_shmrank

Definition at line 65 of file tree.h.

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