Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Protected Attributes | List of all members
Amesos_Merikos Class Reference

Amesos_Merikos: A parallel divide and conquer solver. More...

#include <Amesos_Merikos.h>

Inheritance diagram for Amesos_Merikos:
Inheritance graph
[legend]

Protected Attributes

bool UseTranspose_
 
const Epetra_LinearProblemProblem_
 
Epetra_CrsMatrixL
 
Epetra_CrsMatrixU
 
bool PrintTiming_
 
bool PrintStatus_
 
bool ComputeVectorNorms_
 
bool ComputeTrueResidual_
 
int verbose_
 
int debug_
 
double ConTime_
 
double SymTime_
 
double NumTime_
 
double SolTime_
 
double VecTime_
 
double MatTime_
 
int NumSymbolicFact_
 
int NumNumericFact_
 
int NumSolve_
 
Epetra_TimeTime_
 
Epetra_MapScaLAPACK1DMap_
 
Epetra_CrsMatrixScaLAPACK1DMatrix_
 
Epetra_MapVectorMap_
 
std::vector< double > DenseA_
 
std::vector< int > Ipiv_
 
int NumOurRows_
 
int NumOurColumns_
 
bool TwoD_distribution_
 
int grid_nb_
 
int mypcol_
 
int myprow_
 
Epetra_CrsMatrixFatOut_
 
int nb_
 
int lda_
 
int iam_
 
int nprow_
 
int npcol_
 
int NumGlobalElements_
 
int m_per_p_
 
 Amesos_Merikos (const Epetra_LinearProblem &LinearProblem)
 Amesos_Merikos Constructor. More...
 
 ~Amesos_Merikos (void)
 Amesos_Merikos Destructor. More...
 
int RedistributeA ()
 Performs SymbolicFactorization on the matrix A. More...
 
int ConvertToScalapack ()
 
int PerformNumericFactorization ()
 
int SymbolicFactorization ()
 Performs SymbolicFactorization on the matrix A. More...
 
int NumericFactorization ()
 Performs NumericFactorization on the matrix A. More...
 
int LSolve ()
 Solves L X = B. More...
 
int USolve ()
 Solves U X = B. More...
 
int Solve ()
 Solves A X = B. More...
 
const Epetra_LinearProblemGetProblem () const
 Get a pointer to the Problem. More...
 
bool MatrixShapeOK () const
 Returns true if MERIKOS can handle this matrix shape. More...
 
int SetUseTranspose (bool UseTranspose)
 SetUseTranpose() controls whether to compute AX=B or ATX = B. More...
 
bool UseTranspose () const
 Returns the current UseTranspose setting. More...
 
const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this matrix. More...
 
int SetParameters (Teuchos::ParameterList &ParameterList)
 Updates internal variables. More...
 
int NumSymbolicFact () const
 Returns the number of symbolic factorizations performed by this object. More...
 
int NumNumericFact () const
 Returns the number of numeric factorizations performed by this object. More...
 
int NumSolve () const
 Returns the number of solves performed by this object. More...
 
void PrintTiming ()
 Print timing information. More...
 
void PrintStatus ()
 Print information about the factorization and solution phases. More...
 

Additional Inherited Members

- Public Member Functions inherited from Amesos_BaseSolver
virtual ~Amesos_BaseSolver ()
 Destructor. More...
 
virtual void PrintStatus () const =0
 Prints status information about the current solver. More...
 
virtual void PrintTiming () const =0
 Prints timing information about the current solver. More...
 
virtual void setParameterList (Teuchos::RCP< Teuchos::ParameterList > const &paramList)
 Redefined from Teuchos::ParameterListAcceptor (Does Not Work) More...
 
virtual Teuchos::RCP
< Teuchos::ParameterList
getNonconstParameterList ()
 This is an empty stub. More...
 
virtual Teuchos::RCP
< Teuchos::ParameterList
unsetParameterList ()
 This is an empty stub. More...
 
virtual void GetTiming (Teuchos::ParameterList &TimingParameterList) const
 Extracts timing information from the current solver and places it in the parameter list. (Does Not Work) More...
 
- Public Member Functions inherited from Teuchos::ParameterListAcceptor
virtual RCP< const ParameterListgetParameterList () const
 
virtual RCP< const ParameterListgetValidParameters () const
 

Detailed Description

Amesos_Merikos: A parallel divide and conquer solver.



Merikos partitions the rows of a matrix into two or more disjoint submatrices. i.e. if rows i and j are in different submatrices, A[i,j] == 0 == A[j,i]. Rows/columns not in any of the submatrices, i.e. the rows/columsn of the separator, are permuted to the bottom right.



Merikos factors each of the disjoint submatrices in parallel, (potentially by calling Amesos_Merikos() recursively), updating the rows and columns of the separator which belong to it and forming the schur complement of those rows and columns of the separator.



Merikos updates the trailing block of the matrix and then factors it.



Merikos is a Greek word for partial, reflecting the fact that Amesos_Merikos uses a series of partial LU factorizations, performed in parallel, to piece together the full LU decomposition.

Definition at line 154 of file Amesos_Merikos.h.

Constructor & Destructor Documentation

Amesos_Merikos::Amesos_Merikos ( const Epetra_LinearProblem LinearProblem)

Amesos_Merikos Constructor.

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

Amesos_Merikos::~Amesos_Merikos ( void  )

Amesos_Merikos Destructor.

Completely deletes an Amesos_Merikos object.

Member Function Documentation

int Amesos_Merikos::RedistributeA ( )

Performs SymbolicFactorization on the matrix A.

SymbolicFactorization() takes no action in Amesos_Merikos().

Returns
Integer error code, set to 0 if successful.
int Amesos_Merikos::ConvertToScalapack ( )
int Amesos_Merikos::PerformNumericFactorization ( )
int Amesos_Merikos::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.

int Amesos_Merikos::NumericFactorization ( )
virtual

Performs NumericFactorization on the matrix A.

    Static pivoting (i.e. scale and permute the matrix to
      produce a zero-free diagonal and to minimize the need for
      pivoting later).
    Partition the matrix 
    Redistribute the matrix to match the partitioning
    Foreach subblock of the matrix do:
      Note:  this will happen in parallel
      Create an instance of an Amesos solver object (must  
        support the Amesos_Component interface)
      Call PartialFactorization 
      Add the Schur Complement into the trailing block of the matrix.
    Endfor
    Create an Amesos instance for the trailing block of the matrix.
    Call SymbolicFactorization on the trailing block 
    Call NumericFactorization on the trailing block 
 \return Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

int Amesos_Merikos::LSolve ( )

Solves L X = B.

     | L11   0   0  |  X1      B1
     | L21 L22   0  |  X2   =  B2
     | L31 L32 L33  |  X3   =  B3
    Foreach subblock of the matrix do:
      Note:  this will happen in parallel
      Lsolve() 
        i.e. L11.Solve(X1, B1) and L22.Solve(X2, B2) 
      Update the elements of B corresponding to the seperator,
        i.e. B3 = B3 - L31 X1 - L32 X2 
    Endfor
    Perform a solve on the trailing matrix:
      i.e. L33.LSolve(X3,B3) 
 \return Integer error code, set to 0 if successful.
int Amesos_Merikos::USolve ( )

Solves U X = B.

     | U11 U12 U13  |  X1      B1
     |   0 U22 U23  |  X2   =  B2
     |   0   0 U33  |  X3   =  B3
    Perform a solve on the trailing matrix:
      i.e. U33.USolve(X3,B3) 
    Foreach subblock of the matrix do:
      Note:  this will happen in parallel
      Update the elements of B corresponding to this block
        i.e. B2 = B2 - U23 X3 ; B1 = B1 - U13 X3 
      Usolve() 
        i.e. U11.Solve(X1, B1) and U22.Solve(X2, B2) 
    Endfor
 \return Integer error code, set to 0 if successful.
int Amesos_Merikos::Solve ( )
virtual

Solves A X = B.

     | L11     U12     U13  |  X1      B1
     | L21     L22     U23  |  X2   =  B2
     | L31     L32         A33  |  X3   =  B3
    Foreach subblock of the matrix do:
      Note:  this will happen in parallel
      Lsolve() 
        i.e. L11.Solve(X1, B1) and L22.Solve(X2, B2) 
      Update the elements of B corresponding to the seperator,
        i.e. B3 = B3 - L31 X1 - L32 X2 
    Endfor
    Perform a solve on the trailing matrix:
      i.e. A33.Solve(X3,B3)
    B = X ;
    Foreach subblock of the matrix do:
      Note:  this will happen in parallel
      Update the elements of B corresponding to this block
        i.e. B2 = B2 - U23 X3 ; B1 = B1 - U13 X3 
      Usolve() 
        i.e. U11.Solve(X1, B1) and U22.Solve(X2, B2) 
    Endfor
 \return Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

const Epetra_LinearProblem* Amesos_Merikos::GetProblem ( ) const
inlinevirtual

Get a pointer to the Problem.

Implements Amesos_BaseSolver.

Definition at line 300 of file Amesos_Merikos.h.

bool Amesos_Merikos::MatrixShapeOK ( ) const
virtual

Returns true if MERIKOS can handle this matrix shape.

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

Implements Amesos_BaseSolver.

int Amesos_Merikos::SetUseTranspose ( bool  UseTranspose)
inlinevirtual

SetUseTranpose() controls whether to compute AX=B or ATX = B.

Implements Amesos_BaseSolver.

Definition at line 311 of file Amesos_Merikos.h.

bool Amesos_Merikos::UseTranspose ( ) const
inlinevirtual

Returns the current UseTranspose setting.

Implements Amesos_BaseSolver.

Definition at line 314 of file Amesos_Merikos.h.

const Epetra_Comm& Amesos_Merikos::Comm ( ) const
inlinevirtual

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

Implements Amesos_BaseSolver.

Definition at line 317 of file Amesos_Merikos.h.

int Amesos_Merikos::SetParameters ( Teuchos::ParameterList ParameterList)
virtual

Updates internal variables.

Returns
Integer error code, set to 0 if successful.

Implements Amesos_BaseSolver.

int Amesos_Merikos::NumSymbolicFact ( ) const
inlinevirtual

Returns the number of symbolic factorizations performed by this object.

Implements Amesos_BaseSolver.

Definition at line 326 of file Amesos_Merikos.h.

int Amesos_Merikos::NumNumericFact ( ) const
inlinevirtual

Returns the number of numeric factorizations performed by this object.

Implements Amesos_BaseSolver.

Definition at line 329 of file Amesos_Merikos.h.

int Amesos_Merikos::NumSolve ( ) const
inlinevirtual

Returns the number of solves performed by this object.

Implements Amesos_BaseSolver.

Definition at line 332 of file Amesos_Merikos.h.

void Amesos_Merikos::PrintTiming ( )

Print timing information.

void Amesos_Merikos::PrintStatus ( )

Print information about the factorization and solution phases.

Member Data Documentation

bool Amesos_Merikos::UseTranspose_
protected

Definition at line 344 of file Amesos_Merikos.h.

const Epetra_LinearProblem* Amesos_Merikos::Problem_
protected

Definition at line 345 of file Amesos_Merikos.h.

Epetra_CrsMatrix* Amesos_Merikos::L
protected

Definition at line 347 of file Amesos_Merikos.h.

Epetra_CrsMatrix* Amesos_Merikos::U
protected

Definition at line 348 of file Amesos_Merikos.h.

bool Amesos_Merikos::PrintTiming_
protected

Definition at line 350 of file Amesos_Merikos.h.

bool Amesos_Merikos::PrintStatus_
protected

Definition at line 351 of file Amesos_Merikos.h.

bool Amesos_Merikos::ComputeVectorNorms_
protected

Definition at line 352 of file Amesos_Merikos.h.

bool Amesos_Merikos::ComputeTrueResidual_
protected

Definition at line 353 of file Amesos_Merikos.h.

int Amesos_Merikos::verbose_
protected

Definition at line 355 of file Amesos_Merikos.h.

int Amesos_Merikos::debug_
protected

Definition at line 356 of file Amesos_Merikos.h.

double Amesos_Merikos::ConTime_
protected

Definition at line 359 of file Amesos_Merikos.h.

double Amesos_Merikos::SymTime_
protected

Definition at line 360 of file Amesos_Merikos.h.

double Amesos_Merikos::NumTime_
protected

Definition at line 361 of file Amesos_Merikos.h.

double Amesos_Merikos::SolTime_
protected

Definition at line 362 of file Amesos_Merikos.h.

double Amesos_Merikos::VecTime_
protected

Definition at line 363 of file Amesos_Merikos.h.

double Amesos_Merikos::MatTime_
protected

Definition at line 364 of file Amesos_Merikos.h.

int Amesos_Merikos::NumSymbolicFact_
protected

Definition at line 366 of file Amesos_Merikos.h.

int Amesos_Merikos::NumNumericFact_
protected

Definition at line 367 of file Amesos_Merikos.h.

int Amesos_Merikos::NumSolve_
protected

Definition at line 368 of file Amesos_Merikos.h.

Epetra_Time* Amesos_Merikos::Time_
protected

Definition at line 370 of file Amesos_Merikos.h.

Epetra_Map* Amesos_Merikos::ScaLAPACK1DMap_
protected

Definition at line 377 of file Amesos_Merikos.h.

Epetra_CrsMatrix* Amesos_Merikos::ScaLAPACK1DMatrix_
protected

Definition at line 379 of file Amesos_Merikos.h.

Epetra_Map* Amesos_Merikos::VectorMap_
protected

Definition at line 381 of file Amesos_Merikos.h.

std::vector<double> Amesos_Merikos::DenseA_
protected

Definition at line 382 of file Amesos_Merikos.h.

std::vector<int> Amesos_Merikos::Ipiv_
protected

Definition at line 383 of file Amesos_Merikos.h.

int Amesos_Merikos::NumOurRows_
protected

Definition at line 384 of file Amesos_Merikos.h.

int Amesos_Merikos::NumOurColumns_
protected

Definition at line 385 of file Amesos_Merikos.h.

bool Amesos_Merikos::TwoD_distribution_
protected

Definition at line 391 of file Amesos_Merikos.h.

int Amesos_Merikos::grid_nb_
protected

Definition at line 392 of file Amesos_Merikos.h.

int Amesos_Merikos::mypcol_
protected

Definition at line 393 of file Amesos_Merikos.h.

int Amesos_Merikos::myprow_
protected

Definition at line 394 of file Amesos_Merikos.h.

Epetra_CrsMatrix* Amesos_Merikos::FatOut_
protected

Definition at line 395 of file Amesos_Merikos.h.

int Amesos_Merikos::nb_
protected

Definition at line 400 of file Amesos_Merikos.h.

int Amesos_Merikos::lda_
protected

Definition at line 401 of file Amesos_Merikos.h.

int Amesos_Merikos::iam_
protected

Definition at line 403 of file Amesos_Merikos.h.

int Amesos_Merikos::nprow_
protected

Definition at line 404 of file Amesos_Merikos.h.

int Amesos_Merikos::npcol_
protected

Definition at line 405 of file Amesos_Merikos.h.

int Amesos_Merikos::NumGlobalElements_
protected

Definition at line 406 of file Amesos_Merikos.h.

int Amesos_Merikos::m_per_p_
protected

Definition at line 407 of file Amesos_Merikos.h.


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