Skip to content

Add generalized derivative and local-to-global adapter to handle the global derivatives uniformly

Summary

Cleanup of Gridfunctions, i.e. separate order, derivative and gridfunction concepts. Add generalized derivative with gradient, divergence and partial derivatives. Add a local-to-global adapter similar to the one found in dune-localfunctions.

Details

  1. Cleanup of Gridfunctions: The GridFunctionConcepts is split into several parts, Order.hpp, Derivative.hpp and GridFunction.hpp for a cleaner structure. Thereby, the free functions order(), derivative() and localFunctions() now redirect to the corresponding member functions when those member functions are available.

  2. Generalized derivatives: The function derivative() is extended by an argument characterizing the type of the derivative, i.e. tag::gradient, tag::divergence, or tag::partial where the last one accepts an argument for the component of the partial derivative. In order to determine the range type of the grid functions, a class DerivativeTraits is added, parametrized with the derivative type and the function signature. For the discrete function it is possible to calculate all three derivative types. This is tested in GradienTest finally.

  3. Local-to-Global adapter: The calculation of global derivatives from local-basis and geometry Jacobians is abstracted and put into the new class LocalToGlobalBasisAdapter that performes cached evaluation of the local basis jacobians and geometry jacobians and the transforms those into global derivatives. This class can be used in the localoperators and is partially adapted already.

Merge request reports

Loading