Skip to content

Draft: Make localView_ and localDoFs_ of DiscreteGlobalBasisFunction::LocalFunction accessible

Hi!

I want some feedback on this little detail.

I need some local information of a DiscreteGlobalBasisFunction. To be precise: I want a directional derivative of one the local finite elements. Therefore, I need the local basis and the local dofs.

Currently, DiscreteGlobalBasisFunction and its internal class LocalFunction can only return the bound element and have a local point-wise operator() evaluation.

Pros of making the information accessible:

  • The user can do whatever (s)he wants with access to the local information
  • A generic (currently NotImplemented) derivative method may be too much: what if I only need a special partial derivative?
  • The user can select which finite element is picked in a composite basis, etc.

Con:

  • The interface is pretty clean: we have the grid element and nothing more, the rest is internal information

For me, the clean interface is does not suffer from access to the LocalView and the LocalDoFs. , since the types are already public information. Every dune-functions object has a LocalView, so this can be assumed. The local degrees of freedom are always a flat std::vector, so there is also no further internal-only information there.

Edit: LocalView is in fact a private type of LocalFunction

There are already some MR/Issues related to derivatives of DiscreteGlobalBasisFunction (!57 (closed) !188 (closed)) but they are stuck for some time now. May this can be a compromise to let the user decide what there is to derive.

Edited by Patrick Jaap

Merge request reports

Loading