|
numerics
|
Precomputed LU Thomas solver for constant-coefficient complex tridiagonal systems. More...
Go to the source code of this file.
Classes | |
| struct | num::ComplexTriDiag |
| Constant-coefficient complex tridiagonal solver (precomputed LU). More... | |
Namespaces | |
| namespace | num |
Precomputed LU Thomas solver for constant-coefficient complex tridiagonal systems.
Solves the n x n system:
a*x[k-1] + b*x[k] + c*x[k+1] = d[k], k = 0 .. n-1
with Dirichlet boundary conditions x[-1] = x[n] = 0.
Because a, b, c are the same for every row the LU factorization depends only on the coefficients, not on d. Factor once, then call solve() for each new right-hand side in O(n).
Typical use: Crank-Nicolson kinetic sweeps in the TDSE solver, where a = c = -i*alpha and b = 1 + 2i*alpha for some real alpha.
Definition in file tridiag_complex.hpp.