Neko
0.8.1
A portable framework for high-order spectral element flow simulations
|
Axis Aligned Bounding Box (aabb) Tree data structure. More...
Data Types | |
type | aabb_node_t |
Node type for the Axis Aligned Bounding Box (aabb) Tree. More... | |
type | aabb_tree_t |
Axis Aligned Bounding Box (aabb) Tree. More... | |
Functions/Subroutines | |
subroutine | aabb_node_init (this) |
Initializes the AABB node. More... | |
pure type(aabb_t) function | aabb_node_get_aabb (this) |
Returns the Axis Aligned Bounding Box (aabb) of the node. More... | |
pure integer function | aabb_node_get_object_index (this) |
Returns the object index of the node. More... | |
pure integer function | aabb_node_get_parent_index (this) |
Returns the parent index of the node. More... | |
pure integer function | aabb_node_get_left_index (this) |
Returns the left index of the node. More... | |
pure integer function | aabb_node_get_right_index (this) |
Returns the right index of the node. More... | |
real(kind=dp) function | aabb_node_min_distance (this, p) |
Get the minimum possible distance from the aabb to a point. More... | |
pure logical function | aabb_node_is_leaf (this) |
Returns true if the node is a leaf node. More... | |
pure logical function | aabb_node_is_valid (this) |
Returns true if the node is a valid node. More... | |
pure logical function | aabb_node_less (this, other) |
Returns true if the node is less than the other node. More... | |
pure logical function | aabb_node_greater (this, other) |
Returns true if the node is greater than the other node. More... | |
subroutine | aabb_tree_init (this, initial_capacity) |
Initializes the AABB tree. More... | |
subroutine | aabb_tree_build_tree (this, objects) |
Builds the tree. More... | |
integer function, dimension(:), allocatable | sort (array) |
integer function | aabb_tree_get_size (this) |
Returns the size of the tree, in number of leaves. More... | |
pure integer function | aabb_tree_get_root_index (this) |
Returns the index of the root node. More... | |
pure integer function | aabb_tree_get_parent_index (this, node_index) |
Returns the index of the parent node of the node at the given index. More... | |
pure integer function | aabb_tree_get_left_index (this, node_index) |
Returns the index of the left node of the node at the given index. More... | |
pure integer function | aabb_tree_get_right_index (this, node_index) |
Returns the index of the right node of the node at the given index. More... | |
pure type(aabb_node_t) function | aabb_tree_get_node (this, node_index) |
Returns the node at the given index. More... | |
pure type(aabb_node_t) function | aabb_tree_get_root_node (this) |
Returns the root node of the tree. More... | |
pure type(aabb_node_t) function | aabb_tree_get_parent_node (this, node_index) |
Returns the parent node of the node at the given index. More... | |
pure type(aabb_node_t) function | aabb_tree_get_left_node (this, node_index) |
Returns the left node of the node at the given index. More... | |
pure type(aabb_node_t) function | aabb_tree_get_right_node (this, node_index) |
Returns the right node of the node at the given index. More... | |
pure type(aabb_t) function | aabb_tree_get_aabb (this, node_index) |
subroutine | aabb_tree_insert_object (this, object, object_index) |
Inserts an object into the tree. More... | |
subroutine | aabb_tree_query_overlaps (this, object, object_index, overlaps) |
Queries the tree for overlapping objects. More... | |
integer function | aabb_tree_allocate_node (this) |
Allocates a new node in the tree. More... | |
subroutine | aabb_tree_deallocate_node (this, node_index) |
Deallocates a node in the tree. More... | |
subroutine | aabb_tree_insert_leaf (this, leaf_node_index) |
Inserts a leaf into the tree. More... | |
logical function | aabb_tree_valid_tree (this) |
Validates the tree. More... | |
subroutine | aabb_tree_fix_upwards_tree (this, tree_start_index) |
Fixes the tree upwards. More... | |
subroutine | aabb_tree_print (this) |
Prints the tree. More... | |
subroutine | aabb_tree_resize_node_pool (this, new_capacity) |
Resizes the node pool. More... | |
Variables | |
integer, parameter, public | aabb_null_node = -1 |
Axis Aligned Bounding Box (aabb) Tree data structure.
This is a Fortran implementation of an Axis Aligned Bounding Box Tree data structure. The purpose of this is to accelerate a Signed Distance Function and other spatial computations.
|
private |
Returns the Axis Aligned Bounding Box (aabb) of the node.
Definition at line 196 of file aabb_tree.f90.
|
private |
Returns the left index of the node.
Definition at line 220 of file aabb_tree.f90.
|
private |
Returns the object index of the node.
Definition at line 204 of file aabb_tree.f90.
|
private |
Returns the parent index of the node.
Definition at line 212 of file aabb_tree.f90.
|
private |
Returns the right index of the node.
Definition at line 228 of file aabb_tree.f90.
|
private |
Returns true if the node is greater than the other node.
Definition at line 290 of file aabb_tree.f90.
subroutine aabb_tree::aabb_node_init | ( | class(aabb_node_t), intent(inout) | this | ) |
Initializes the AABB node.
Definition at line 182 of file aabb_tree.f90.
|
private |
Returns true if the node is a leaf node.
Definition at line 249 of file aabb_tree.f90.
|
private |
Returns true if the node is a valid node.
Definition at line 258 of file aabb_tree.f90.
|
private |
Returns true if the node is less than the other node.
Definition at line 280 of file aabb_tree.f90.
|
private |
Get the minimum possible distance from the aabb to a point.
Definition at line 236 of file aabb_tree.f90.
integer function aabb_tree::aabb_tree_allocate_node | ( | class(aabb_tree_t), intent(inout) | this | ) |
Allocates a new node in the tree.
Definition at line 629 of file aabb_tree.f90.
|
private |
Builds the tree.
Definition at line 326 of file aabb_tree.f90.
|
private |
Deallocates a node in the tree.
Definition at line 653 of file aabb_tree.f90.
subroutine aabb_tree::aabb_tree_fix_upwards_tree | ( | class(aabb_tree_t), intent(inout) | this, |
integer, intent(in) | tree_start_index | ||
) |
Fixes the tree upwards.
This method is used to fix the tree upwards after an insertion. It is used to expand the nodes of the tree to fit the new leaf node.
Definition at line 854 of file aabb_tree.f90.
|
private |
Definition at line 558 of file aabb_tree.f90.
|
private |
Returns the index of the left node of the node at the given index.
Definition at line 494 of file aabb_tree.f90.
|
private |
Returns the left node of the node at the given index.
Definition at line 541 of file aabb_tree.f90.
|
private |
Returns the node at the given index.
Definition at line 515 of file aabb_tree.f90.
|
private |
Returns the index of the parent node of the node at the given index.
Definition at line 485 of file aabb_tree.f90.
|
private |
Returns the parent node of the node at the given index.
Definition at line 532 of file aabb_tree.f90.
|
private |
Returns the index of the right node of the node at the given index.
Definition at line 503 of file aabb_tree.f90.
|
private |
Returns the right node of the node at the given index.
Definition at line 550 of file aabb_tree.f90.
pure integer function aabb_tree::aabb_tree_get_root_index | ( | class(aabb_tree_t), intent(in) | this | ) |
Returns the index of the root node.
Definition at line 477 of file aabb_tree.f90.
|
private |
Returns the root node of the tree.
Definition at line 524 of file aabb_tree.f90.
|
private |
Returns the size of the tree, in number of leaves.
Definition at line 441 of file aabb_tree.f90.
|
private |
Initializes the AABB tree.
Definition at line 304 of file aabb_tree.f90.
|
private |
Inserts a leaf into the tree.
Definition at line 663 of file aabb_tree.f90.
|
private |
Inserts an object into the tree.
Definition at line 569 of file aabb_tree.f90.
|
private |
Prints the tree.
Definition at line 874 of file aabb_tree.f90.
|
private |
Queries the tree for overlapping objects.
Definition at line 584 of file aabb_tree.f90.
subroutine aabb_tree::aabb_tree_resize_node_pool | ( | class(aabb_tree_t), intent(inout) | this, |
integer, intent(in) | new_capacity | ||
) |
Resizes the node pool.
Definition at line 906 of file aabb_tree.f90.
|
private |
Validates the tree.
Definition at line 814 of file aabb_tree.f90.
integer function, dimension(:), allocatable aabb_tree::sort | ( | type(aabb_t), dimension(:), intent(in) | array | ) |
integer, parameter, public aabb_tree::aabb_null_node = -1 |
Definition at line 78 of file aabb_tree.f90.