Solves Mx = b for x, where M is a SparseMatrix.
More...
#include <LUSolver.h>
|
enum | DataType { None,
Double,
ComplexDouble
} |
|
Solves Mx = b for x, where M is a SparseMatrix.
◆ DataType
Enum class for specifying the data type of the matrix. Used since complex matrices that are purely real are converted to double type for optimization.
◆ LUSolver()
TBTK::LUSolver::LUSolver |
( |
| ) |
|
Constructs a Solver::LUSolver.
◆ ~LUSolver()
TBTK::LUSolver::~LUSolver |
( |
| ) |
|
◆ getMatrixDataType()
Get matrix data type. Is None before a matrix has been set, Double if a real matrix has been set, and ComplexDouble if a complex matrix has been set. Note that a SparseMatrix<std::complex<double>> is stored as Double internally if the matrix is real.
- Returns
- The data type that is used to store the data.
◆ setMatrix() [1/2]
void TBTK::LUSolver::setMatrix |
( |
const SparseMatrix< double > & |
sparseMatrix | ) |
|
Set matrix.
- Parameters
-
sparseMatrix | Matrix \(M\) to use in the equation \(Mx = b\). |
◆ setMatrix() [2/2]
void TBTK::LUSolver::setMatrix |
( |
const SparseMatrix< std::complex< double >> & |
sparseMatrix | ) |
|
Set matrix.
- Parameters
-
sparseMatrix | Matrix \(H\) to use in the equation \(Mx = b\). |
◆ solve() [1/2]
void TBTK::LUSolver::solve |
( |
Matrix< double > & |
b | ) |
|
Solve for \(x\) in the equation \(Mx = b\).
- Parameters
-
b | The vector \(b\). Contains the answer \(x\) when finished. |
◆ solve() [2/2]
void TBTK::LUSolver::solve |
( |
Matrix< std::complex< double >> & |
b | ) |
|
Solve for \(x\) in the equation \(Mx = b\).
- Parameters
-
b | The vector \(b\). Contains the answer \(x\) when finished. |
The documentation for this class was generated from the following file: