t8code icon indicating copy to clipboard operation
t8code copied to clipboard

Unify names of get_leaves and get_elements functions

Open ole-alb opened this issue 9 months ago • 5 comments

Feature request

We have multiple functions for the tree and forest to get the leaf elements. In some cases they are called get_elementsand in other cases get_leaves.

Describe the solution or feature you'd like Unify the function names so a user can find the correct functionality for the current problem.

"Priority: low" Should be solved eventually

ole-alb avatar Mar 24 '25 15:03 ole-alb

@ole-alb @lukasdreyer Are there preferences on what a unified name should be? elements, leaves, or leaf_elements? 🤔

spenke91 avatar Mar 28 '25 11:03 spenke91

@ole-alb @lukasdreyer Are there preferences on what a unified name should be? elements, leaves, or leaf_elements? 🤔

Usually "element" should refer to everything that can exist while "leave" should refer to existing (leaf) elements in a forest. I.e. only the leaf elements of the refinement tree that form the actual computational mesh.

This can guide us in properly naming the functions.

holke avatar Mar 28 '25 14:03 holke

In addition to that, in this case leaf is suitable as the functions I was referring to, are for example used to get the number of leaves of a tree or forest.

ole-alb avatar Mar 28 '25 14:03 ole-alb

Thanks for the input!

spenke91 avatar Mar 28 '25 14:03 spenke91

We decided:

  • functions that explicitly need leaf elements should have leaf_elements in the name
  • functions that work on any element should have only element in their name.

Please also document this decision in the wiki.

Davknapp avatar Apr 14 '25 13:04 Davknapp

Both subissues were resolved.

spenke91 avatar May 26 '25 08:05 spenke91