Paths of elements from the root node to themselves going through the
hierarchy of the tree. Is used to compare to elements
For all
[[tem_construction_module::identify_local_element]] "local elements",
their actual position in the sparse mesh has to be identified for a given
\ref treelmesh_module::treelmesh_type::treeid "treeID".
Due to the sparsity of the mesh, the position of a certain element in the
total list of elements can not be directly deduced from its
\ref treelmesh_module::treelmesh_type::treeid "treeID".
As already pointed out, we can rely on binary searches in the sorted list
of elements for this task, as long as a comparison between any two elements
is possible.
A comparison of two nodes to decide their relative position in the ordered
list of elements has to take into account the hierarchy of the mesh.
The comparison operator is therefore defined as follows.
Build the path from each leaf to the root of the tree, by repeatedly
computing the parents with the equation used in the
[tem_ParentOf function] (@ref tem_parentatlevel), until the root with
\ref treelmesh_module::treelmesh_type::treeid "treeID" \f$0\f$ is reached.
After the path through the tree is known for both leaves,
comparison can be done on the greatest common level by a simple integer
subtraction of the treeIDs in the path on this level.
The result of this subtraction indicates the relation between the two
paths, if it is zero they are considered to be equal.
Otherwise the sign indicates the ordering of the two compared leaves.
In a tree with leaves on different levels, this results in children to be
considered to be equal to their parents.
Nodes of different colours represent the following:
Solid arrows point from a derived type to the parent type which it
extends. Dashed arrows point from a derived type to the other
types it contains as a components, with a label listing the name(s) of
said component(s).