mplu!: Simple MPArray factorization
MultiPrecisionArrays.mplu! — Methodmplu!(MPA::MPArray; residterm=residtermdefault)
Plain vanilla MPArray factorization: Factor the low precision copy and leave the high precision matrix alone. You get a factorization object as output and can use \ to solve linear systems.
The story on interprecision transfers is that you can set the Boolean onthefly when you construct the MPArray. If you use mplu then you get the defaults
- If
onthefly == falsethen the solver downcasts the residual
before the solve and avoids N^2 interprecision transfers.
If
onthefly == truethen the solver does interprecision transfers on the fly and incurs the N^2 interprecision transfer cost for that.onthefly == trueis what you must use if you plan to use the low precision factorization as a preconditioner in IR-GMRES or you're working in Float16 and the matrix is very ill-conditioned.onthefly == nothingmeans you take the defaults.
The kwarg residterm sets the termination criterion. residterm == true (default) terminates the iteration on small residuals. residterm == false terminates the iteration on small normwise backward errors. Look at the docs for details.
If you want to use static arrays with this stuff, import the mutable @MArray constructor
MultiPrecisionArrays.mplu! — Methodmplu!(MPF::MPLFact,A::AbstractArray{TW,2}) where TW <: Real
Overwrite a multiprecision factorization MPF to reuse the storage to make a multiprecision of a new matrix A.
This will, of course, trash the original factorization.
To use this do
MPF=mplu!(MPF,A)Simply using
mplu!(MPF,A) # Don't do this!(ie without explicitly returning MPF)
may not do what you want because the multiprecision factorization structure is immutable and MPF.AF.info cannot be changed.
Reassigning MPF works and resuses almost all of the storage in the original array.
If you want to use static arrays with this stuff, use the mutable @MArray constructor