Driver generation for examples with matrix-free preconditioners
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:
- Specify all necessary operators in the ini file, see eg
dune-codegen/test/matrix-free-preconditioner/
for an example. - You need to set the two form options
matrix-free-preconditioner
andmatrix_free_preconditioner_operators
in your main form. - You need to set the
driver_blocks
option and within the driver block set the correctspatial_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ß