Implement ILU and ILDL preconditioners for scalar matrix entries
This merge request shifts to a new implementation strategy: There are methods toVector
and toMatrix
now that interpret scalars as FieldVector
or FieldMatrix
objects, respectively. That allows to get rid of the Hybrid::ifElse
pattern, which is legible but longer.
Merge request reports
Activity
added 1 commit
- f05bd527 - Implement ILU/ILDL preconditioners for scalar matrix entries
mentioned in commit ab28696c
There's two possible solutions, both involve to return a new value in
toVector()
andtoMatrix()
for raw types:- Create matrix/vector-like proxy classes storing a reference to the raw value and providing the necessary interface.
- Return a new
FieldMatrix<B,1,1>
/FieldVector<B,1>
copying the value.
While the second solution avoids the boilerplate code of the first one, it introduces an artificial copy. However, I guess that the compiler would optimize the potential overhead anyway. But this should be verified.
Please register or sign in to reply