14 #include <unordered_map>
17 #include <dpsim-models/Logger.h>
18 #include <dpsim/Config.h>
19 #include <dpsim/Definitions.h>
20 #include <dpsim/DirectLinearSolverConfiguration.h>
50 SparseMatrix &systemMatrix,
51 std::vector<std::pair<UInt, UInt>> &listVariableSystemMatrixEntries) = 0;
54 virtual void factorize(SparseMatrix &systemMatrix) = 0;
61 SparseMatrix &systemMatrix,
62 std::vector<std::pair<UInt, UInt>> &listVariableSystemMatrixEntries) = 0;
65 virtual Matrix
solve(Matrix &rightSideVector) = 0;
70 this->applyConfiguration();
80 virtual void applyConfiguration() {
83 SPDLOG_LOGGER_WARN(
mSLog,
"Linear solver configuration is not used!");
virtual void refactorize(SparseMatrix &systemMatrix)=0
refactorization without partial pivoting
DirectLinearSolver(const DirectLinearSolver &)=default
Copy Constructor.
virtual void preprocessing(SparseMatrix &systemMatrix, std::vector< std::pair< UInt, UInt >> &listVariableSystemMatrixEntries)=0
preprocessing function pre-ordering and scaling the matrix
DirectLinearSolver()=default
Constructor.
DirectLinearSolver(CPS::Logger::Log log)
Constructor with Logger.
DirectLinearSolver(DirectLinearSolver &&)=default
Move Constructor.
virtual void partialRefactorize(SparseMatrix &systemMatrix, std::vector< std::pair< UInt, UInt >> &listVariableSystemMatrixEntries)=0
partial refactorization withouth partial pivoting
DirectLinearSolverConfiguration mConfiguration
Object that carries configuration options.
CPS::Logger::Log mSLog
Stores logger of solver class.
virtual void factorize(SparseMatrix &systemMatrix)=0
factorization function with partial pivoting
virtual Matrix solve(Matrix &rightSideVector)=0
solution function for a right hand side
DirectLinearSolver & operator=(DirectLinearSolver &&)=default
Move Assignment Operator.
DirectLinearSolver & operator=(const DirectLinearSolver &)=default
Copy Assignment Operator.
virtual ~DirectLinearSolver()=default
Destructor.