Skip to content

Commit

Permalink
skip ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ctkelley committed Nov 24, 2023
1 parent 1e52de8 commit 6a82da6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
Binary file modified Publications_and_Presentations/MPArray.pdf
Binary file not shown.
33 changes: 33 additions & 0 deletions docs/src/Details/Stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,36 @@ You can get some iteration statistics by using the
__reporting__ keyword argument to the solvers. The easiest way
to do this is with the backslash command. When you use this option you
get a data structure with the solution and the residual history.

```
julia> using MultiPrecisionArrays
julia> using MultiPrecisionArrays.Examples
julia> N=4096; A = I - Gmat(N); x=ones(N); b=A*x;
julia> MPF=mplu(A);
julia> # Use \ with reporting=true
julia> mpout=\(MPF, b; reporting=true);
julia> norm(b-A*mpout.sol, Inf)
1.33227e-15
julia> # Now look at the residual history
julia> mpout.rhist
5-element Vector{Float64}:
9.99878e-01
1.21892e-04
5.25805e-11
2.56462e-14
1.33227e-15
```
As you can see, IR does well for this problem. The package uses an initial
iterate of $x = 0$ and so the initial residual is simply $r = b$
and the first entry in the residual history is $|| b ||_\infty$. The
iteration terminates successfully after four matrix-vector products.

There are more examples for this in the [paper](https://github.com/ctkelley/MultiPrecisionArrays.jl/blob/main/Publications_and_Presentations/MPArray.pdf).
12 changes: 11 additions & 1 deletion docs/src/MPArray.bib
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,24 @@ @article{HighamMary
pages="A2815--A2835"
}

@misc{ctk:mparraydoc,
@misc{ctk:xmparraydoc,
author="C. T. Kelley",
title="{Using MultiPrecisonArrays.jl: iterative refinement in Julia}",
year=2023,
url="https://github.com/ctkelley/MultiPrecisionArrays.jl/blob/main/Publications_and_Presentations/MPArray.pdf",
note="Paper in preparation"
}

@misc{ctk:mparraysdoc,
title="Using {MultiPrecisonArrays.jl}: {I}terative Refinement in {J}ulia",
author="C. T. Kelley",
year=2023,
archivePrefix={arXiv},
primaryClass={math.NA}
eprint={submit/5254414}
}


@misc{ctk:notebooknl,
title="{Notebook for Solving Nonlinear Equations with Iterative Methods:
Solvers and Examples in Julia}",
Expand Down

0 comments on commit 6a82da6

Please sign in to comment.