21#include <unordered_map>
24#include <dpsim/Config.h>
31 std::vector<std::pair<UInt, UInt>> mChangedEntries;
34 std::vector<Int> mVaryingColumns;
36 std::vector<Int> mVaryingRows;
40 klu_numeric *mNumeric =
nullptr;
41 klu_symbolic *mSymbolic =
nullptr;
46 int mPreordering = AMD_ORDERING;
61 std::vector<Int> mRowToKluValueIndex;
77 std::vector<std::pair<UInt, UInt>>
78 &listVariableSystemMatrixEntries)
override;
88 std::vector<std::pair<UInt, UInt>>
89 &listVariableSystemMatrixEntries)
override;
std::shared_ptr< spdlog::logger > Log
DirectLinearSolver()=default
Constructor.
void applyConfiguration() override
Apply configuration.
void factorize(SparseMatrix &systemMatrix) override
factorization function with partial pivoting
Matrix solve(Matrix &rightSideVector) override
solution function for a right hand side
void solveInto(Matrix &rightSideVector, Matrix &solution) override
Solve into caller-owned storage to avoid per-step matrix allocation.
void refactorize(SparseMatrix &systemMatrix) override
refactorization without partial pivoting
void printMatrixMarket(SparseMatrix &systemMatrix, int counter) const
Function to print matrix in MatrixMarket's coo format.
void partialRefactorize(SparseMatrix &systemMatrix, std::vector< std::pair< UInt, UInt > > &listVariableSystemMatrixEntries) override
partial refactorization withouth partial pivoting
~KLUAdapter() override
Destructor.
void preprocessing(SparseMatrix &systemMatrix, std::vector< std::pair< UInt, UInt > > &listVariableSystemMatrixEntries) override
preprocessing function pre-ordering and scaling the matrix
Eigen::SparseMatrix< Real, Eigen::ColMajor > SparseMatrix
Sparse matrix for real numbers.
PARTIAL_REFACTORIZATION_METHOD
CPS::SparseMatrixRow SparseMatrix