29 #ifndef AMESOS_CSPARSE_H 30 #define AMESOS_CSPARSE_H 31 #ifdef HAVE_AMESOS_CSPARSE 41 #include "Epetra_LinearProblem.h" 42 #include "Epetra_Time.h" 43 #include "Epetra_Map.h" 44 #include "Epetra_Import.h" 45 #include "Epetra_Comm.h" 46 #include "Epetra_RowMatrix.h" 47 #include "Epetra_CrsMatrix.h" 48 #include "Teuchos_ParameterList.hpp" 49 #include "Teuchos_RCP.hpp" 71 Amesos_CSparse(
const Epetra_LinearProblem& LinearProblem );
93 const Epetra_LinearProblem*
GetProblem()
const {
return(Problem_); }
141 inline const Epetra_Map& Map()
const 143 return(Matrix_->RowMatrixRowMap());
146 inline const Epetra_RowMatrix& Matrix()
const 151 inline Epetra_Map& SerialMap()
153 return(*(SerialMap_.get()));
156 inline Epetra_RowMatrix& SerialMatrix()
158 return(*(SerialMatrix_.get()));
161 inline Epetra_CrsMatrix& SerialCrsMatrix()
163 return(*(SerialCrsMatrix_.get()));
166 inline Epetra_Import& Importer()
168 return(*(Importer_.get()));
171 int ConvertToSerial();
172 int ConvertToCSparse();
173 int PerformSymbolicFactorization();
174 int PerformNumericFactorization();
176 Teuchos::RCP<Epetra_Map> SerialMap_;
177 Teuchos::RCP<Epetra_CrsMatrix> SerialCrsMatrix_;
178 Teuchos::RCP<Epetra_RowMatrix> SerialMatrix_;
179 Teuchos::RCP<Epetra_Import> Importer_;
180 Teuchos::RCP<Amesos_StandardIndex> StdIndex_;
181 Teuchos::RCP<Amesos_StandardIndex> StdIndexRange_;
182 Teuchos::RCP<Amesos_StandardIndex> StdIndexDomain_;
184 const Epetra_Map* Map_;
185 const Epetra_RowMatrix* Matrix_;
190 const Epetra_LinearProblem* Problem_;
193 int MtxConvTime_, MtxRedistTime_, VecRedistTime_;
194 int SymFactTime_, NumFactTime_, SolveTime_;
196 #ifdef HAVE_AMESOS_CSPARSE 216 #endif // AMESOS_CSPARSE_H int NumSymbolicFact_
Number of symbolic factorization phases.
virtual const Epetra_Comm & Comm() const =0
Returns a pointer to the Epetra_Comm communicator associated with this operator.
Amesos_Control: Container for some control variables.
virtual int Solve()=0
Solves A X = B (or AT x = B)
virtual int NumSolve() const =0
Returns the number of solves performed by this object.
virtual int NumNumericFact() const =0
Returns the number of numeric factorizations performed by this object.
virtual int NumSymbolicFact() const =0
Returns the number of symbolic factorizations performed by this object.
virtual int NumericFactorization()=0
Performs NumericFactorization on the matrix A.
virtual int SymbolicFactorization()=0
Performs SymbolicFactorization on the matrix A.
virtual int SetParameters(Teuchos::ParameterList &ParameterList)=0
Updates internal variables.
int NumNumericFact_
Number of numeric factorization phases.
void GetTiming(Teuchos::ParameterList &list) const
Load up the current timing information into the parameter list.
int NumSolve_
Number of solves.
virtual bool UseTranspose() const =0
Returns the current UseTranspose setting.
virtual void PrintTiming() const =0
Prints timing information about the current solver.
Amesos_Status: Container for some status variables.
virtual int SetUseTranspose(bool UseTranspose)=0
If set true, X will be set to the solution of AT X = B (not A X = B)
Amesos_Time: Container for timing information.
virtual void PrintStatus() const =0
Prints status information about the current solver.
virtual const Epetra_LinearProblem * GetProblem() const =0
Returns the Epetra_LinearProblem.
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)
virtual bool MatrixShapeOK() const =0
Returns true if the solver can handle this matrix shape.
Amesos_BaseSolver: A pure virtual class for direct solution of real-valued double-precision operators...
Amesos_NoCopiable: Simple class to prevent the usage of copy constructor and operator =...
virtual void GetTiming(Teuchos::ParameterList &TimingParameterList) const
Extracts timing information from the current solver and places it in the parameter list...
Amesos_Utils: Collections of basic utilities.