Multigrid solver setup separation
Problem
All multigrid solvers only implement a setupLinearSystem(obj, A, b, x0)
method that sets the matrix as well as the right hand side.
Conceptually, the matrix can only be set once per level, since the solver is tailored to the problem setting.
The right-hand side, however, can, in priciple, change.
Calling setupLinearSystem
twice throws an error, because all level-wise setup steps are taken in this method.
It would be better to separate the setup of the matrix (as well as all corresponding level-wise setups) and the setup of the RHS.
Suggestion
Split the setupLinearSystem
method into two methods:
-
setupSystemMatrix
that takes care of the matrix, transfer operators, and smoother setup. -
setupRhs
that takes care of the right-hand side and an optional initial guess.
Steps
-
Modify localAdaptiveMultigrid
and test with this file. -
Change the setup logic in whole class hierarchy, starting with IterativeSolver
. -
Merge changes into AISFEM-experiments branch & make Zarantonello example run.
Edited by Innerberger, Michael