Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > > Struct Template Reference

Public Types

typedef Derived MatrixType
 

Static Public Member Functions

static void run (MatrixType &mat, SluMatrix &res)
 

Detailed Description

template<typename Derived>
struct Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >

Definition at line 253 of file SuperLUSupport.h.

Member Typedef Documentation

◆ MatrixType

template<typename Derived >
typedef Derived Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::MatrixType

Definition at line 255 of file SuperLUSupport.h.

Member Function Documentation

◆ run()

template<typename Derived >
static void Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > >::run ( MatrixType mat,
SluMatrix res 
)
inlinestatic

Definition at line 256 of file SuperLUSupport.h.

257  {
258  if ((MatrixType::Flags&RowMajorBit)==RowMajorBit)
259  {
260  res.setStorageType(SLU_NR);
261  res.nrow = mat.cols();
262  res.ncol = mat.rows();
263  }
264  else
265  {
266  res.setStorageType(SLU_NC);
267  res.nrow = mat.rows();
268  res.ncol = mat.cols();
269  }
270 
271  res.Mtype = SLU_GE;
272 
273  res.storage.nnz = mat.nonZeros();
274  res.storage.values = mat.valuePtr();
275  res.storage.innerInd = mat.innerIndexPtr();
276  res.storage.outerInd = mat.outerIndexPtr();
277 
278  res.setScalarType<typename MatrixType::Scalar>();
279 
280  // FIXME the following is not very accurate
281  if (MatrixType::Flags & Upper)
282  res.Mtype = SLU_TRU;
283  if (MatrixType::Flags & Lower)
284  res.Mtype = SLU_TRL;
285 
286  eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && "SelfAdjoint matrix shape not supported by SuperLU");
287  }
#define eigen_assert(x)
Definition: Macros.h:902
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
internal::traits< Derived >::Scalar Scalar
Definition: DenseBase.h:61
@ SelfAdjoint
Definition: Constants.h:227
@ Lower
Definition: Constants.h:211
@ Upper
Definition: Constants.h:213
const unsigned int RowMajorBit
Definition: Constants.h:68

The documentation for this struct was generated from the following file: