Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Eigen::PastixBase< Derived > Class Template Reference
+ Inheritance diagram for Eigen::PastixBase< Derived >:
+ Collaboration diagram for Eigen::PastixBase< Derived >:

Public Types

typedef internal::pastix_traits< Derived >::MatrixType _MatrixType
 
typedef _MatrixType MatrixType
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::RealScalar RealScalar
 
typedef MatrixType::Index Index
 
typedef Matrix< Scalar, Dynamic, 1 > Vector
 
typedef SparseMatrix< Scalar, ColMajor > ColSpMatrix
 

Public Member Functions

template<typename Rhs >
const internal::solve_retval< PastixBase, Rhs > solve (const MatrixBase< Rhs > &b) const
 
template<typename Rhs , typename Dest >
bool _solve (const MatrixBase< Rhs > &b, MatrixBase< Dest > &x) const
 
Derived & derived ()
 
const Derived & derived () const
 
Array< Index, IPARM_SIZE, 1 > & iparm ()
 
int & iparm (int idxparam)
 
Array< RealScalar, IPARM_SIZE, 1 > & dparm ()
 
double & dparm (int idxparam)
 
Index cols () const
 
Index rows () const
 
ComputationInfo info () const
 Reports whether previous computation was successful. More...
 
template<typename Rhs >
const internal::sparse_solve_retval< PastixBase, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 

Protected Member Functions

void init ()
 
void analyzePattern (ColSpMatrix &mat)
 
void factorize (ColSpMatrix &mat)
 
void clean ()
 
void compute (ColSpMatrix &mat)
 

Protected Attributes

int m_initisOk
 
int m_analysisIsOk
 
int m_factorizationIsOk
 
bool m_isInitialized
 
ComputationInfo m_info
 
pastix_data_t * m_pastixdata
 
int m_comm
 
Matrix< int, IPARM_SIZE, 1 > m_iparm
 
Matrix< double, DPARM_SIZE, 1 > m_dparm
 
Matrix< Index, Dynamic, 1 > m_perm
 
Matrix< Index, Dynamic, 1 > m_invp
 
int m_size
 

Detailed Description

template<class Derived>
class Eigen::PastixBase< Derived >

Definition at line 120 of file PaStiXSupport.h.

Member Function Documentation

template<class Derived>
Array<RealScalar,IPARM_SIZE,1>& Eigen::PastixBase< Derived >::dparm ( )
inline

Returns a reference to the double vector DPARM of PaStiX parameters The statistics related to the different phases of factorization and solve are saved here as well

See also
analyzePattern() factorize()

Definition at line 192 of file PaStiXSupport.h.

193  {
194  return m_dparm;
195  }
template<class Derived>
double& Eigen::PastixBase< Derived >::dparm ( int  idxparam)
inline

Return a reference to a particular index parameter of the DPARM vector

See also
dparm()

Definition at line 201 of file PaStiXSupport.h.

202  {
203  return m_dparm(idxparam);
204  }
template<class Derived>
ComputationInfo Eigen::PastixBase< Derived >::info ( ) const
inline

Reports whether previous computation was successful.

Returns
Success if computation was succesful, NumericalIssue if the PaStiX reports a problem InvalidInput if the input matrix is invalid
See also
iparm()

Definition at line 217 of file PaStiXSupport.h.

218  {
219  eigen_assert(m_isInitialized && "Decomposition is not initialized.");
220  return m_info;
221  }
template<class Derived >
void Eigen::PastixBase< Derived >::init ( )
protected

Initialize the PaStiX data structure. A first call to this function fills iparm and dparm with the default PaStiX parameters

See also
iparm() dparm()

Definition at line 279 of file PaStiXSupport.h.

280 {
281  m_size = 0;
282  m_iparm.setZero(IPARM_SIZE);
283  m_dparm.setZero(DPARM_SIZE);
284 
285  m_iparm(IPARM_MODIFY_PARAMETER) = API_NO;
286  pastix(&m_pastixdata, MPI_COMM_WORLD,
287  0, 0, 0, 0,
288  0, 0, 0, 1, m_iparm.data(), m_dparm.data());
289 
290  m_iparm[IPARM_MATRIX_VERIFICATION] = API_NO;
291  m_iparm[IPARM_VERBOSE] = 2;
292  m_iparm[IPARM_ORDERING] = API_ORDER_SCOTCH;
293  m_iparm[IPARM_INCOMPLETE] = API_NO;
294  m_iparm[IPARM_OOC_LIMIT] = 2000;
295  m_iparm[IPARM_RHS_MAKING] = API_RHS_B;
296  m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO;
297 
298  m_iparm(IPARM_START_TASK) = API_TASK_INIT;
299  m_iparm(IPARM_END_TASK) = API_TASK_INIT;
300  internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar*)0,
301  0, 0, 0, 0, m_iparm.data(), m_dparm.data());
302 
303  // Check the returned error
304  if(m_iparm(IPARM_ERROR_NUMBER)) {
305  m_info = InvalidInput;
306  m_initisOk = false;
307  }
308  else {
309  m_info = Success;
310  m_initisOk = true;
311  }
312 }
EIGEN_STRONG_INLINE const Scalar * data() const
Derived & setZero(Index size)
template<class Derived>
Array<Index,IPARM_SIZE,1>& Eigen::PastixBase< Derived >::iparm ( )
inline

Returns a reference to the integer vector IPARM of PaStiX parameters to modify the default parameters. The statistics related to the different phases of factorization and solve are saved here as well

See also
analyzePattern() factorize()

Definition at line 174 of file PaStiXSupport.h.

175  {
176  return m_iparm;
177  }
template<class Derived>
int& Eigen::PastixBase< Derived >::iparm ( int  idxparam)
inline

Return a reference to a particular index parameter of the IPARM vector

See also
iparm()

Definition at line 183 of file PaStiXSupport.h.

184  {
185  return m_iparm(idxparam);
186  }
template<class Derived>
template<typename Rhs >
const internal::solve_retval<PastixBase, Rhs> Eigen::PastixBase< Derived >::solve ( const MatrixBase< Rhs > &  b) const
inline
Returns
the solution x of $ A x = b $ using the current decomposition of A.
See also
compute()

Definition at line 149 of file PaStiXSupport.h.

150  {
151  eigen_assert(m_isInitialized && "Pastix solver is not initialized.");
152  eigen_assert(rows()==b.rows()
153  && "PastixBase::solve(): invalid number of rows of the right hand side matrix b");
154  return internal::solve_retval<PastixBase, Rhs>(*this, b.derived());
155  }
template<class Derived>
template<typename Rhs >
const internal::sparse_solve_retval<PastixBase, Rhs> Eigen::PastixBase< Derived >::solve ( const SparseMatrixBase< Rhs > &  b) const
inline
Returns
the solution x of $ A x = b $ using the current decomposition of A.
See also
compute()

Definition at line 229 of file PaStiXSupport.h.

230  {
231  eigen_assert(m_isInitialized && "Pastix LU, LLT or LDLT is not initialized.");
232  eigen_assert(rows()==b.rows()
233  && "PastixBase::solve(): invalid number of rows of the right hand side matrix b");
234  return internal::sparse_solve_retval<PastixBase, Rhs>(*this, b.derived());
235  }

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