![]() |
AMR-Solver
1.0
Block-based Octree AMR grid flow solver
|
Class to store octree datastructure as nodes of the tree. More...
#include <octree.h>
Public Member Functions | |
| Octree () | |
| Octree (double x1, double x2, double y1, double y2, double z1, double z2, int l) | |
| Octree (const Octree &obj) | |
| ~Octree () | |
| void | refine () |
| bool | isLeafNode () |
| bool | isRootNode () |
| bool | contains (double x, double y, double z) |
| int | get_level () |
| Octree * | get_child_at (int, int, int) |
| Octree * | get_parent () |
| void | set_child_null_at (int, int, int) |
| Block * | get_block_data () |
| void | set_to_refine_with_nesting () |
| void | set_to_coarsen_with_nesting () |
Public Attributes | |
| bool | setToRefine |
| bool | setToCoarsen |
| Octree * | neighbour [3][2] |
| NodeBc | bc [3][2] |
| int | number |
Node's block dimensions | |
| double | x_centre |
| double | y_centre |
| double | z_centre |
| double | x_min |
| double | x_max |
| double | y_min |
| double | y_max |
| double | z_min |
| double | z_max |
Private Attributes | |
| Octree * | children [2][2][2] |
| Block * | block_data |
| Octree * | parent |
| int | level |
Class to store octree datastructure as nodes of the tree.
Objects of this class are nodes of the tree. When a new object is created, children are assigned, parent is assigned, data block is assigned and finally the pointer of the object is pushed into the "nodes" list.
Usage: Octree object_name(x min, x max, y min, y max, z min, z max, level); This creates a node of the tree at the specified level. This object can be further refined or coarsened using member functions of this class.
| myOctree::Octree::Octree | ( | ) |
Default constructor
Definition at line 537 of file octree.cpp.
| myOctree::Octree::Octree | ( | double | x1, |
| double | x2, | ||
| double | y1, | ||
| double | y2, | ||
| double | z1, | ||
| double | z2, | ||
| int | l | ||
| ) |
Parametrized constructor with initialization fields
Definition at line 480 of file octree.cpp.
| myOctree::Octree::Octree | ( | const Octree & | obj | ) |
Copy constructor
Definition at line 418 of file octree.cpp.
| myOctree::Octree::~Octree | ( | ) |
Destructor
Definition at line 411 of file octree.cpp.
| bool myOctree::Octree::contains | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
/Function to test if the point lies inside the block
Definition at line 25 of file octree.cpp.
| Block * myOctree::Octree::get_block_data | ( | ) |
Function to access block data
Definition at line 20 of file octree.cpp.
| Octree * myOctree::Octree::get_child_at | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Function that returns pointer to the child at indices (relative)
Definition at line 38 of file octree.cpp.
| int myOctree::Octree::get_level | ( | ) |
Function that returns the level of the node
Definition at line 32 of file octree.cpp.
| Octree * myOctree::Octree::get_parent | ( | ) |
Function that returns pointer to the parent
Definition at line 50 of file octree.cpp.
| bool myOctree::Octree::isLeafNode | ( | ) |
/Function to test if leaf node
Definition at line 10 of file octree.cpp.
| bool myOctree::Octree::isRootNode | ( | ) |
Function to test if root node
Definition at line 15 of file octree.cpp.
| void myOctree::Octree::refine | ( | ) |
Function to add 8 children
Definition at line 182 of file octree.cpp.
| void myOctree::Octree::set_child_null_at | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Function that sets child pointer at indices (relative) to NULL
Definition at line 44 of file octree.cpp.
| void myOctree::Octree::set_to_coarsen_with_nesting | ( | ) |
Sets on coarsen flag with nesting
Definition at line 126 of file octree.cpp.
| void myOctree::Octree::set_to_refine_with_nesting | ( | ) |
Sets on refine flag with nesting
Definition at line 56 of file octree.cpp.
|
private |
|
private |
|
private |