CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
|
Tree structure that represent a coarse cell, the fine cell and the neighbours to them. More...
#include <Tree.h>
Public Types | |
using | NodeType = Node< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > |
Type of node for the current tree. More... | |
Public Member Functions | |
Tree (std::shared_ptr< NodeType > &root) | |
Constructor. More... | |
~Tree ()=default | |
Destructor. More... | |
void | insertSon (const CoMMAIndexType &father_index, const CoMMAIndexType &index, const CoMMAWeightType &volume, const CoMMAIntType &root) |
Insert a node as child of a given node. More... | |
std::shared_ptr< NodeType > | search (std::shared_ptr< NodeType > &node, const CoMMAIndexType &value) |
Look for a node. More... | |
std::shared_ptr< NodeType > | transverse (std::shared_ptr< NodeType > &node) |
Traverse the tree. More... | |
void | deleteNode (const CoMMAIndexType &value) |
Delete a node. More... | |
void | delete_node (std::shared_ptr< NodeType > &searched_node, const CoMMAIndexType &value) |
Delete a node. More... | |
void | print () |
Print the tree. More... | |
void | print_nodes (std::shared_ptr< NodeType > &node) |
Print the branches starting from a given node. More... | |
Public Attributes | |
std::shared_ptr< NodeType > | _root |
The Node at the root of the tree. More... | |
Tree structure that represent a coarse cell, the fine cell and the neighbours to them.
CoMMAIndexType | the CoMMA index type for the global index of the mesh |
CoMMAWeightType | the CoMMA weight type for the weights (volume or area) of the nodes or edges of the Mesh |
CoMMAIntType | the CoMMA type for integers |
using comma::Tree< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::NodeType = Node<CoMMAIndexType, CoMMAWeightType, CoMMAIntType> |
Type of node for the current tree.
|
inlineexplicit |
|
default |
Destructor.
|
inline |
Delete a node.
[in] | searched_node | Where to look |
[in] | value | Target |
|
inline |
Delete a node.
[in] | value | Target |
|
inline |
Insert a node as child of a given node.
[in] | father_index | Index of the parent node |
[in] | index | Index of the child |
[in] | volume | Volume of the child |
[in] | root | Whether it is at the root |
|
inline |
Print the tree.
|
inline |
Print the branches starting from a given node.
[in] | node | Where to start |
|
inline |
Look for a node.
[in] | node | Starting point |
[in] | value | Target |
|
inline |
Traverse the tree.
[in] | node | Where to start the search |
std::shared_ptr<NodeType> comma::Tree< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >::_root |
The Node at the root of the tree.