Amesos_Mumps Class Reference

Amesos_Mumps: An object-oriented wrapper for Mumps. More...

#include <Amesos_Mumps.h>

Inheritance diagram for Amesos_Mumps:

[legend]
Collaboration diagram for Amesos_Mumps:
[legend]
List of all members.

Public Member Functions

int SetUseTranspose (bool UseTranspose)
 Returns true if MUMPS can handle this matrix shape.
int ComputeSchurComplement (bool flag, int NumSchurComplementRows, int *SchurComplementRows)
 Returns the Schur complement matrix as an Epetra_CrsMatrix.
Epetra_CrsMatrixGetCrsSchurComplement ()
 Returns the Schur complement in an Epetra_CrsMatrix on host only.
Epetra_SerialDenseMatrixGetDenseSchurComplement ()
 Returns the Schur complement as a SerialDenseMatrix (on host only).
bool UseTranspose () const
 Returns the current UseTranspose setting.
int SetParameters (Teuchos::ParameterList &ParameterList)
 Updates internal variables.
int SetPrecscaling (double *ColSca, double *RowSca)
 Set prescaling.
int SetRowScaling (double *RowSca)
int SetColScaling (double *ColSca)
int SetOrdering (int *PermIn)
 Set ordering.
int SetMaxis (int Maxis)
int SetMaxs (int Maxs)
double * GetRINFO ()
 Get the pointer to the RINFO array (defined on all processes).
int * GetINFO ()
 Get the pointer to the INFO array (defined on all processes).
double * GetRINFOG ()
 Get the pointer to the RINFOG array (defined on host only).
int * GetINFOG ()
 Get the pointer to the INFOG array (defined on host only).
int SetICNTL (int *ictnl)
 Copy the input array into the internally stored ICNTL array.
int SetICNTL (int pos, int value)
 Set ICNTL[pos] to value. pos is expressed in FORTRAN style (starting from 1).
int SetCNTL (double *ctnl)
 Copy the input array into the internally stored CNTL array.
int SetCNTL (int pos, double value)
 Set CNTL[pos] to value. pos is expressed in FORTRAN style (starting from 1).
void PrintTiming ()
 Print timing information.
void PrintStatus ()
 Print information about the factorization and solution phases.
void SetUseMpiCommSelf ()
Constructor methods
 Amesos_Mumps (const Epetra_LinearProblem &LinearProblem)
 Amesos_Mumps Constructor.
 ~Amesos_Mumps (void)
 Amesos_Mumps Destructor.
Mathematical functions.
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).
void Destroy ()

Protected Member Functions

int ConvertToTriplet ()
int ConvertToTripletValues ()
int PerformSymbolicFactorization ()
int PerformNumericFactorization ()
void CheckError ()
void CheckParameters ()
void SetICNTLandCNTL ()
void RedistributeMatrix (const int NumProcs)
void RedistributeMatrixValues (const int NumProcs)

Protected Attributes

bool SymbolicFactorizationOK_
bool NumericFactorizationOK_
bool IsConvertToTripletOK_
bool IsComputeSchurComplementOK_
bool UseMpiCommSelf_
DMUMPS_STRUC_C MDS
Epetra_IntSerialDenseVectorRow
Epetra_IntSerialDenseVectorCol
Epetra_SerialDenseVectorVal
int MyPID
int numentries_
int NumGlobalElements_
bool KeepMatrixDistributed_
int MaxProcs_
int MaxProcsInputMatrix_
const Epetra_MapMap_
int NumMUMPSNonzeros_
int NumMyMUMPSNonzeros_
bool UseTranspose_
bool AddDiagElement_
double AddToDiag_
bool PrintTiming_
bool PrintStatus_
bool ComputeVectorNorms_
bool ComputeTrueResidual_
int MatrixProperty_
double Threshold_
int icntl_ [40]
double cntl_ [5]
double * RowSca_
double * ColSca_
int * PermIn_
int Maxis_
int Maxs_
int NumSchurComplementRows_
int * SchurComplementRows_
Epetra_CrsMatrixCrsSchurComplement_
Epetra_SerialDenseMatrixDenseSchurComplement_
int verbose_
int debug_
EpetraExt_RedistorRedistor_
Epetra_RowMatrixOldMatrix_
Epetra_MultiVectorTargetVector_
double ConTime_
double SymTime_
double NumTime_
double SolTime_
double VecTime_
double MatTime_
int NumSymbolicFact_
int NumNumericFact_
int NumSolve_
Epetra_Time Time

Detailed Description

Amesos_Mumps: An object-oriented wrapper for Mumps.

Amesos_Mumps will solve a linear systems of equations: A X = B using Epetra objects and the Mumps solver library, where A is an Epetra_RowMatrix and X and B are Epetra_MultiVector objects.

Mumps execution can be tuned through a variety of parameters. Amesos_Mumps.h allows control of these parameters through the following named parameters, ignoring parameters with names that it does not recognize. Where possible, the parameters are common to all direct solvers (although some may ignore them). However, some parameters, in particular tuning parameters, are unique to each solver.

MUMPS will not perform column permutation on a matrix provided in distributed form. Amesos_Mumps will match this, allowing column permutation only if the matrix is provided in serial form. This is unfortunate because it is an exception to the general rule that the capability (given adequate memory) of any class implementing the Amesos_BaseSolver base class does not depend on the distribution of the input matrix. However, neither of the other options are attractive. Coalescing the matrix to a single process independent of whether column permutation is requested unnecessarily limits the size problem that can be solved. Coalescing the matrix to a single process only when column permutation is requested would cause some problems to run out of memory when column permutation is requested.

This class should be used with MUMPS 4.3 or 4.3.1 (never tested with older versions of MUMPS, and developed with 4.3.1).

Author:
Marzio Sala, 9214


Constructor & Destructor Documentation

Amesos_Mumps::Amesos_Mumps const Epetra_LinearProblem LinearProblem  ) 
 

Amesos_Mumps Constructor.

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

Note: The operator in LinearProblem must be an Epetra_RowMatrix.

Amesos_Mumps::~Amesos_Mumps void   ) 
 

Amesos_Mumps Destructor.

Completely deletes an Amesos_Mumps object.


Member Function Documentation

int Amesos_Mumps::ComputeSchurComplement bool  flag,
int  NumSchurComplementRows,
int *  SchurComplementRows
 

Returns the Schur complement matrix as an Epetra_CrsMatrix.

Returns the (dense) Schur complement matrix as an Epetra_CrsMatrix. This matrix is defined on all the processes in the Epetra Communicator. However, it has rows on the host process only. If flag : if true, MUMPS will compute the Schur complement matrix, with respect to the (global) rows defined in the integer array SchurComplementRows, of size NumSchurComplementRows. Those two arrays are defined on the host only.

Epetra_CrsMatrix * Amesos_Mumps::GetCrsSchurComplement  ) 
 

Returns the Schur complement in an Epetra_CrsMatrix on host only.

Returns the Schur complement in an Epetra_CrsMatrix on host only. Note that no checks are performed to see whether this action is legal or not (that is, if the call comes after the solver has been invocated). Epetra_CrsMatrix must be freed by the user!

Epetra_SerialDenseMatrix * Amesos_Mumps::GetDenseSchurComplement  ) 
 

Returns the Schur complement as a SerialDenseMatrix (on host only).

Returns the Schur complement in an Epetra_SerialDenseMatrix on host only. Note that no checks are performed to see whether this action is legal or not (that is, if the call comes after the solver has been invocated). Epetra_SerialDenseMatrix must be freed by the user!

int Amesos_Mumps::NumericFactorization  )  [virtual]
 

Performs NumericFactorization on the matrix A.

In addition to performing numeric factorization (and symbolic factorization if necessary) 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().

preconditions:

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).
  • MDS will be modified to reflect the numeric factorization which has been performed.

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

Implements Amesos_BaseSolver.

int Amesos_Mumps::SetOrdering int *  PermIn  )  [inline]
 

Set ordering.

Use integer vectors of size N (global dimension of the matrix) as given ordering. PermIn must be defined on the host only, and allocated by the user, if the user sets ICNTL(7) = 1.

int Amesos_Mumps::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.

int Amesos_Mumps::SetPrecscaling double *  ColSca,
double *  RowSca
[inline]
 

Set prescaling.

Use double precision vectors of size N (global dimension of the matrix) as scaling for columns and rows. ColSca and RowSca must be defined on the host only, and allocated by the user, if the user sets ICNTL(8) = -1.

int Amesos_Mumps::SetUseTranspose bool  UseTranspose  )  [inline, virtual]
 

Returns true if MUMPS can handle this matrix shape.

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

Implements Amesos_BaseSolver.

int Amesos_Mumps::Solve  )  [virtual]
 

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

preconditions:

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.

int Amesos_Mumps::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().

preconditions:

postconditions:

  • Symbolic Factorization will be performed (or marked to be performed) allowing NumericFactorization() and Solve() to be called.
  • MDS will be modified to reflect the symbolic factorization which has been performed.

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

Implements Amesos_BaseSolver.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:42:57 2008 for Amesos by doxygen 1.3.9.1