|
PSCF v1.3.3
|
Solver for Ax=b with tridiagonal matrix A. More...
#include <TridiagonalSolver.h>
Public Member Functions | |
| TridiagonalSolver () | |
| Constructor. | |
| ~TridiagonalSolver () | |
| Destructor. | |
| void | allocate (int n) |
| Allocate memory. | |
| void | computeLU (const DArray< double > &d, const DArray< double > &u) |
| Compute LU decomposition of a symmetric tridiagonal matrix. | |
| void | computeLU (const DArray< double > &d, const DArray< double > &u, const DArray< double > &l) |
| Compute LU decomposition of a general tridiagonal matrix. | |
| void | multiply (const DArray< double > &b, DArray< double > &x) |
| Evaluate product Ab = x for known b to compute x. | |
| void | solve (const DArray< double > &b, DArray< double > &x) |
| Solve Ax = b for known b to compute x. | |
Solver for Ax=b with tridiagonal matrix A.
Definition at line 27 of file TridiagonalSolver.h.
| Pscf::TridiagonalSolver::TridiagonalSolver | ( | ) |
Constructor.
Definition at line 19 of file TridiagonalSolver.cpp.
| Pscf::TridiagonalSolver::~TridiagonalSolver | ( | ) |
Destructor.
Definition at line 25 of file TridiagonalSolver.cpp.
| void Pscf::TridiagonalSolver::allocate | ( | int | n | ) |
Allocate memory.
| n | dimension of n x n square array. |
Definition at line 31 of file TridiagonalSolver.cpp.
Compute LU decomposition of a symmetric tridiagonal matrix.
| d | diagonal elements of n x n matrix matrix (0,..,n-1) |
| u | upper off-diagonal elements (0,..,n-2) |
Definition at line 43 of file TridiagonalSolver.cpp.
| void Pscf::TridiagonalSolver::computeLU | ( | const DArray< double > & | d, |
| const DArray< double > & | u, | ||
| const DArray< double > & | l ) |
Compute LU decomposition of a general tridiagonal matrix.
| d | diagonal elements of n x n matrix matrix (0,..,n-1) |
| u | upper off-diagonal elements (0,..,n-2) |
| l | lower off-diagonal elements (0,..,n-2) |
Definition at line 59 of file TridiagonalSolver.cpp.
Evaluate product Ab = x for known b to compute x.
| b | known vector to be multiplied (input) |
| x | result of multiplication Ab = x (output) |
Definition at line 103 of file TridiagonalSolver.cpp.
Solve Ax = b for known b to compute x.
| b | known vector on RHS (input) |
| x | unknown solution vector of Ax = b (output) |
Definition at line 121 of file TridiagonalSolver.cpp.