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"
72 Amesos_CSparse(
const Epetra_LinearProblem& LinearProblem );
81 int SymbolicFactorization() ;
84 int NumericFactorization() ;
93 const Epetra_LinearProblem* GetProblem()
const {
return(Problem_); }
99 bool MatrixShapeOK()
const;
106 int SetUseTranspose(
bool UseTranspose) { UseTranspose_ = UseTranspose;
return(0); }
109 bool UseTranspose()
const {
return(UseTranspose_); }
112 const Epetra_Comm& Comm()
const {
return(GetProblem()->GetOperator()->Comm()); }
115 int SetParameters( Teuchos::ParameterList &ParameterList );
127 void PrintTiming()
const;
130 void PrintStatus()
const;
133 void GetTiming( Teuchos::ParameterList &TimingParameterList )
const {
Amesos_Time::GetTiming(TimingParameterList); }
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
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)
Amesos_BaseSolver: A pure virtual class for direct solution of real-valued double-precision operators...
Amesos_Control: Container for some control variables.
Amesos_NoCopiable: Simple class to prevent the usage of copy constructor and operator =.
Amesos_Status: Container for some status variables.
int NumSymbolicFact_
Number of symbolic factorization phases.
int NumSolve_
Number of solves.
int NumNumericFact_
Number of numeric factorization phases.
Amesos_Time: Container for timing information.
void GetTiming(Teuchos::ParameterList &list) const
Load up the current timing information into the parameter list.
Amesos_Utils: Collections of basic utilities.