File lapack_routines.hxx#
Serial code to invert a complex tridiagonal system
Solves a banded matrix given the matrix in compact form:
a[0...(n-1)][0...(m1+m2)]
b[0...(n-1)]
a is overwritten, and b is replaced by the solution
Functions
-
int tridag(const dcomplex *a, const dcomplex *b, const dcomplex *c, const dcomplex *r, dcomplex *u, int n)#
Tridiagonal inversion
- Parameters:
a – Left of diagonal (so a[0] not used)
b – diagonal terms
c – Right of diagonal (so c[n-1] not used)
r – RHS vector
u – Result vector
n – Length of vectors
Uses LAPACK routine ZGTSVb[0] c[0] a[1] b[1] c[1] . . .
-
bool tridag(const BoutReal *a, const BoutReal *b, const BoutReal *c, const BoutReal *r, BoutReal *x, int n)#