MOAB  4.9.3pre
Eigen::PastixLU< _MatrixType, IsStrSym > Class Template Reference

Sparse direct LU solver based on PaStiX library. More...

#include <PaStiXSupport.h>

Inheritance diagram for Eigen::PastixLU< _MatrixType, IsStrSym >:
Collaboration diagram for Eigen::PastixLU< _MatrixType, IsStrSym >:

List of all members.

Public Types

typedef _MatrixType MatrixType
typedef PastixBase< PastixLU
< MatrixType > > 
Base
typedef Base::ColSpMatrix ColSpMatrix
typedef MatrixType::StorageIndex StorageIndex

Public Member Functions

 PastixLU ()
 PastixLU (const MatrixType &matrix)
void compute (const MatrixType &matrix)
void analyzePattern (const MatrixType &matrix)
void factorize (const MatrixType &matrix)

Protected Member Functions

void init ()
void grabMatrix (const MatrixType &matrix, ColSpMatrix &out)

Protected Attributes

ColSpMatrix m_transposedStructure
bool m_structureIsUptodate

Detailed Description

template<typename _MatrixType, bool IsStrSym>
class Eigen::PastixLU< _MatrixType, IsStrSym >

Sparse direct LU solver based on PaStiX library.

This class is used to solve the linear systems A.X = B with a supernodal LU factorization in the PaStiX library. The matrix A should be squared and nonsingular PaStiX requires that the matrix A has a symmetric structural pattern. This interface can symmetrize the input matrix otherwise. The vectors or matrices X and B can be either dense or sparse.

Template Parameters:
_MatrixTypethe type of the sparse matrix A, it must be a SparseMatrix<>
IsStrSymIndicates if the input matrix has a symmetric pattern, default is false NOTE : Note that if the analysis and factorization phase are called separately, the input matrix will be symmetrized at each call, hence it is advised to symmetrize the matrix in a end-user program and set IsStrSym to true
See also:
TutorialSparseSolverConcept, class SparseLU

Definition at line 412 of file PaStiXSupport.h.


Member Typedef Documentation

template<typename _MatrixType , bool IsStrSym>
typedef PastixBase<PastixLU<MatrixType> > Eigen::PastixLU< _MatrixType, IsStrSym >::Base

Reimplemented from Eigen::PastixBase< PastixLU< _MatrixType > >.

Definition at line 416 of file PaStiXSupport.h.

template<typename _MatrixType , bool IsStrSym>
typedef Base::ColSpMatrix Eigen::PastixLU< _MatrixType, IsStrSym >::ColSpMatrix

Reimplemented from Eigen::PastixBase< PastixLU< _MatrixType > >.

Definition at line 417 of file PaStiXSupport.h.

template<typename _MatrixType , bool IsStrSym>
typedef _MatrixType Eigen::PastixLU< _MatrixType, IsStrSym >::MatrixType

Reimplemented from Eigen::PastixBase< PastixLU< _MatrixType > >.

Definition at line 415 of file PaStiXSupport.h.

template<typename _MatrixType , bool IsStrSym>
typedef MatrixType::StorageIndex Eigen::PastixLU< _MatrixType, IsStrSym >::StorageIndex

Reimplemented from Eigen::PastixBase< PastixLU< _MatrixType > >.

Definition at line 418 of file PaStiXSupport.h.


Constructor & Destructor Documentation

template<typename _MatrixType , bool IsStrSym>
Eigen::PastixLU< _MatrixType, IsStrSym >::PastixLU ( ) [inline]

Definition at line 421 of file PaStiXSupport.h.

               : Base()
    {
      init();
    }
template<typename _MatrixType , bool IsStrSym>
Eigen::PastixLU< _MatrixType, IsStrSym >::PastixLU ( const MatrixType matrix) [inline, explicit]

Definition at line 426 of file PaStiXSupport.h.

                                               :Base()
    {
      init();
      compute(matrix);
    }

Member Function Documentation

template<typename _MatrixType , bool IsStrSym>
void Eigen::PastixLU< _MatrixType, IsStrSym >::analyzePattern ( const MatrixType matrix) [inline]

Compute the LU symbolic factorization of matrix using its sparsity pattern. Several ordering methods can be used at this step. See the PaStiX user's manual. The result of this operation can be used with successive matrices having the same pattern as matrix

See also:
factorize()

Definition at line 448 of file PaStiXSupport.h.

    {
      m_structureIsUptodate = false;
      ColSpMatrix temp;
      grabMatrix(matrix, temp);
      Base::analyzePattern(temp);
    }
template<typename _MatrixType , bool IsStrSym>
void Eigen::PastixLU< _MatrixType, IsStrSym >::compute ( const MatrixType matrix) [inline]

Compute the LU supernodal factorization of matrix. iparm and dparm can be used to tune the PaStiX parameters. see the PaStiX user's manual

See also:
analyzePattern() factorize()

Definition at line 436 of file PaStiXSupport.h.

    {
      m_structureIsUptodate = false;
      ColSpMatrix temp;
      grabMatrix(matrix, temp);
      Base::compute(temp);
    }
template<typename _MatrixType , bool IsStrSym>
void Eigen::PastixLU< _MatrixType, IsStrSym >::factorize ( const MatrixType matrix) [inline]

Compute the LU supernodal factorization of matrix WARNING The matrix matrix should have the same structural pattern as the same used in the analysis phase.

See also:
analyzePattern()

Definition at line 461 of file PaStiXSupport.h.

    {
      ColSpMatrix temp;
      grabMatrix(matrix, temp);
      Base::factorize(temp);
    }
template<typename _MatrixType , bool IsStrSym>
void Eigen::PastixLU< _MatrixType, IsStrSym >::grabMatrix ( const MatrixType matrix,
ColSpMatrix out 
) [inline, protected]

Definition at line 476 of file PaStiXSupport.h.

    {
      if(IsStrSym)
        out = matrix;
      else
      {
        if(!m_structureIsUptodate)
        {
          // update the transposed structure
          m_transposedStructure = matrix.transpose();
          
          // Set the elements of the matrix to zero 
          for (Index j=0; j<m_transposedStructure.outerSize(); ++j) 
            for(typename ColSpMatrix::InnerIterator it(m_transposedStructure, j); it; ++it)
              it.valueRef() = 0.0;

          m_structureIsUptodate = true;
        }
        
        out = m_transposedStructure + matrix;
      }
      internal::c_to_fortran_numbering(out);
    }
template<typename _MatrixType , bool IsStrSym>
void Eigen::PastixLU< _MatrixType, IsStrSym >::init ( ) [inline, protected]

Reimplemented from Eigen::PastixBase< PastixLU< _MatrixType > >.

Definition at line 469 of file PaStiXSupport.h.

    {
      m_structureIsUptodate = false;
      m_iparm(IPARM_SYM) = API_SYM_NO;
      m_iparm(IPARM_FACTORIZATION) = API_FACT_LU;
    }

Member Data Documentation

template<typename _MatrixType , bool IsStrSym>
bool Eigen::PastixLU< _MatrixType, IsStrSym >::m_structureIsUptodate [protected]

Definition at line 504 of file PaStiXSupport.h.

template<typename _MatrixType , bool IsStrSym>
ColSpMatrix Eigen::PastixLU< _MatrixType, IsStrSym >::m_transposedStructure [protected]

Definition at line 503 of file PaStiXSupport.h.


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