Skip to content

[forms][cleanup] Severe cleanup and performance improvements of multilinear operators

Carsten Gräser requested to merge cleanup/forms-simplify-operators into master

This collects many improvements of the Dune::Fufem::Forms multilinear operators. Most importantly it simplifies and unifies the interface across 0-, 1-, and 2-linear operators and makes code more readable.

This also improves performance of the operator assembler - in part dramatically (see (*) below). Especially for the linear-elasticity hyperelasticity examples assembly is improved by a factor of 3-4.

Detailed list of changes in this MR:

  • Multilinear operators:
    • Extract common parts of differential operators into a common base class.
    • Unify and strip down interface and exported typedefs.
    • Improve/add some static assertions.
  • Tensor implementations (results of evaluating operators)
    • Extract tensor operation into Dune::Fufem::Impl::Tensor::.
    • Improve interface of LazyTensorBlock and bring it closer to std::mdspan.
    • Add special tensor implementation for dyadic products.
    • When adding a 2-tensor to a local matrix exploit the dyadic product to avoid duplicate evaluation of differential operators for the same basis function (*).

Merge request reports

Loading