51 #ifndef IFPACK_SHYLU_H 52 #define IFPACK_SHYLU_H 62 #define BLOCK_DIAGONAL_Si 64 #include "ShyLUCore_config.h" 67 #ifdef HAVE_SHYLUCORE_MPI 68 #include "Epetra_MpiComm.h" 70 #include "Epetra_SerialComm.h" 72 #include "Epetra_SerialComm.h" 73 #include "Epetra_Time.h" 74 #include "Epetra_CrsMatrix.h" 75 #include "Epetra_Map.h" 76 #include "Epetra_MultiVector.h" 77 #include "Epetra_LinearProblem.h" 78 #include "Epetra_Import.h" 79 #include "Epetra_Export.h" 82 #include "Teuchos_GlobalMPISession.hpp" 83 #include "Teuchos_XMLParameterListHelpers.hpp" 84 #include "Teuchos_LAPACK.hpp" 93 #include "Ifpack_Preconditioner.h" 96 #include "Isorropia_Epetra.hpp" 97 #include "Isorropia_EpetraRedistributor.hpp" 98 #include "Isorropia_EpetraPartitioner.hpp" 101 #include "EpetraExt_MultiVectorOut.h" 102 #include "EpetraExt_RowMatrixOut.h" 106 #include "Amesos_BaseSolver.h" 135 return(IsInitialized_);
155 int SetParameters(Teuchos::ParameterList& parameterlist);
157 int SetUseTranspose(
bool UseTranspose_in) {
158 UseTranspose_ = UseTranspose_in;
172 int Apply(
const Epetra_MultiVector& X,
173 Epetra_MultiVector& Y)
const 175 return(Multiply(
false,X,Y));
178 int Multiply(
bool Trans,
const Epetra_MultiVector& X,
179 Epetra_MultiVector& Y)
const{
return A_->Multiply(Trans,X,Y);}
190 int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
193 double Condest(
const Ifpack_CondestType CT = Ifpack_Cheap,
194 const int MaxIters = 1550,
195 const double Tol = 1e-9,
196 Epetra_RowMatrix* Matrix_in = 0);
201 double Condest()
const 210 const char*
Label()
const {
return(Label_.c_str());}
233 const Epetra_Comm &
Comm()
const{
return(A_->Comm());};
242 virtual ostream& Print(ostream& os)
const;
247 return(NumInitialize_);
259 return(NumApplyInverse_);
265 return(InitializeTime_);
271 return(ComputeTime_);
277 return(ApplyInverseTime_);
286 virtual double ComputeFlops()
const 288 return(ComputeFlops_);
291 virtual double ApplyInverseFlops()
const 293 return(ApplyInverseFlops_);
316 int NumGlobalRows()
const {
return(A_->NumGlobalRows());};
319 int NumGlobalCols()
const {
return(A_->NumGlobalCols());};
322 int NumMyRows()
const {
return(A_->NumMyRows());};
325 int NumMyCols()
const {
return(A_->NumMyCols());};
331 Epetra_CrsMatrix *A_;
333 Teuchos::ParameterList List_;
360 mutable int NumApplyInverse_;
362 double InitializeTime_;
366 mutable double ApplyInverseTime_;
368 double ComputeFlops_;
370 mutable double ApplyInverseFlops_;
372 mutable Epetra_Time Time_;
bool IsInitialized() const
Returns true if the preconditioner has been successfully initialized.
bool HasNormInf() const
Returns false because this class cannot compute an Inf-norm.
~Ifpack_ShyLU()
Destructor.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
ShyLU's interface to be used as an Ifpack Preconditioner.
double NormInf() const
Returns 0.0 because this class cannot compute Inf-norm.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
const Epetra_Comm & Comm() const
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
virtual int NumCompute() const
Returns the number of calls to Compute().
virtual int NumApplyInverse() const
Returns the number of calls to ApplyInverse().
bool UseTranspose() const
Returns the current UseTranspose setting.
virtual double ComputeTime() const
Returns the time spent in Compute().
const Epetra_RowMatrix & Matrix() const
Returns a reference to the matrix to be preconditioned.
virtual double InitializeFlops() const
Returns the number of flops in the initialization phase.
bool IsComputed() const
If factor is completed, this query returns true, otherwise it returns false.
virtual double ApplyInverseTime() const
Returns the time spent in ApplyInverse().
virtual int NumInitialize() const
Returns the number of calls to Initialize().
Main data structure holding needed offset and temp variables.
const char * Label() const
Returns a character string describing the operator.
virtual double InitializeTime() const
Returns the time spent in Initialize().
Main header file of ShyLU (Include main user calls)
int SetLabel(std::string Label_in)
Sets label for this object.