Documentation for module tmc_tree_build

tree nodes creation, deallocation, references etc. - we distinguish two kinds of tree nodes: global and sub tree nodes (because we also are able to do parallel tempering) - global tree nodes consists of pointers to sub tree nodes - sub tree nodes consists of position arrays, potential energy, etc. - furthermore the sub tree elements have references the all global tree elements refering to them - for tree element details see tree_types.F

source: tmc_tree_build.F
Loading...

public Subroutines/Functions:

allocates an elements of the subtree element structure
creates new global tree element and if needed new subtree element
deallocates an elements of the subtree element structure
distributes the initial energy to all subtree (if no restart) and call analysis for this element (write trajectory...)
SUBROUTINE
finalize_trees (tmc_env)
deallocating every tree node of every trees (clean up)
routine initiate the global and subtrees with the first elements
deallocates the no more used tree nodes beside the result nodes from begin_ptr to end_ptr in global and subtrees
deletes the no more used global tree nodes beside the result nodes from begin_ptr to end_ptr

SUBROUTINEallocate_new_sub_tree_node(tmc_params, next_el, nr_dim)

allocates an elements of the subtree element structure

Arguments:
POINTER
:: tmc_params structure for storing all (global) parameters
TYPE(tree_type),
POINTER
:: next_el ...
INTEGER
:: nr_dim ...

SUBROUTINEcreate_new_gt_tree_node(tmc_env, stat, new_elem, reactivation_cc_count)

creates new global tree element and if needed new subtree element

Arguments:
POINTER
:: tmc_env TMC environment with parameters and pointers to gt element
INTEGER,
INTENT(out)
:: stat return status value
INTENT(out),
POINTER
:: new_elem return gt element
INTEGER
:: reactivation_cc_count counting the reactivation of subtree elements

SUBROUTINEdeallocate_sub_tree_node(tree_elem)

deallocates an elements of the subtree element structure

Arguments:
TYPE(tree_type),
POINTER
:: tree_elem ...

SUBROUTINEfinalize_init(gt_tree_ptr, tmc_env)

distributes the initial energy to all subtree (if no restart) and call analysis for this element (write trajectory...)

Arguments:
POINTER
:: gt_tree_ptr global tree head (initial configuration)
POINTER
:: tmc_env master environment for restart (if restart the subtree heads are not equal), result counts and lists

SUBROUTINEfinalize_trees(tmc_env)

deallocating every tree node of every trees (clean up)

Arguments:
POINTER
:: tmc_env TMC environment structure

SUBROUTINEinit_tree_mod(start_elem, tmc_env, job_counts, worker_timings)

routine initiate the global and subtrees with the first elements

Arguments:
TYPE(tree_type),
POINTER
:: start_elem ...
POINTER
:: tmc_env structure for storing all (global) parameters
INTEGER
:: job_counts(:) ...
REAL(dp)
:: worker_timings(4) ...

SUBROUTINEremove_all_trees(working_elem_list, tmc_env)

deallocates the no more used tree nodes beside the result nodes from begin_ptr to end_ptr in global and subtrees

Arguments:
POINTER
:: working_elem_list(:) list of actual calculating elements for canceling
POINTER
:: tmc_env TMC environment

RECURSIVE SUBROUTINEremove_unused_g_tree(begin_ptr, end_ptr, removed, tmc_env)

deletes the no more used global tree nodes beside the result nodes from begin_ptr to end_ptr

Arguments:
POINTER
:: begin_ptr start of the tree region to be cleaned
POINTER
:: end_ptr end of the tree region to be cleaned
LOGICAL
:: removed retun value if brance is clean
POINTER
:: tmc_env tmc environment