tem_FirstIdAtLevel Function

public elemental function tem_FirstIdAtLevel(level) result(res)

This function delivers the refinement level of a TreeID

The refinement level of a \ref treelmesh_module::treelmesh_type::treeid "treeID" is found by repeatedly computing the parents with the equation used in the [tem_ParentOf function] (@ref tem_parentatlevel) and counting the iterations, until the universal root is reached.

First TreeID in the complete tree on a given level

e.g. level 1: 1 .. 8 -> offset = 1 level 2: 9 .. 72 -> offset = 9 level 3: 73 .. -> offset = 73

A level offset is calculated by summing all the nodes of coarser levels. With a level count starting at \f$0\f$ on the coarsest level (the universal root node), this offset \f$s\f$ for a given level \f$L\f$ can be computed by the follwing equation: \f[ s = \sum\limits_{i=0}^{L-1} 8^i = \frac{8^{L} - 1}{7} \f]

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: level

level to check

Return Value integer(kind=long_k)

resulting first treeID


Called by

proc~~tem_firstidatlevel~~CalledByGraph proc~tem_firstidatlevel tem_FirstIdAtLevel proc~generate_treelm_elements generate_treelm_elements proc~generate_treelm_elements->proc~tem_firstidatlevel proc~generate_treelm_slice generate_treelm_slice proc~generate_treelm_slice->proc~tem_firstidatlevel proc~generate_treelm_line generate_treelm_line proc~generate_treelm_line->proc~tem_firstidatlevel proc~tem_shape_initbylevels tem_shape_initByLevels proc~tem_shape_initbylevels->proc~tem_firstidatlevel proc~tem_calc_neighbors tem_calc_neighbors proc~tem_calc_neighbors->proc~tem_firstidatlevel proc~generate_treelm_cube generate_treelm_cube proc~generate_treelm_cube->proc~tem_firstidatlevel proc~load_bc_intern_1d load_BC_intern_1D proc~load_bc_intern_1d->proc~tem_firstidatlevel proc~tem_create_subtree_of tem_create_subTree_of proc~tem_create_subtree_of->proc~tem_shape_initbylevels proc~init_tem_bc_prop init_tem_bc_prop proc~init_tem_bc_prop->proc~load_bc_intern_1d proc~tem_load_internal tem_load_internal proc~tem_load_internal->proc~generate_treelm_elements proc~tem_load_internal->proc~generate_treelm_slice proc~tem_load_internal->proc~generate_treelm_line proc~tem_load_internal->proc~generate_treelm_cube proc~tem_init_elemlevels tem_init_elemLevels proc~tem_init_elemlevels->proc~tem_calc_neighbors proc~tem_write_debugmesh tem_write_debugMesh proc~tem_write_debugmesh->proc~tem_create_subtree_of program~tem_varsys_test tem_varSys_test program~tem_varsys_test->proc~tem_create_subtree_of proc~tem_init_tracker_subtree tem_init_tracker_subTree proc~tem_init_tracker_subtree->proc~tem_create_subtree_of proc~tem_init_convergence tem_init_convergence proc~tem_init_convergence->proc~tem_create_subtree_of proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_init_elemlevels proc~load_tem load_tem proc~load_tem->proc~tem_load_internal proc~tem_create_subtree_of_st_funlist tem_create_subTree_of_st_funList proc~tem_create_subtree_of_st_funlist->proc~tem_create_subtree_of proc~load_env load_env proc~load_env->proc~load_tem program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->proc~tem_create_subtree_of_st_funlist proc~check_variableoperations check_variableOperations proc~check_variableoperations->proc~tem_create_subtree_of_st_funlist program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->proc~tem_create_subtree_of_st_funlist program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->proc~tem_create_subtree_of_st_funlist program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->proc~tem_create_subtree_of_st_funlist program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->proc~tem_create_subtree_of_st_funlist proc~tem_dimbydim_construction tem_dimByDim_construction proc~tem_dimbydim_construction->proc~tem_create_leveldesc proc~tem_restart_readheader tem_restart_readHeader proc~tem_restart_readheader->proc~load_tem

Contents

None