Skip to content

Driver generation for examples with matrix-free preconditioners

René Heß requested to merge feature/matrix-free-driver-generation into master

Make it possible to generate the driver and driverblock for examples using matrix-free preconditioners.

In order to build the matrix-free solvers in your solver block you need to:

  1. Specify all necessary operators in the ini file, see eg dune-codegen/test/matrix-free-preconditioner/ for an example.
  2. You need to set the two form options matrix-free-preconditioner and matrix_free_preconditioner_operators in your main form.
  3. You need to set the driver_blocks option and within the driver block set the correct spatial_form.

After setting all these dune-codegen will generate all the operators, create a driverblock using them and generate the correct driver code.

Note: One change I did to the driver generation: If there is exactly one driver block we can always generate a driver, no matter how many operators are defined, as it is always clear that the driver should use the solver from the driver block.

Edited by René Heß

Merge request reports

Loading