29 #ifndef AMESOS_MUMPS_H 30 #define AMESOS_MUMPS_H 33 class Epetra_RowMatrix;
34 class Epetra_MultiVector;
35 #include "Epetra_Import.h" 36 #include "Epetra_CrsMatrix.h" 37 #include "Epetra_Map.h" 38 #include "Epetra_SerialDenseVector.h" 39 class Epetra_IntSerialDenseVector;
40 class Epetra_SerialDenseMatrix;
41 class Amesos_EpetraInterface;
50 #include "Epetra_LinearProblem.h" 52 #include "Epetra_MpiComm.h" 54 #include "Epetra_Comm.h" 109 #include "dmumps_c.h" 126 Amesos_Mumps(
const Epetra_LinearProblem& LinearProblem);
136 int SymbolicFactorization() ;
138 int NumericFactorization() ;
147 UseTranspose_ = UseTranspose_in;
179 void PrintTiming()
const;
185 void PrintStatus()
const;
205 int ComputeSchurComplement(
bool flag,
206 int NumSchurComplementRows,
int * SchurComplementRows);
214 Epetra_CrsMatrix * GetCrsSchurComplement();
222 Epetra_SerialDenseMatrix * GetDenseSchurComplement();
280 double * GetRINFO() ;
292 double * GetRINFOG() ;
301 void SetICNTL(
int pos,
int value);
304 void SetCNTL(
int pos,
double value);
312 if ( GetProblem()->GetOperator()->OperatorRangeMap().NumGlobalPoints() !=
313 GetProblem()->GetOperator()->OperatorDomainMap().NumGlobalPoints() ) OK =
false;
319 const Epetra_Comm &
Comm()
const {
return(GetProblem()->GetOperator()->
Comm());};
322 const Epetra_LinearProblem *
GetProblem()
const {
return(Problem_); };
327 Epetra_RowMatrix& Matrix();
329 const Epetra_RowMatrix& Matrix()
const;
332 Epetra_Map& RedistrMap();
335 Epetra_Import& RedistrImporter();
338 Epetra_RowMatrix& RedistrMatrix(
const bool ImportMatrix =
false);
341 Epetra_Map& SerialMap();
344 Epetra_Import& SerialImporter();
347 int ConvertToTriplet(
const bool OnlyValues);
353 void CheckParameters();
355 void SetICNTLandCNTL();
RCP< Epetra_Import > SerialImporter_
Importer from Matrix.OperatorDomainMap() to SerialMap_.
const Epetra_LinearProblem * GetProblem() const
Gets a pointer to the Epetra_LinearProblem.
int NumSymbolicFact_
Number of symbolic factorization phases.
Amesos_Control: Container for some control variables.
std::map< int, int > ICNTL
RCP< Epetra_CrsMatrix > CrsSchurComplement_
Pointer to the Schur complement, as CrsMatrix.
RCP< Epetra_Map > SerialMap_
Map with all elements on process 0 (for solution and rhs).
int NumSchurComplementRows_
Number of rows in the Schur complement (if required)
Amesos_Mumps: An object-oriented wrapper for the double precision version of MUMPS.
std::map< int, double > CNTL
int * PermIn_
PermIn for MUMPS.
bool MatrixShapeOK() const
Returns true if the solver can handle this matrix shape.
int * SchurComplementRows_
Rows for the Schur complement (if required)
RCP< Epetra_Map > RedistrMap_
Redistributed matrix.
const Epetra_LinearProblem * Problem_
Pointer to the linear problem to be solved.
std::vector< int > Col
column indices of nonzero elements
int NumNumericFact_
Number of numeric factorization phases.
void GetTiming(Teuchos::ParameterList &list) const
Load up the current timing information into the parameter list.
bool IsConvertToTripletOK_
true if matrix has already been converted to COO format
int NumSolve_
Number of solves.
int SetPrecscaling(double *ColSca, double *RowSca)
Set prescaling.
int NumNumericFact() const
Returns the number of numeric factorizations performed by this object.
int SetUseTranspose(bool UseTranspose_in)
If set true, X will be set to the solution of AT X = B (not A X = B)
int SetColScaling(double *ColSca)
Set column scaling.
int MaxProcs_
Maximum number of processors in the MUMPS' communicator.
Amesos_Status: Container for some status variables.
void GetTiming(Teuchos::ParameterList &TimingParameterList) const
Extracts timing information from the current solver and places it in the parameter list...
int NumSymbolicFact() const
Returns the number of symbolic factorizations performed by this object.
Amesos_Time: Container for timing information.
RCP< Epetra_CrsMatrix > RedistrMatrix_
Redistributed matrix (only if MaxProcs_ > 1).
bool UseTranspose() const
Returns the current UseTranspose setting.
int SetOrdering(int *PermIn)
Sets ordering.
std::vector< int > Row
row indices of nonzero elements
RCP< Epetra_SerialDenseMatrix > DenseSchurComplement_
Pointer to the Schur complement,as DenseMatrix.
std::vector< double > Val
values of nonzero elements
bool IsComputeSchurComplementOK_
true if the Schur complement has been computed (need to free memory)
bool CheckError(const std::string SolverType, const std::string Descriptor, const Epetra_RowMatrix &A, const Epetra_MultiVector &x, const Epetra_MultiVector &b, const Epetra_MultiVector &x_exact)
const Epetra_Comm & Comm() const
Returns a pointer to the Epetra_Comm communicator associated with this matrix.
int Solve(int, TYPE *, TYPE *, TYPE *)
int SetRowScaling(double *RowSca)
Set row scaling.
RCP< Epetra_Import > RedistrImporter_
Redistributed importer (from Matrix().RowMatrixRowMap() to RedistrMatrix().RowMatrixRowMap()).
Amesos_BaseSolver: A pure virtual class for direct solution of real-valued double-precision operators...
int NumSolve() const
Returns the number of solves performed by this object.
double * RowSca_
Row and column scaling.
Amesos_NoCopiable: Simple class to prevent the usage of copy constructor and operator =...
bool UseTranspose_
If true, solve the problem with AT.
Amesos_Utils: Collections of basic utilities.