Data structore to represent the tree for storing sources and targets of the fmm problem
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=ip), | public | :: | tree_degree | = | 0 |
Maximum number of children for each node |
|
integer(kind=ip), | public | :: | n_nodes | = | 0 |
Number of nodes in the tree |
|
integer(kind=ip), | public | :: | breadth | = | 0 |
Number of levels in the tree |
|
integer(kind=ip), | public, | allocatable | :: | children(:,:) |
For each node in the tree, its children (0 is the null element) |
||
integer(kind=ip), | public, | allocatable | :: | parent(:) |
For each node in the tree, its parent (0 is the null element) |
||
integer(kind=ip), | public, | allocatable | :: | node_level(:) |
For each node the level of the tree in which it is located (1-based) |
||
logical(kind=lp), | public, | allocatable | :: | is_leaf(:) |
For each node true if is a leaf and false otherwise |
||
type(yale_sparse), | public | :: | level_list |
For each level, the list of the nodes contained |
|||
integer(kind=ip), | public | :: | n_particles | = | 0 |
Number of particles stored in the tree |
|
real(kind=rp), | public, | pointer | :: | particles_coords(:,:) |
Pointer to particle coordinates |
||
type(yale_sparse), | public | :: | particle_list |
List of particles contained in each node, for all non-leaf nodes this list should be empty |
|||
integer(kind=ip), | public, | allocatable | :: | particle_to_node(:) | |||
real(kind=rp), | public, | allocatable | :: | node_centroid(:,:) |
For each node its centroid (in cartesian coordinates) |
||
real(kind=rp), | public, | allocatable | :: | node_dimension(:) |
For each node, its dimension (or radius) |
||
type(yale_sparse), | public | :: | near_nl |
List of nodes pair eligible for near-field |
|||
type(yale_sparse), | public | :: | far_nl |
List of nodes pair eligible for far-field |
Given a tree with all the dimension set, it allocates all the required arrays and data stractures for populating the tree
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(inout) | :: | t |
Frees all allocatable quantities contained inside a tree
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(inout) | :: | t |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(in) | :: | t |
Tree data structure |
Just for testing, creates far and near list using a double loop algorithm, it is basically just the application of the following definition: 1. Two nodes are near IF they are both leaves and if the distance is below [min_dist_thr] 2. Two nodes are far IF none of their discendent are near 3. Descendent of two far nodes are not present in any list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(inout) | :: | t |
Tree data structure to populate |
||
real(kind=rp), | intent(in), | optional | :: | min_dist_thr |
Minimum threshold for two nodes to be near, every nodes within this threshold are guaranteed to be near |
Aggregates far nodes to upper levels of the tree. Operation are performed on uncompressed list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(in) | :: | t | |||
integer(kind=ip), | intent(inout) | :: | uncompressed_n_far(t%n_nodes) | |||
integer(kind=ip), | intent(inout) | :: | uncompressed_far(:,:) |
Now compress in yale sparse format and delete the uncompressed lists
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(inout) | :: | t |
Tree data structure to populate |
||
real(kind=rp), | intent(in), | optional | :: | min_dist_thr |
Minimum threshold for two nodes to be near, every nodes within this threshold are guaranteed to be near |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(inout) | :: | t |
Tree data structure to populate |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(fmm_tree_type), | intent(inout) | :: | t |
Tree data structure to populate |