|
numerics
|
Constant-coefficient complex tridiagonal solver (precomputed LU). More...
#include <tridiag_complex.hpp>
Public Types | |
| using | cplx = std::complex< double > |
Public Member Functions | |
| void | factor (int n_, cplx a_, cplx b_, cplx c_) |
| Factor the tridiagonal matrix. | |
| void | solve (std::vector< cplx > &d) const |
| In-place Thomas solve. | |
Public Attributes | |
| std::vector< cplx > | c_mod |
| Modified super-diagonal (precomputed from LU) | |
| std::vector< cplx > | inv_b |
| Inverse of modified main diagonal (precomputed) | |
| int | n = 0 |
| cplx | a_coeff |
| Sub-diagonal value (constant across all rows) | |
Constant-coefficient complex tridiagonal solver (precomputed LU).
Definition at line 36 of file tridiag_complex.hpp.
| using num::ComplexTriDiag::cplx = std::complex<double> |
Definition at line 37 of file tridiag_complex.hpp.
Factor the tridiagonal matrix.
| n_ | System size |
| a_ | Sub-diagonal coefficient (row k depends on x[k-1]) |
| b_ | Main-diagonal coefficient |
| c_ | Super-diagonal coefficient (row k depends on x[k+1]) |
Definition at line 5 of file tridiag_complex.cpp.
References a_coeff, c_mod, inv_b, num::ipow(), and n.
Referenced by num::CrankNicolsonADI::CrankNicolsonADI().
In-place Thomas solve.
On entry d holds the right-hand side; on exit it holds the solution. The size of d must equal n (set by the last factor() call).
Definition at line 23 of file tridiag_complex.cpp.
References a_coeff, c_mod, inv_b, num::ipow(), and n.
| cplx num::ComplexTriDiag::a_coeff |
Sub-diagonal value (constant across all rows)
Definition at line 42 of file tridiag_complex.hpp.
| std::vector<cplx> num::ComplexTriDiag::c_mod |
Modified super-diagonal (precomputed from LU)
Definition at line 39 of file tridiag_complex.hpp.
| std::vector<cplx> num::ComplexTriDiag::inv_b |
Inverse of modified main diagonal (precomputed)
Definition at line 40 of file tridiag_complex.hpp.
| int num::ComplexTriDiag::n = 0 |
Definition at line 41 of file tridiag_complex.hpp.