Add dynamic power nodes

What does this MR do?

Adds a dynamic power node including most of the algorithms that traverse and transform trees. The main reason to have this features is because they can be useful for PDELab in order to have dynamic power grid function spaces. The particular case I am trying right now is for several components that are only known at run time.

  • Notice that with dynamic I refer to dynamic storage of them, defined at the construction of the node. Afterwards, the tree is immutable as its static counterparts.

  • Accumulate algorithms now use the hybrid tree path because it doesn't make sense to provide static paths to dynamic trees. -> Already implemented on !81 (merged) and similar issues that remove static path.

  • The tree info now is useful if one knows a priori that the complete tree is static, hence I added free functions for the node and leaf count that return constant expression integers when possible.

  • Added an interface for the dynamic visit of the children in addition to the static one. It allows for more fine-grained visitor implementation.

  • Example of use:

Is there something that needs to be double checked?

  • The tests are not passing because of a const expresssions for older compilers. I tried with the hybrid ifElse but it didn't work. Any suggestion?
  • Are the test enough?
  • Can the change from static path to hybrid path in the accumulate algorithm affect someone? I hope no because it is ignored in most of the cases anyways.

Can this MR be accepted?

  • Implemented
  • Added test
  • Pipeline passing
  • Added entry to

Related issues

#4 !86 !85 (merged)

Edited by Santiago Ospina De Los Ríos

Merge request reports