PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ ddratio()

double pism::TridiagonalSystem::ddratio ( unsigned int  system_size) const

Compute diagonal-dominance ratio. If this is less than one then the matrix is strictly diagonally-dominant.

Let \(A = (a_{ij})\) be the tridiagonal matrix described by L, D, U for row indices 0 through n. The computed ratio is

\[ \max_{j=1, \dots, n} \frac{|a_{j, j-1}|+|a_{j, j+1}|}{|a_{jj}|}, \]

where \(a_{1, 0}\) and \(a_{n, n+1}\) are interpreted as zero.

If this is smaller than one then it is a theorem that the tridiagonal solve will succeed.

We return -1.0 if the absolute value of any diagonal element is less than 1e-12 of the 1-norm of the matrix.

Definition at line 102 of file ColumnSystem.cc.

References pism::k, m_D, m_L, m_max_system_size, m_U, pism::array::max(), and norm1().

Referenced by pism::columnSystemCtx::reportColumnZeroPivotErrorMFile(), and save_system_with_solution().