MOAB  4.9.3pre
Eigen::SluMatrixMapHelper< SparseMatrixBase< Derived > > Struct Template Reference

#include <SuperLUSupport.h>

List of all members.

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 225 of file SuperLUSupport.h.


Member Typedef Documentation

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

Definition at line 227 of file SuperLUSupport.h.


Member Function Documentation

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

Definition at line 228 of file SuperLUSupport.h.

  {
    if ((MatrixType::Flags&RowMajorBit)==RowMajorBit)
    {
      res.setStorageType(SLU_NR);
      res.nrow      = mat.cols();
      res.ncol      = mat.rows();
    }
    else
    {
      res.setStorageType(SLU_NC);
      res.nrow      = mat.rows();
      res.ncol      = mat.cols();
    }

    res.Mtype       = SLU_GE;

    res.storage.nnz       = mat.nonZeros();
    res.storage.values    = mat.valuePtr();
    res.storage.innerInd  = mat.innerIndexPtr();
    res.storage.outerInd  = mat.outerIndexPtr();

    res.setScalarType<typename MatrixType::Scalar>();

    // FIXME the following is not very accurate
    if (MatrixType::Flags & Upper)
      res.Mtype = SLU_TRU;
    if (MatrixType::Flags & Lower)
      res.Mtype = SLU_TRL;

    eigen_assert(((MatrixType::Flags & SelfAdjoint)==0) && "SelfAdjoint matrix shape not supported by SuperLU");
  }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines