What this MR does / why does DuMux need it:
Various models in Dumux enable primary variable switching. This is realized by using special block types in the solution coefficient vector that specifies which variables are stored (state). These custom block types are not well supported by Dune and are also not needed in linear solver and assembler. With this MR we distinguish the
SolutionVector type and the
ResidualVector type. Solution vectors may contain Dumux-specific custom block types whereas the
ResidualVector type is native to the linear algebra backend (at the moment only dune-istl).
This also fixes the strange behavior that if Jacobian/Residual are scalars the solver is still fed a vector of size 1. Now the solver receives a scalar as expected (see test_newton/test_timestepmethods).
This MR will simplify the implementation of the improved solver interfaces in !2113 (closed).
Notes for the reviewer
The changes are not backwards-compatible.
Before you request a review from someone, make sure to revise the following points:
does the new code follow the style guide?
is the code you changed and/or the new code you wrote covered in the test suite? (if not, extend the existing tests or write new ones)
does your change affect public interfaces or behavior, or, does it introduce a new feature? If so, document the change in
is the list of the header includes complete? ("include what you use")
all files have to end with a
\ncharacter. Make sure there is no
\ No newline at end of filecomment in "Changes" of this MR.