Functions solve_tridiag_sym¶
-
template<class
vec_t
, classvec2_t
, classvec3_t
, classvec4_t
, classmem_t
, classmem_vec_t
>
voido2scl_linalg
::
solve_tridiag_sym
(const vec_t &diag, const vec2_t &offdiag, const vec3_t &b, vec4_t &x, size_t N, mem_t &m)¶ Solve a symmetric tridiagonal linear system with user-specified memory.
This function solves the system \( A x = b \) where \( A \) is a matrix of the form
given the* * diag[0] offdiag[0] 0 ..... * offdiag[0] diag[1] offdiag[1] ..... * 0 offdiag[1] diag[2] * 0 0 offdiag[2] .....
N
diagonal elements indiag
,N-1
diagonal elements inoffdiag
, and theN
elementsb
from the RHS.See [EngelnMullges96].