Skip to content

Commit 3a83315

Browse files
committed
fix typos + improve
Signed-off-by: Martijn Govers <Martijn.Govers@Alliander.com>
1 parent c213c98 commit 3a83315

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

docs/advanced_documentation/algorithms/lu-solver.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,15 @@ uses the following backward error in the [iterative refinement algorithm](#itera
276276

277277
$$
278278
\begin{align*}
279-
\text{backward_error}_{\text{Li}} &= \max_i \frac{\left|r[i]\right|}{\sum_j \left|A[i,j]\right| \left|x[j]\right| + \left|b[i]\right|} \\
280-
&= \max_i \frac{\left|b[i] - \sum_j A[i,j] x[j]\right|}{\sum_j \left|A[i,j]\right| \left|x[j]\right| + \left|b[i]\right|} \\
281-
&= \max_i \frac{\left|r[i]\right|}{\left(\left|A\right| \cdot \left|x\right| + \left|b\right|\right)\left[i\right]}
279+
\text{backward_error}_{\text{Li}} &= \max_i \frac{\left|r_i\right|}{\sum_j \left|A_{i,j}\right| \left|x_j\right| + \left|b_i\right|} \\
280+
&= \max_i \frac{\left|b_i - \sum_j A_{i,j} x_j\right|}{\sum_j \left|A_{i,j}\right| \left|x_j\right| + \left|b_i\right|} \\
281+
&= \max_i \frac{\left|r_i\right|}{\left(\left|A\right| \cdot \left|x\right| + \left|b\right|\right)_i}
282282
\end{align*}
283283
$$
284284

285-
In this equation, the symbolic notation
286-
$\left(\left|A\right|\cdot \left|x\right|\right)\left[i\right] := \sum_j |A[i,j]| |x[j]|$, as
285+
In this equation, the symbolic notation $\left|A\right|$ and $\left|x\right|$ are the matrix and
286+
vector with absolute values of the elements of $A$ and $x$ as elements, i.e.,
287+
$\left|A\right|_{i,j} := \left|a_{i,j}\right|$ and $\left|x\right|_i := \left|x_i\right|$, as
287288
defined in [Arioli89](https://epubs.siam.org/doi/10.1137/0610013).
288289

289290
Due to aforementioned, this is prone to rounding errors, and a single row with rounding errors may
@@ -293,16 +294,24 @@ denominators:
293294

294295
$$
295296
\begin{align*}
296-
D_{\max} &= \max_i {(|A||x| + |b|)_i} \\
297-
berr &= \max_{ i } {\frac{|r|_i}{\max ( (|A||x| + |b|)_i, \epsilon_{berr} D_{\max}) }}
297+
D_{\text{max}} &= \max_i\left\{\left(\left|A\right|\cdot\left|x\right| + \left|b\right|\right)_i\right\} \\
298+
\text{backward_error} &= \max_i \left\{
299+
\frac{\left|r\right|_i}{
300+
\max\left\{
301+
\left(\left|A\right|\cdot\left|x\right| + \left|b\right|\right)_i,
302+
\epsilon_{\text{backward_error}} D_{\text{max}}
303+
\right\}
304+
}
305+
\right\}
298306
\end{align*}
299307
$$
300308

301-
$\epsilon$ may be chosen. $\epsilon = 0$ means no cut-off, while $\epsilon = 1$ means maximum
302-
cut-off. The former is prone to rounding errors, while the latter may hide issues in rows with small
303-
coefficients by supressing them in the backward error, even if that row's residual is relatively
304-
large, in favor of other rows with larger absolute, but smaller relative, residuals. In conclusion,
305-
$\epsilon$ should be chosen not too large and not too small.
309+
$\epsilon$ may be chosen. $\epsilon = 0$ means no cut-off, while $\epsilon = 1$ means that only the
310+
absolute values of the residuals are relevant - not the relative values. The former is prone to
311+
rounding errors, while the latter may hide issues in rows with small coefficients by supressing them
312+
in the backward error, even if that row's residual is relatively large compared to the other
313+
entries, in favor of other rows with larger absolute, but smaller relative, residuals. In
314+
conclusion, $\epsilon$ should be chosen not too large and not too small.
306315

307316
```{note}
308317
$\epsilon = 10^{-4}$ was experimentally determined to be a reasonably good value on a number of

0 commit comments

Comments
 (0)