tem_IdOfCoord Function

public pure function tem_IdOfCoord(coord, offset) result(nTreeID)

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

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: coord(4)

3D Coordinates to translate

integer(kind=long_k), intent(in), optional :: offset

Return Value integer(kind=long_k)

resulting treeID


Called by

proc~~tem_idofcoord~~CalledByGraph proc~tem_idofcoord tem_IdOfCoord proc~evaluate_first_spacetime_scalarbycoordinate evaluate_first_spacetime_scalarByCoordinate proc~evaluate_first_spacetime_scalarbycoordinate->proc~tem_idofcoord proc~update_childneighborid update_childNeighborID proc~update_childneighborid->proc~tem_idofcoord proc~tem_calc_neighbors tem_calc_neighbors proc~tem_calc_neighbors->proc~tem_idofcoord proc~load_bc_intern_2d load_BC_intern_2D proc~load_bc_intern_2d->proc~tem_idofcoord proc~tem_calc_vrtx_coord tem_calc_vrtx_coord proc~tem_calc_vrtx_coord->proc~tem_idofcoord proc~evaluate_add_spacetime_vectorbycoordinate evaluate_add_spacetime_vectorByCoordinate proc~evaluate_add_spacetime_vectorbycoordinate->proc~tem_idofcoord proc~generate_treelm_elements generate_treelm_elements proc~generate_treelm_elements->proc~tem_idofcoord proc~generate_treelm_slice generate_treelm_slice proc~generate_treelm_slice->proc~tem_idofcoord proc~setup_indices_spacetime setup_indices_spacetime proc~setup_indices_spacetime->proc~tem_idofcoord proc~evaluate_add_spacetime_scalarbycoordinate evaluate_add_spacetime_scalarByCoordinate proc~evaluate_add_spacetime_scalarbycoordinate->proc~tem_idofcoord proc~load_bc_intern_1d load_BC_intern_1D proc~load_bc_intern_1d->proc~tem_idofcoord proc~tem_unify_surfacedata tem_unify_surfaceData proc~tem_unify_surfacedata->proc~tem_idofcoord proc~add_all_virtual_children add_all_virtual_children proc~add_all_virtual_children->proc~tem_idofcoord proc~tem_adddep_down tem_addDep_down proc~tem_adddep_down->proc~tem_idofcoord proc~append_pointdata append_pointData proc~append_pointdata->proc~tem_idofcoord proc~evaluate_first_spacetime_vectorbycoordinate evaluate_first_spacetime_vectorByCoordinate proc~evaluate_first_spacetime_vectorbycoordinate->proc~tem_idofcoord proc~tem_calc_vrtx_coord_noqval tem_calc_vrtx_coord_noqval proc~tem_calc_vrtx_coord_noqval->proc~tem_idofcoord proc~tem_cano_initsubtree tem_cano_initSubTree proc~tem_cano_initsubtree->proc~tem_idofcoord proc~tem_init_surfdata tem_init_surfData proc~tem_init_surfdata->proc~tem_idofcoord proc~tem_get_faceneigh tem_get_faceNeigh proc~tem_get_faceneigh->proc~tem_idofcoord proc~generate_treelm_line generate_treelm_line proc~generate_treelm_line->proc~tem_idofcoord proc~tem_cano_storepntsinsubtree tem_cano_storePntsInSubTree proc~tem_cano_storepntsinsubtree->proc~tem_idofcoord

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, private :: iLevel
integer, private :: upperBoundary
integer, private :: myCoord(3)
integer, private :: fak2
integer(kind=long_k), private :: fak8