mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Fix bug #454: allow Block/Map objects for solving with SuperLU
This commit is contained in:
parent
fc5f21903b
commit
c58b759865
@ -161,14 +161,14 @@ struct SluMatrix : SuperMatrix
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Scalar, int Rows, int Cols, int Options, int MRows, int MCols>
|
template<typename MatrixType>
|
||||||
static SluMatrix Map(Matrix<Scalar,Rows,Cols,Options,MRows,MCols>& mat)
|
static SluMatrix Map(MatrixBase<MatrixType>& _mat)
|
||||||
{
|
{
|
||||||
typedef Matrix<Scalar,Rows,Cols,Options,MRows,MCols> MatrixType;
|
MatrixType& mat(_mat.derived());
|
||||||
eigen_assert( ((Options&RowMajor)!=RowMajor) && "row-major dense matrices is not supported by SuperLU");
|
eigen_assert( ((MatrixType::Flags&RowMajorBit)!=RowMajorBit) && "row-major dense matrices are not supported by SuperLU");
|
||||||
SluMatrix res;
|
SluMatrix res;
|
||||||
res.setStorageType(SLU_DN);
|
res.setStorageType(SLU_DN);
|
||||||
res.setScalarType<Scalar>();
|
res.setScalarType<typename MatrixType::Scalar>();
|
||||||
res.Mtype = SLU_GE;
|
res.Mtype = SLU_GE;
|
||||||
|
|
||||||
res.nrow = mat.rows();
|
res.nrow = mat.rows();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user