#include <Amesos_Mumps.h>
Inheritance diagram for Amesos_Mumps:
Public Member Functions | |
| bool | MatrixShapeOK () const |
| Returns true if the solver can handle this matrix shape. | |
| const Epetra_Comm & | Comm () const |
| Returns a pointer to the Epetra_Comm communicator associated with this matrix. | |
| const Epetra_LinearProblem * | GetProblem () const |
| Gets a pointer to the Epetra_LinearProblem. | |
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 () |
| Destroys all data associated with this object. | |
| int | SetUseTranspose (bool UseTranspose) |
| If set true, X will be set to the solution of AT X = B (not A X = B). | |
| bool | UseTranspose () const |
| Returns the current UseTranspose setting. | |
| int | SetParameters (Teuchos::ParameterList &ParameterList) |
| Updates internal variables. | |
Print functions | |
| void | PrintTiming () |
| Prints timing information. | |
| void | PrintStatus () |
| Prints information about the factorization and solution phases. | |
MUMPS' specify functions | |
| int | ComputeSchurComplement (bool flag, int NumSchurComplementRows, int *SchurComplementRows) |
| Returns the Schur complement matrix as an Epetra_CrsMatrix. | |
| Epetra_CrsMatrix * | GetCrsSchurComplement () |
| Returns the Schur complement in an Epetra_CrsMatrix on host only. | |
| Epetra_SerialDenseMatrix * | GetDenseSchurComplement () |
| Returns the Schur complement as a SerialDenseMatrix (on host only). | |
| int | SetPrecscaling (double *ColSca, double *RowSca) |
| Set prescaling. | |
| int | SetRowScaling (double *RowSca) |
| Set row scaling. | |
| int | SetColScaling (double *ColSca) |
| Set column scaling. | |
| int | SetOrdering (int *PermIn) |
| Sets ordering. | |
| int | SetMaxis (int Maxis) |
| Sets the Maxis value (see MUMPS' manual). | |
| int | SetMaxs (int Maxs) |
| Sets the Maxs value (see MUMPS' manual). | |
| double * | GetRINFO () |
| Gets the pointer to the RINFO array (defined on all processes). | |
| int * | GetINFO () |
| Gets the pointer to the INFO array (defined on all processes). | |
| double * | GetRINFOG () |
| Gets 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) |
| Copies the input array (of size 40) 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 (of size 5) 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). | |
Protected Member Functions | |
| Epetra_RowMatrix & | Matrix () |
| Returns a reference to the linear system matrix. | |
| Epetra_Map & | RedistrMap () |
| Returns a reference to the map for redistributed matrix. | |
| Epetra_Import & | RedistrImporter () |
| Returns a reference for the redistributed importer. | |
| Epetra_RowMatrix & | RedistrMatrix (const bool ImportMatrix=false) |
Returns a reference to the redistributed matrix, imports it is ImportMatrix is true. | |
| Epetra_Map & | SerialMap () |
| Returns a reference to the map with all elements on process 0. | |
| Epetra_Import & | SerialImporter () |
| Returns a reference to the importer for SerialMap(). | |
| int | ConvertToTriplet (const bool OnlyValues) |
| Converts to MUMPS format (COO format). | |
| void | CheckError () |
| Checks for MUMPS error, prints them if any. See MUMPS' manual. | |
| void | CheckParameters () |
| Check input parameters. | |
| void | SetICNTLandCNTL () |
Protected Attributes | |
| bool | IsConvertToTripletOK_ |
true if matrix has already been converted to COO format | |
| bool | IsComputeSchurComplementOK_ |
true if the Schur complement has been computed (need to free memory) | |
| bool | NoDestroy_ |
| DMUMPS_STRUC_C | MDS |
| Mumps data structure for double-precision. | |
| vector< int > | Row |
| row indices of nonzero elements | |
| vector< int > | Col |
| column indices of nonzero elements | |
| vector< double > | Val |
| values of nonzero elements | |
| int | MaxProcs_ |
| Maximum number of processors in the MUMPS' communicator. | |
| bool | UseTranspose_ |
If true, solve the problem with AT. | |
| double | Threshold_ |
| Discard all elements whose absolute value is below this value. | |
| int | icntl_ [40] |
| double | cntl_ [5] |
| double * | RowSca_ |
| Row and column scaling. | |
| double * | ColSca_ |
| Row and column scaling. | |
| int * | PermIn_ |
| PermIn for MUMPS. | |
| int | Maxis_ |
| MAXIS for MUMPS. | |
| int | Maxs_ |
| int | NumSchurComplementRows_ |
| Number of rows in the Schur complement (if required). | |
| int * | SchurComplementRows_ |
| Rows for the Schur complement (if required). | |
| Epetra_CrsMatrix * | CrsSchurComplement_ |
| Pointer to the Schur complement, as CrsMatrix. | |
| Epetra_SerialDenseMatrix * | DenseSchurComplement_ |
| Pointer to the Schur complement,as DenseMatrix. | |
| const Epetra_LinearProblem * | Problem_ |
| Pointer to the linear problem to be solved. | |
| Epetra_Map * | RedistrMap_ |
| Redistributed matrix. | |
| Epetra_Import * | RedistrImporter_ |
| Redistributed importer (from Matrix().RowMatrixRowMap() to RedistrMatrix().RowMatrixRowMap()). | |
| Epetra_CrsMatrix * | RedistrMatrix_ |
| Redistributed matrix (only if MaxProcs_ > 1). | |
| Epetra_Map * | SerialMap_ |
| Map with all elements on process 0 (for solution and rhs). | |
| Epetra_Import * | SerialImporter_ |
| Importer from Matrix.OperatorDomainMap() to SerialMap_. | |
Amesos_Mumps is an interface to the CERFACS' sparse parallel direct solver MUMPS. Given an Epetra_RowMatrix A, and two Epetra_MultiVectors X and B, the solution with Amesos_Mumps reads as follows:
A number of parameters is available to tune the performances of MUMPS. We refer to the Amesos Reference Guide for a detailed overview of these parameters. Here, we just recall that it is possible to solve the linear system on a subset of the processes contained in the Comm object of the Epetra_LinearProblem.
Amesos_Mumps accepts any Epetra_RowMatrix derived class. However, special functions are available for Epetra_CrsMatrix and Epetra_VbrMatrix objects.
The single-precision version of MUMPS can be used by enabling the option --enable-amesos-smumps. Note that this option overwrites --enable-amesos-mumps. The choice between single-precision and double-precision must be done at configuration (and compilation) time.
As Amesos is based on Epetra, and Epetra is only double-precision, we still require an Epetra_LinearProblem composed by a double-precision matrix, and two double-precision vectors. The solution vector is casted to double after solution. Single precision may be of interest if Amesos is used with ML, to solve the coarse problem (for which single-precision can be enough in term of numerical error, and usually save memory and CPU time).
Amesos_Mumps is based on Amesos_EpetraBaseSolver, that is derived from Amesos_BaseSolver. The main redistribution utilities, as well as a getrow function, is obtained by EpetraBaseSolver.
|
|
Amesos_Mumps Constructor. Creates an Amesos_Mumps instance, using an Epetra_LinearProblem, |
|
|
Amesos_Mumps Destructor. Deletes an Amesos_Mumps object. |
|
||||||||||||||||
|
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 |
|
|
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! |
|
|
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! |
|
|
Gets the pointer to the INFO array (defined on all processes).
Gets the pointer to the internally stored INFO array, of type |
|
|
Get the pointer to the INFOG array (defined on host only).
Gets the pointer to the internally stored INFOG (defined on the host process only) array, of type |
|
|
Gets the pointer to the RINFO array (defined on all processes).
Gets the pointer to the internally stored RINFO array, of type |
|
|
Gets the pointer to the RINFOG array (defined on host only).
Gets the pointer to the internally stored RINFOG array (defined on the host process only), of type |
|
|
Returns true if the solver can handle this matrix shape. Returns true if the matrix shape is one that the underlying sparse direct solver can handle. Classes that work only on square matrices should return false for rectangular matrices. Classes that work only on symmetric matrices whould return false for non-symmetric matrices. Implements Amesos_BaseSolver. |
|
|
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:
<br >Postconditions:
Implements Amesos_BaseSolver. |
|
|
Prints information about the factorization and solution phases. In the destruction phase, prints out some information furnished by MUMPS, like the amount of required memory, the MFLOPS. |
|
|
Prints timing information. In the destruction phase, prints out detailed information about the various phases: symbolic and numeric factorization, solution, gather/scatter for vectors and matrices. |
|
|
Set column scaling. Use double precision vectors of size N (global dimension of the matrix) for column scaling.
|
|
|
Sets ordering.
Use integer vectors of size N (global dimension of the matrix) as given ordering. |
|
|
Updates internal variables. <br >Preconditions:
<br >Postconditions:
Implements Amesos_BaseSolver. |
|
||||||||||||
|
Set prescaling.
Use double precision vectors of size N (global dimension of the matrix) as scaling for columns and rows.
Both input vectors are |
|
|
Set row scaling. Use double precision vectors of size N (global dimension of the matrix) for row scaling.
|
|
|
If set true, X will be set to the solution of AT X = B (not A X = B). If the implementation of this interface does not support transpose use, this method should return a value of -1. <br >Preconditions:
<br >Postconditions:
Implements Amesos_BaseSolver. |
|
|
Solves A X = B (or AT x = B). <br >Preconditions:
<br >Postconditions:
Implements Amesos_BaseSolver. |
|
|
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:
Implements Amesos_BaseSolver. |
1.3.9.1