mpgeslir: IR solver
MultiPrecisionArrays.mpgeslir
— Methodmpgeslir(AF::MPFact, b; reporting=false, verbose=true)
I do not export this function. The idea is that you use mplu
and do not touch either the constructor or the solver directly.
Use a multi-precision factorization to solve a linear system with plain vanilla iterative refinement.
This version is analogous to A\b
and combines the factorization and the solve. You start with MPA=MPArray(A) and then pass MPA to mpgeslir and combine the factorization and the solve.
You can also get the multiprecision factorization directly with
MPF=mplu(A)
and then pass MPF
to mpgeslir.
I use this to get some timing results and it's also convenient if you want to do factor and solve in one statement.
You can also get this with x = MPA\b
.
If you set the kwarg reporting
to true you can get the IR residual history. The output of
x = MPA\b
Use a multi-precision factorization to solve a linear system with plain vanilla iterative refinement.
MPFact is a union of all the MultiPrecision factorizations in the package. The triangular solver will dispatch on the various types depending on how the interprecision transfers get done.
MultiPrecisionArrays.mpgeslir
— Methodmpgeslir(MPA::MPArray, b; reporting = false, verbose = true)
I do not export this function. The idea is that you use mpglu
and do not touch either the constructor or the solver directly.
Use a multi-precision factorization to solve a linear system with plain vanilla iterative refinement.
This version is analogous to A\b
and combines the factorization and the solve. You start with MPA=MPArray(A) and then pass MPA to mpgeslir and combine the factorization and the solve.
You can also get the multiprecision factorization directly with
MPF=mplu(A)
and then pass MPF
to mpgeslir.
I use this to get some timing results and it's also convenient if you want to do factor and solve in one statement.
You can also get this with x = MPA\b
.
If you set the kwarg reporting
to true you can get the IR residual history. The output of
x = MPA\b
or
x=MPF\b
is the solition. The output of
mout = \(MPA,b; reporting=true)
or
mout = \(MPF,b; reporting=true)
is a structure. mpout.sol
is the solution. mpout.rhist
is the residual history. mpout also contains the datatypes TW for high precision and TF for low precision.
Example
julia> using MultiPrecisionArrays.Examples
julia> N=4096; A = I - 800.0 * Gmat(N); b=ones(N);
julia> MPF=mplu(A);
julia> mout=\(MPF, b; reporting=true);
julia> mout.rhist
6-element Vector{Float64}:
1.00000e+00
5.36483e-02
1.57977e-05
5.10232e-09
7.76756e-12
9.90008e-12
# Stagnation after four IR iterations
julia> [mout.TW mout.TF]
1×2 Matrix{DataType}:
Float64 Float32