mplu!: Simple MPArray factorization

MultiPrecisionArrays.mplu!Method

mplu!(MPA::MPArray)

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 == false then the solver downcasts the residual

before the solve and avoids N^2 interprecision transfers.

  • If onthefly == true then the solver does interprecision transfers on the fly and incurs the N^2 interprecision transfer cost for that.

    onthefly == true is 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 == nothing means you take the defaults.

If you want to use static arrays with this stuff, use the mutable @MArray constructor

source
MultiPrecisionArrays.mplu!Method

mplu!(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

source