15 #include <unordered_map>
18 #include <dpsim/Config.h>
19 #include <dpsim/Definitions.h>
20 #include <dpsim/DirectLinearSolver.h>
22 #include <cusolverSp.h>
24 #include <magmasparse.h>
29 std::unique_ptr<Eigen::PermutationMatrix<Eigen::Dynamic>> mTransp;
33 magma_queue_t mMagmaQueue;
37 magma_d_matrix mDevSysMat;
41 magma_d_matrix mDevRhsVec;
44 magma_d_matrix mDevLhsVec;
49 void iluPreconditioner();
51 void performFactorization(SparseMatrix &systemMatrix);
65 std::vector<std::pair<UInt, UInt>>
66 &listVariableSystemMatrixEntries)
override;
69 virtual void factorize(SparseMatrix &systemMatrix)
override;
72 virtual void refactorize(SparseMatrix &systemMatrix)
override;
76 std::vector<std::pair<UInt, UInt>> &
77 listVariableSystemMatrixEntries)
override;
80 virtual Matrix
solve(Matrix &rightSideVector)
override;
DirectLinearSolver()=default
Constructor.
magma_d_matrix mHostLhsVec
LHS-Vector.
virtual void factorize(SparseMatrix &systemMatrix) override
factorization function with partial pivoting
virtual ~GpuMagmaAdapter()
Destructor.
virtual void refactorize(SparseMatrix &systemMatrix) override
refactorization without partial pivoting
magma_dopts mMagmaOpts
Solver-Handle.
magma_d_matrix mHostRhsVec
RHS-Vector.
virtual Matrix solve(Matrix &rightSideVector) override
solution function for a right hand side
magma_d_matrix mHostSysMat
Systemmatrix.
virtual void preprocessing(SparseMatrix &systemMatrix, std::vector< std::pair< UInt, UInt >> &listVariableSystemMatrixEntries) override
preprocessing function pre-ordering and scaling the matrix
virtual void partialRefactorize(SparseMatrix &systemMatrix, std::vector< std::pair< UInt, UInt >> &listVariableSystemMatrixEntries) override
partial refactorization withouth partial pivoting
GpuMagmaAdapter()
Constructor.