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
-
Cleanup of Gridfunctions: The
GridFunctionConcepts
is split into several parts,Order.hpp
,Derivative.hpp
andGridFunction.hpp
for a cleaner structure. Thereby, the free functionsorder()
,derivative()
andlocalFunctions()
now redirect to the corresponding member functions when those member functions are available. -
Generalized derivatives: The function
derivative()
is extended by an argument characterizing the type of the derivative, i.e.tag::gradient
,tag::divergence
, ortag::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 classDerivativeTraits
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 inGradienTest
finally. -
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.