A wrapper class for SuperLU matrices. It supports only compressed sparse matrices and dense matrices. Supernodal and other fancy format are not supported by this wrapper.
This wrapper class mainly aims to avoids the need of dynamic allocation of the storage structure.
template<typename MatrixType >
155 "row-major dense matrices are not supported by SuperLU");
161 res.nrow = internal::convert_index<int>(
mat.
rows());
162 res.ncol = internal::convert_index<int>(
mat.
cols());
164 res.storage.lda = internal::convert_index<int>(MatrixType::IsVectorAtCompileTime ?
mat.
size() :
mat.outerStride());
Eigen::SparseMatrix< double > mat
Definition: EigenUnitTest.cpp:10
#define eigen_assert(x)
Definition: Macros.h:910
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
SCALAR Scalar
Definition: bench_gemm.cpp:45
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
Index size() const
Definition: SparseMatrixBase.h:187
Index cols() const
Definition: SparseMatrix.h:161
Index rows() const
Definition: SparseMatrix.h:159
constexpr Storage & data()
Definition: SparseMatrix.h:205
const unsigned int RowMajorBit
Definition: Constants.h:70
@ SLU_GE
Definition: oomph_superlu_4.3/supermatrix.h:32
@ SLU_DN
Definition: oomph_superlu_4.3/supermatrix.h:20
SluMatrix()
Definition: SuperLUSupport.h:102
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::data(), eigen_assert, res, Eigen::RowMajorBit, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), Eigen::SparseMatrixBase< Derived >::size(), SLU_DN, and SLU_GE.
Referenced by Eigen::SuperLU< MatrixType_ >::_solve_impl(), and Eigen::internal::asSluMatrix().
template<typename MatrixType >
175 res.nrow = internal::convert_index<int>(
mat.
cols());
176 res.ncol = internal::convert_index<int>(
mat.
rows());
179 res.nrow = internal::convert_index<int>(
mat.
rows());
180 res.ncol = internal::convert_index<int>(
mat.
cols());
197 "SelfAdjoint matrix shape not supported by SuperLU");
Index nonZeros() const
Definition: SparseCompressedBase.h:64
const Scalar * valuePtr() const
Definition: SparseMatrix.h:171
const StorageIndex * outerIndexPtr() const
Definition: SparseMatrix.h:189
const StorageIndex * innerIndexPtr() const
Definition: SparseMatrix.h:180
@ SelfAdjoint
Definition: Constants.h:227
@ Lower
Definition: Constants.h:211
@ Upper
Definition: Constants.h:213
if(UPLO(*uplo)==INVALID) info
Definition: level3_impl.h:428
@ SLU_TRL
Definition: oomph_superlu_4.3/supermatrix.h:35
@ SLU_TRU
Definition: oomph_superlu_4.3/supermatrix.h:36
@ SLU_NC
Definition: oomph_superlu_4.3/supermatrix.h:12
@ SLU_NR
Definition: oomph_superlu_4.3/supermatrix.h:16
References Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::cols(), Eigen::SparseMatrixBase< Derived >::derived(), eigen_assert, if(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::innerIndexPtr(), int(), Eigen::Lower, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::nonZeros(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::outerIndexPtr(), res, Eigen::RowMajorBit, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::rows(), Eigen::SelfAdjoint, SLU_GE, SLU_NC, SLU_NR, SLU_TRL, SLU_TRU, Eigen::Upper, and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::valuePtr().