43 #ifndef _IFPACK_CRSRILUK_H_ 44 #define _IFPACK_CRSRILUK_H_ 46 #include "Ifpack_ConfigDefs.h" 48 #include "Ifpack_IlukGraph.h" 49 #include "Epetra_CompObject.h" 50 #include "Epetra_Operator.h" 51 #include "Epetra_CrsMatrix.h" 52 #include "Epetra_Object.h" 53 #include "Epetra_MultiVector.h" 54 #include "Epetra_Vector.h" 55 #include "Epetra_Map.h" 57 class Epetra_VbrMatrix;
58 class Epetra_RowMatrix;
60 #include "Teuchos_RefCountPtr.hpp" 209 class Ifpack_CrsRiluk:
public Epetra_Object,
public Epetra_CompObject,
public virtual Epetra_Operator {
237 int InitValues(
const Epetra_CrsMatrix &A);
246 int InitValues(
const Epetra_VbrMatrix &A);
261 void SetOverlapMode( Epetra_CombineMode OverlapMode) {OverlapMode_ = OverlapMode;
return;}
271 int SetParameters(
const Teuchos::ParameterList& parameterlist,
272 bool cerr_warning_if_unused=
false);
303 int Solve(
bool Trans,
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
316 int Multiply(
bool Trans,
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const;
327 int Condest(
bool Trans,
double & ConditionNumberEstimate)
const;
377 const Epetra_CrsMatrix &
L()
const {
return(*L_);};
380 const Epetra_Vector &
D()
const {
return(*D_);};
383 const Epetra_CrsMatrix &
U()
const {
return(*U_);};
388 const char *
Label()
const {
return(Epetra_Object::Label());};
400 int SetUseTranspose(
bool UseTranspose_in) {UseTranspose_ = UseTranspose_in;
return(0);};
414 int Apply(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const {
431 int ApplyInverse(
const Epetra_MultiVector& X, Epetra_MultiVector& Y)
const {
450 const Epetra_Comm &
Comm()
const{
return(Comm_);};
454 void SetFactored(
bool Flag) {Factored_ = Flag;};
455 void SetValuesInitialized(
bool Flag) {ValuesInitialized_ = Flag;};
456 bool Allocated()
const {
return(Allocated_);};
457 int SetAllocated(
bool Flag) {Allocated_ = Flag;
return(0);};
458 int BlockGraph2PointGraph(
const Epetra_CrsGraph & BG, Epetra_CrsGraph & PG,
bool Upper);
465 int InitAllValues(
const Epetra_RowMatrix & A,
int MaxNumEntries);
466 int BlockMap2PointMap(
const Epetra_BlockMap & BlockMap, Teuchos::RefCountPtr<Epetra_Map>* PointMap);
467 int GenerateXY(
bool Trans,
468 const Epetra_MultiVector& Xin,
const Epetra_MultiVector& Yin,
469 Teuchos::RefCountPtr<Epetra_MultiVector>* Xout,
470 Teuchos::RefCountPtr<Epetra_MultiVector>* Yout)
const;
471 bool UserMatrixIsVbr_;
472 bool UserMatrixIsCrs_;
475 Teuchos::RefCountPtr<Epetra_Map> IlukRowMap_;
476 Teuchos::RefCountPtr<Epetra_Map> IlukDomainMap_;
477 Teuchos::RefCountPtr<Epetra_Map> IlukRangeMap_;
478 Teuchos::RefCountPtr<const Epetra_Map> U_DomainMap_;
479 Teuchos::RefCountPtr<const Epetra_Map> L_RangeMap_;
480 const Epetra_Comm & Comm_;
481 Teuchos::RefCountPtr<Epetra_CrsMatrix> L_;
482 Teuchos::RefCountPtr<Epetra_CrsMatrix> U_;
483 Teuchos::RefCountPtr<Epetra_CrsGraph> L_Graph_;
484 Teuchos::RefCountPtr<Epetra_CrsGraph> U_Graph_;
485 Teuchos::RefCountPtr<Epetra_Vector> D_;
490 bool ValuesInitialized_;
495 mutable double Condest_;
497 mutable Teuchos::RefCountPtr<Epetra_MultiVector> OverlapX_;
498 mutable Teuchos::RefCountPtr<Epetra_MultiVector> OverlapY_;
499 mutable Teuchos::RefCountPtr<Epetra_MultiVector> VbrX_;
500 mutable Teuchos::RefCountPtr<Epetra_MultiVector> VbrY_;
501 Epetra_CombineMode OverlapMode_;
double GetRelaxValue()
Get RILU(k) relaxation parameter.
int NumMyNonzeros() const
Returns the number of nonzero entries in the local graph.
Ifpack_CrsRiluk: A class for constructing and using an incomplete lower/upper (ILU) factorization of ...
Epetra_CombineMode GetOverlapMode()
Get overlap mode type.
double NormInf() const
Returns 0.0 because this class cannot compute Inf-norm.
const Epetra_CrsMatrix & L() const
Returns the address of the L factor associated with this factored matrix.
const char * Label() const
Returns a character string describing the operator.
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
void SetOverlapMode(Epetra_CombineMode OverlapMode)
Set overlap mode type.
Ifpack_IlukGraph: A class for constructing level filled graphs for use with ILU(k) class precondition...
int NumGlobalCols() const
Returns the number of global matrix columns.
void SetAbsoluteThreshold(double Athresh)
Set absolute threshold value.
const Epetra_Comm & Comm() const
Returns the Epetra_BlockMap object associated with the range of this matrix operator.
void SetRelativeThreshold(double Rthresh)
Set relative threshold value.
int ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y...
Ifpack_ScalingType enumerable type.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
int NumMyCols() const
Returns the number of local matrix columns.
int NumGlobalRows() const
Returns the number of global matrix rows.
const Epetra_CrsMatrix & U() const
Returns the address of the L factor associated with this factored matrix.
double GetAbsoluteThreshold()
Get absolute threshold value.
virtual int NumGlobalBlockDiagonals() const
Returns the number of diagonal entries found in the global input graph.
int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
int IndexBase() const
Returns the index base for row and column indices for this graph.
int NumGlobalNonzeros() const
Returns the number of nonzero entries in the global graph.
bool HasNormInf() const
Returns false because this class cannot compute an Inf-norm.
bool Factored() const
If factor is completed, this query returns true, otherwise it returns false.
int NumMyRows() const
Returns the number of local matrix rows.
bool ValuesInitialized() const
If values have been initialized, this query returns true, otherwise it returns false.
void SetRelaxValue(double RelaxValue)
Set RILU(k) relaxation parameter.
const Epetra_Vector & D() const
Returns the address of the D factor associated with this factored matrix.
bool UseTranspose() const
Returns the current UseTranspose setting.
double GetRelativeThreshold()
Get relative threshold value.
int SetUseTranspose(bool UseTranspose_in)
If set true, transpose of this operator will be applied.
virtual int NumMyBlockDiagonals() const
Returns the number of diagonal entries found in the local input graph.
virtual int NumMyDiagonals() const
Returns the number of nonzero diagonal values found in matrix.
const Ifpack_IlukGraph & Graph() const
Returns the address of the Ifpack_IlukGraph associated with this factored matrix. ...