Skip to content

Refactoring forms

Nils Kohl requested to merge kohl/forms-refactor into main

TODO:

  • deepcopies in deepcopy
  • tabulation default kwarg in callback

This is just a first step to improve the code structure. The overall form/operator generation process has not really changed but this MR gets rid of a lot of duplicated code.

It introduces integrand.py to facilitate the writing of new forms. Conceptually, integrands are specified as before, but there is now much less boilerplate. See docstrings in integrand.py for details.

List of major changes:

  • refactored all forms in forms.py and forms_boundary.py (manifolds postponed)
  • most integrand formulations have been moved to hog/recipes/integrands/ and split into dedicated files
  • new option single_component in TensorialVectorFunctionSpace to avoid duplicate integrand formulations for scalar components and proper vector function spaces
  • extended generate_all_operators.py script to also be able to generate mixed or pure boundary operators
  • HyTeG integration test for the boundary mass form
  • some more documentation and minor refactoring for Hessian stuff
Edited by Nils Kohl

Merge request reports