This function calculates the tree ID for a given x,y and z on the given refinement level. This ID in the complete tree does not have to be in the list of leafs (treeIDlist) An example of this procedure is following: 1. Convert coordinates into binary representation: (x,y,z) = (5,9,1) = (0101,1001,0001) 2. Interleaving the bits by 3 digits for each direction: x(0101): 0 1 0 1 y(1001): 1 0 0 1 z(0001): 0 0 0 1 Combining these bits results in a binary number: 010 001 000 111, which is 1095 when seen as a 10-base number. 3. This number is the cell position in a single level sorted element list. Its treeID can be obtained by adding the correspoding level offset.
Periodic displacement for requested elements outside the cube
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | coord(4) | 3D Coordinates to translate |
||
integer(kind=long_k), | intent(in), | optional | :: | offset |
resulting treeID
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | iLevel | ||||
integer, | private | :: | upperBoundary | ||||
integer, | private | :: | myCoord(3) | ||||
integer, | private | :: | fak2 | ||||
integer(kind=long_k), | private | :: | fak8 |