consumption

An illustration of the memory consumption of iterative refinement.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%%% Full, compilable sources are on Github: 
%%% https://github.com/bvieuble/TeXFantasy/tree/main/illustrations/fig4
%%% Appears in my thesis ``Mixed precision iterative refinement for the 
%%% solution of large sparse linear systems''.

% Compiled with XeLaTeX
% TeX-command-extra-options: "-shell-escape"
\documentclass[convert={outext=.png},border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,patterns,patterns.meta}

\input{color_theme.tex}

\begin{document}

\tikzdeclarepattern{
  name=hatch,
  parameters={\hatchsize,\hatchangle,\hatchlinewidth},
  bounding box={(-.1pt,-.1pt) and (\hatchsize+.1pt,\hatchsize+.1pt)},
  tile size={(\hatchsize,\hatchsize)},
  tile transformation={rotate=\hatchangle},
  defaults={
    hatch size/.store in=\hatchsize,hatch size=5pt,
    hatch angle/.store in=\hatchangle,hatch angle=0,
    hatch linewidth/.store in=\hatchlinewidth,hatch linewidth=.4pt,
  },
  code={
      \draw[line width=\hatchlinewidth] (0,0) -- (\hatchsize,\hatchsize);
  }
}

\begin{tikzpicture}
    \node[] (step1) at (-0.5,0.25) {1 :};
    \node[] (step2) at (-0.5,-0.75) {2 :};

    \node[draw,fill=myred-light,anchor=south,thick] (ufcol) at (3,1) {};
    \node[left = 0.2cm of ufcol] {$\mbox{LU}_f$};
    \node[draw,pattern={hatch[hatch size=4pt, hatch linewidth=0.75pt, 
        hatch angle=10]},pattern color=myblue2,anchor=south,thick] (upcol) at 
        (6,1) {};
    \node[left = 0.2cm of upcol] {$\mbox{LU}_p$};
    \node[draw,fill=myblue-light,anchor=south,thick] (activecol) at (9,1) {};
    \node[left = 0.2cm of activecol] {Active};

    \draw[draw=none,thick,fill=myred-light] (0,0) rectangle ++(5,0.5);
    \draw[draw=none,thick,fill=myblue-light] (5,0) rectangle ++(4,0.5);
    \draw[draw=none,thick,fill=white,opacity=0.99,pattern={hatch[hatch 
        size=10pt, hatch linewidth=0.75pt, hatch angle=10]},pattern 
        color=myblue2] (0,0) rectangle ++(10,0.5);
    \draw[draw=none,thick] (10,0) rectangle ++(2,0.5);
    \draw[draw=black,thick,fill=none] (0,0) rectangle ++(12,0.5);


    \draw[draw=none,thick,fill=myred-light] (0,-1) rectangle ++(4,0.5);
    \draw[draw=none,thick,fill=myblue-light] (4,-1) rectangle ++(6,0.5);
    \draw[draw=none,pattern={hatch[hatch size=10pt, hatch linewidth=0.75pt, 
        hatch angle=10]},pattern color=myblue2] (0,-1) rectangle ++(8,0.5);
    \draw[draw=none,thick] (10,-1) rectangle ++(2,0.5);
    \draw[thick,fill=none,draw=black] (0,-1) rectangle ++(12,0.5);
\end{tikzpicture}

\end{document}