Amesos Package Browser (Single Doxygen Collection) Development
Private Attributes
Amesos_Paraklete Class Reference

Amesos_Paraklete: A serial, unblocked code ideal for getting started and for very sparse matrices, such as circuit matrces. More...

#include <Amesos_Paraklete.h>

Inheritance diagram for Amesos_Paraklete:
Inheritance graph
[legend]

List of all members.

Private Attributes

bool IamInGroup_
int SerialXlda_
Teuchos::RCP
< Amesos_Paraklete_Pimpl
PrivateParakleteData_
Teuchos::RCP
< Amesos_StandardIndex
StdIndex_
Teuchos::RCP
< Amesos_StandardIndex
StdIndexRange_
Teuchos::RCP
< Amesos_StandardIndex
StdIndexDomain_
MPI_Comm ParakleteComm_
std::vector< long > Ap
 Ap, Ai, Aval form the compressed row storage used by Paraklete Ai and Aval can point directly into a matrix if it is StorageOptimized(), hence they may either be in vector form or may be a pointer into Epetra_CrsMatrix internals.
std::vector< long > Ai
std::vector< double > VecAval
double * Aval
int UseDataInPlace_
 1 if Problem_->GetOperator() is stored entirely on process 0
int numentries_
 Number of non-zero entries in Problem_->GetOperator()
int NumGlobalElements_
 Number of rows and columns in the Problem_->GetOperator()
Epetra_RowMatrixRowMatrixA_
 Operator converted to a RowMatrix.
Epetra_CrsMatrixCrsMatrixA_
 Operator converted to a CrsMatrix.
Teuchos::RCP< Epetra_MapSerialMap_
 Points to a Serial Map (unused if UseDataInPlace_ == 1 )
Teuchos::RCP< Epetra_CrsMatrixSerialCrsMatrixA_
 Points to a Serial Copy of A (unused if UseDataInPlace_==1)
Epetra_RowMatrixStdIndexMatrix_
 Points to a Contiguous Copy of A.
Epetra_MultiVectorStdIndexDomainVector_
Epetra_MultiVectorStdIndexRangeVector_
Epetra_RowMatrixSerialMatrix_
 Points to a Serial Copy of A.
bool TrustMe_
 If true, no checks are made and the matrix is assume to be distributed.
int NumVectors_
 Number of vectors in RHS and LHS.
double * SerialXBvalues_
 Pointer to the actual values in the serial version of X and B.
double * SerialBvalues_
Epetra_MultiVectorSerialB_
 Serial versions of the LHS and RHS (may point to the original vector if serial)
Epetra_MultiVectorSerialX_
Teuchos::RCP< Epetra_MultiVectorSerialXextract_
 Serial versions of the LHS and RHS (if necessary)
Teuchos::RCP< Epetra_MultiVectorSerialBextract_
bool UseTranspose_
 If true, the transpose of A is used.
const Epetra_LinearProblemProblem_
 Pointer to the linear system problem.
std::vector< int > ColIndicesV_
 Only used for RowMatrices to extract copies.
std::vector< double > RowValuesV_
 Only used for RowMatrices to extract copies.
Teuchos::RCP< Epetra_ImportImportToSerial_
 Importer to process 0.
Teuchos::RCP< Epetra_ImportImportRangeToSerial_
Teuchos::RCP< Epetra_ImportImportDomainToSerial_
int MtxConvTime_
 Quick access pointers to internal timing information.
int MtxRedistTime_
int VecRedistTime_
int SymFactTime_
int NumFactTime_
int SolveTime_
int OverheadTime_
 Amesos_Paraklete (const Epetra_LinearProblem &LinearProblem)
 Amesos_Paraklete Constructor.
 ~Amesos_Paraklete (void)
 Amesos_Paraklete Destructor.
int SymbolicFactorization ()
 Performs SymbolicFactorization on the matrix A.
int NumericFactorization ()
 Performs NumericFactorization on the matrix A.
int Solve ()
 Solves A X = B (or AT x = B)
const Epetra_LinearProblemGetProblem () const
 Get a pointer to the Problem.
bool MatrixShapeOK () const
 Returns true if PARAKLETE can handle this matrix shape.
int SetUseTranspose (bool UseTranspose_in)
 SetUseTranpose()
bool UseTranspose () const
 Returns the current UseTranspose setting.
const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator.
int SetParameters (Teuchos::ParameterList &ParameterList)
 Updates internal variables.
int NumSymbolicFact () const
 Returns the number of symbolic factorizations performed by this object.
int NumNumericFact () const
 Returns the number of numeric factorizations performed by this object.
int NumSolve () const
 Returns the number of solves performed by this object.
void PrintTiming () const
 Prints timing information.
void PrintStatus () const
 Prints information about the factorization and solution phases.
void GetTiming (Teuchos::ParameterList &TimingParameterList) const
 Extracts timing information from the current solver and places it in the parameter list.
int CreateLocalMatrixAndExporters ()
int ExportToSerial ()
int ConvertToParakleteCRS (bool firsttime)
int PerformSymbolicFactorization ()
int PerformNumericFactorization ()

Detailed Description

Amesos_Paraklete: A serial, unblocked code ideal for getting started and for very sparse matrices, such as circuit matrces.

Interface to PARAKLETE internal solver.Interface to PARAKLETE internal solver.

Class Amesos_Paraklete is an object-oriented wrapper for PARAKLETE. PARAKLETE, whose sources are distributed within Amesos, is a serial solver for sparse matrices. PARAKLETE will solve a linear system of equations: $A X = B$, where A is an Epetra_RowMatrix and X and B are Epetra_MultiVector objects.

Amesos_Paraklete computes $A^T X = B$ more efficiently than $>A X = B$. The latter requires a matrix transpose -- which costs both time and space.

Paraklete is Tim Davis' parallel version of KLU a low overhead non-blocked code which solves very sparse matrices fast.

Date:
Last updated on 24-May-05.

Definition at line 94 of file Amesos_Paraklete.h.


Constructor & Destructor Documentation

Amesos_Paraklete::Amesos_Paraklete ( const Epetra_LinearProblem LinearProblem)

Amesos_Paraklete Constructor.

Creates an Amesos_Paraklete instance, using an Epetra_LinearProblem, passing in an already-defined Epetra_LinearProblem object.

Note: The operator in LinearProblem must be an Epetra_RowMatrix.

Definition at line 101 of file Amesos_Paraklete.cpp.

Amesos_Paraklete::~Amesos_Paraklete ( void  )

Amesos_Paraklete Destructor.

Definition at line 125 of file Amesos_Paraklete.cpp.


Member Function Documentation

int Amesos_Paraklete::SymbolicFactorization ( ) [virtual]

Performs SymbolicFactorization on the matrix A.

In addition to performing symbolic factorization on the matrix A, the call to SymbolicFactorization() implies that no change will be made to the non-zero structure of the underlying matrix without a subsequent call to SymbolicFactorization().

<br >Preconditions:

<br >Postconditions:

Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

Definition at line 594 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::NumericFactorization ( ) [virtual]

Performs NumericFactorization on the matrix A.

In addition to performing numeric factorization on the matrix A, the call to NumericFactorization() implies that no change will be made to the underlying matrix without a subsequent call to NumericFactorization().

<br >Preconditions:

  • GetProblem().GetOperator() != 0 (return -1)
  • MatrixShapeOk(GetProblem().GetOperator()) == true (return -6)
  • The non-zero structure of the matrix should not have changed since the last call to SymbolicFactorization(). (return -2 if the number of non-zeros changes) Other changes can have arbitrary consequences.
  • The distribution of the matrix should not have changed since the last call to SymbolicFactorization()
  • The matrix should be indexed from 0 to n-1, unless the parameter "Reindex" was set to "true" prior to the call to SymbolicFactorization(). (return -3 - if caught)
  • The paremeter "Reindex" should not be set to "true" except on CrsMatrices. (return -4)
  • The paremeter "Reindex" should not be set to "true" unless Amesos was built with EpetraExt, i.e. with --enable-epetraext on the configure line. (return -4)
  • Internal errors retur -5.

<br >Postconditions:

  • Numeric Factorization will be performed (or marked to be performed) allowing Solve() to be performed correctly despite a potential change in in the matrix values (though not in the non-zero structure).
Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

Definition at line 706 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::Solve ( ) [virtual]

Solves A X = B (or AT x = B)

<br >Preconditions:

<br >Postconditions:

  • X will be set such that A X = B (or AT X = B), within the limits of the accuracy of the underlying solver.
Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

Definition at line 745 of file Amesos_Paraklete.cpp.

const Epetra_LinearProblem* Amesos_Paraklete::GetProblem ( ) const [inline, virtual]

Get a pointer to the Problem.

Implements Amesos_BaseSolver.

Definition at line 130 of file Amesos_Paraklete.h.

bool Amesos_Paraklete::MatrixShapeOK ( ) const [virtual]

Returns true if PARAKLETE can handle this matrix shape.

Returns true if the matrix shape is one that PARAKLETE can handle. PARAKLETE only works with square matrices.

Implements Amesos_BaseSolver.

Definition at line 563 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::SetUseTranspose ( bool  UseTranspose_in) [inline, virtual]

SetUseTranpose()

If SetUseTranspose() is set to true, $A^T X = B$ is computed.

Implements Amesos_BaseSolver.

Definition at line 143 of file Amesos_Paraklete.h.

bool Amesos_Paraklete::UseTranspose ( ) const [inline, virtual]

Returns the current UseTranspose setting.

Implements Amesos_BaseSolver.

Definition at line 145 of file Amesos_Paraklete.h.

const Epetra_Comm& Amesos_Paraklete::Comm ( ) const [inline, virtual]

Returns a pointer to the Epetra_Comm communicator associated with this operator.

Implements Amesos_BaseSolver.

Definition at line 147 of file Amesos_Paraklete.h.

int Amesos_Paraklete::SetParameters ( Teuchos::ParameterList ParameterList) [virtual]

Updates internal variables.

<br >Preconditions:

  • None.

<br >Postconditions:

  • Internal variables controlling the factorization and solve will be updated and take effect on all subseuent calls to NumericFactorization() and Solve().
  • All parameters whose value are to differ from the default values must be included in ParameterList. Parameters not specified in ParameterList revert to their default values.
Returns:
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

Definition at line 488 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::NumSymbolicFact ( ) const [inline, virtual]

Returns the number of symbolic factorizations performed by this object.

Implements Amesos_BaseSolver.

Definition at line 152 of file Amesos_Paraklete.h.

int Amesos_Paraklete::NumNumericFact ( ) const [inline, virtual]

Returns the number of numeric factorizations performed by this object.

Implements Amesos_BaseSolver.

Definition at line 155 of file Amesos_Paraklete.h.

int Amesos_Paraklete::NumSolve ( ) const [inline, virtual]

Returns the number of solves performed by this object.

Implements Amesos_BaseSolver.

Definition at line 158 of file Amesos_Paraklete.h.

void Amesos_Paraklete::PrintTiming ( ) const [virtual]

Prints timing information.

Implements Amesos_BaseSolver.

Definition at line 896 of file Amesos_Paraklete.cpp.

void Amesos_Paraklete::PrintStatus ( ) const [virtual]

Prints information about the factorization and solution phases.

Implements Amesos_BaseSolver.

Definition at line 873 of file Amesos_Paraklete.cpp.

void Amesos_Paraklete::GetTiming ( Teuchos::ParameterList TimingParameterList) const [inline, virtual]

Extracts timing information from the current solver and places it in the parameter list.

Reimplemented from Amesos_BaseSolver.

Definition at line 167 of file Amesos_Paraklete.h.

int Amesos_Paraklete::CreateLocalMatrixAndExporters ( ) [private]

Definition at line 205 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::ExportToSerial ( ) [private]

Definition at line 139 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::ConvertToParakleteCRS ( bool  firsttime) [private]

Definition at line 352 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::PerformSymbolicFactorization ( ) [private]

Definition at line 519 of file Amesos_Paraklete.cpp.

int Amesos_Paraklete::PerformNumericFactorization ( ) [private]

Definition at line 537 of file Amesos_Paraklete.cpp.


Member Data Documentation

Definition at line 239 of file Amesos_Paraklete.h.

Definition at line 241 of file Amesos_Paraklete.h.

Definition at line 246 of file Amesos_Paraklete.h.

Definition at line 247 of file Amesos_Paraklete.h.

Definition at line 248 of file Amesos_Paraklete.h.

Definition at line 249 of file Amesos_Paraklete.h.

Definition at line 250 of file Amesos_Paraklete.h.

std::vector<long> Amesos_Paraklete::Ap [private]

Ap, Ai, Aval form the compressed row storage used by Paraklete Ai and Aval can point directly into a matrix if it is StorageOptimized(), hence they may either be in vector form or may be a pointer into Epetra_CrsMatrix internals.

Ap must always be constructed.

Definition at line 256 of file Amesos_Paraklete.h.

std::vector<long> Amesos_Paraklete::Ai [private]

Definition at line 257 of file Amesos_Paraklete.h.

std::vector<double> Amesos_Paraklete::VecAval [private]

Definition at line 258 of file Amesos_Paraklete.h.

double* Amesos_Paraklete::Aval [private]

Definition at line 259 of file Amesos_Paraklete.h.

1 if Problem_->GetOperator() is stored entirely on process 0

Definition at line 262 of file Amesos_Paraklete.h.

Number of non-zero entries in Problem_->GetOperator()

Definition at line 264 of file Amesos_Paraklete.h.

Number of rows and columns in the Problem_->GetOperator()

Definition at line 266 of file Amesos_Paraklete.h.

Operator converted to a RowMatrix.

Definition at line 269 of file Amesos_Paraklete.h.

Operator converted to a CrsMatrix.

Definition at line 271 of file Amesos_Paraklete.h.

Points to a Serial Map (unused if UseDataInPlace_ == 1 )

Definition at line 281 of file Amesos_Paraklete.h.

Points to a Serial Copy of A (unused if UseDataInPlace_==1)

Definition at line 283 of file Amesos_Paraklete.h.

Points to a Contiguous Copy of A.

Definition at line 285 of file Amesos_Paraklete.h.

Definition at line 286 of file Amesos_Paraklete.h.

Definition at line 287 of file Amesos_Paraklete.h.

Points to a Serial Copy of A.

Definition at line 289 of file Amesos_Paraklete.h.

If true, no checks are made and the matrix is assume to be distributed.

Definition at line 295 of file Amesos_Paraklete.h.

Number of vectors in RHS and LHS.

Definition at line 297 of file Amesos_Paraklete.h.

Pointer to the actual values in the serial version of X and B.

Definition at line 299 of file Amesos_Paraklete.h.

Definition at line 300 of file Amesos_Paraklete.h.

Serial versions of the LHS and RHS (may point to the original vector if serial)

Definition at line 302 of file Amesos_Paraklete.h.

Definition at line 303 of file Amesos_Paraklete.h.

Serial versions of the LHS and RHS (if necessary)

Definition at line 305 of file Amesos_Paraklete.h.

Definition at line 306 of file Amesos_Paraklete.h.

If true, the transpose of A is used.

Definition at line 309 of file Amesos_Paraklete.h.

Pointer to the linear system problem.

Definition at line 311 of file Amesos_Paraklete.h.

std::vector<int> Amesos_Paraklete::ColIndicesV_ [private]

Only used for RowMatrices to extract copies.

Definition at line 314 of file Amesos_Paraklete.h.

std::vector<double> Amesos_Paraklete::RowValuesV_ [private]

Only used for RowMatrices to extract copies.

Definition at line 316 of file Amesos_Paraklete.h.

Importer to process 0.

Definition at line 318 of file Amesos_Paraklete.h.

Definition at line 319 of file Amesos_Paraklete.h.

Definition at line 320 of file Amesos_Paraklete.h.

Quick access pointers to internal timing information.

Definition at line 323 of file Amesos_Paraklete.h.

Definition at line 323 of file Amesos_Paraklete.h.

Definition at line 323 of file Amesos_Paraklete.h.

Definition at line 324 of file Amesos_Paraklete.h.

Definition at line 324 of file Amesos_Paraklete.h.

Definition at line 324 of file Amesos_Paraklete.h.

Definition at line 324 of file Amesos_Paraklete.h.


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