43 #include "Ifpack_OverlapSolveObject.h"
44 #include "Epetra_Comm.h"
45 #include "Epetra_Map.h"
46 #include "Epetra_CrsGraph.h"
47 #include "Epetra_CrsMatrix.h"
48 #include "Epetra_Vector.h"
49 #include "Epetra_MultiVector.h"
50 #include "Epetra_Flops.h"
69 : Label_(Source.Label_),
71 UseLTrans_(Source.UseLTrans_),
74 UseUTrans_(Source.UseUTrans_),
75 UseTranspose_(Source.UseTranspose_),
77 Condest_(Source.Condest_),
78 OverlapMode_(Source.OverlapMode_)
95 EPETRA_CHK_ERR(SetupXY(Trans, X, Y, X1, Y1));
99 bool UnitDiagonal =
true;
103 EPETRA_CHK_ERR(L_->
Solve(Lower, Trans, UnitDiagonal, *X1, *Y1));
104 EPETRA_CHK_ERR(Y1->Multiply(1.0, *D_, *Y1, 0.0));
105 EPETRA_CHK_ERR(U_->
Solve(Upper, Trans, UnitDiagonal, *Y1, *Y1));
106 if (L_->
Exporter()!=0) {EPETRA_CHK_ERR(Y.Export(*Y1,*L_->
Exporter(), OverlapMode_));}
109 EPETRA_CHK_ERR(U_->
Solve(Upper, Trans, UnitDiagonal, *X1, *Y1));
110 EPETRA_CHK_ERR(Y1->Multiply(1.0, *D_, *Y1, 0.0));
111 EPETRA_CHK_ERR(L_->
Solve(Lower, Trans, UnitDiagonal, *Y1, *Y1));
112 if (U_->
Importer()!=0) {EPETRA_CHK_ERR(Y.Export(*Y1,*U_->
Importer(), OverlapMode_));}
127 EPETRA_CHK_ERR(SetupXY(Trans, X, Y, X1, Y1));
130 EPETRA_CHK_ERR(U_->
Multiply(Trans, *X1, *Y1));
131 EPETRA_CHK_ERR(Y1->Update(1.0, *X1, 1.0));
132 EPETRA_CHK_ERR(Y1->ReciprocalMultiply(1.0, *D_, *Y1, 0.0));
134 EPETRA_CHK_ERR(L_->
Multiply(Trans, Y1temp, *Y1));
135 EPETRA_CHK_ERR(Y1->Update(1.0, Y1temp, 1.0));
136 if (L_->
Exporter()!=0) {EPETRA_CHK_ERR(Y.Export(*Y1,*L_->
Exporter(), OverlapMode_));}
140 EPETRA_CHK_ERR(L_->
Multiply(Trans, *X1, *Y1));
141 EPETRA_CHK_ERR(Y1->Update(1.0, *X1, 1.0));
142 EPETRA_CHK_ERR(Y1->ReciprocalMultiply(1.0, *D_, *Y1, 0.0));
144 EPETRA_CHK_ERR(U_->
Multiply(Trans, Y1temp, *Y1));
145 EPETRA_CHK_ERR(Y1->Update(1.0, Y1temp, 1.0));
146 if (L_->
Exporter()!=0) {EPETRA_CHK_ERR(Y.Export(*Y1,*L_->
Exporter(), OverlapMode_));}
151 int Ifpack_OverlapSolveObject::SetupXY(
bool Trans,
157 if (Xin.NumVectors()!=Yin.NumVectors()) EPETRA_CHK_ERR(-1);
168 ConditionNumberEstimate = Condest_;
176 EPETRA_CHK_ERR(
Solve(Trans, Ones, OnesResult));
177 EPETRA_CHK_ERR(OnesResult.Abs(OnesResult));
178 EPETRA_CHK_ERR(OnesResult.MaxValue(&ConditionNumberEstimate));
179 Condest_ = ConditionNumberEstimate;
const Epetra_Map & RangeMap() const
int Multiply(bool TransA, const Epetra_Vector &x, Epetra_Vector &y) const
Ifpack_OverlapSolveObject: Provides Overlapped Forward/back solve services for Ifpack.
int Multiply(bool Trans, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of multiplying U, D and L in that order on an Epetra_MultiVector X in Y...
int Solve(bool Trans, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const
Returns the result of a Ifpack_CrsIlut forward/back solve on a Epetra_MultiVector X in Y (works for E...
virtual ~Ifpack_OverlapSolveObject()
Ifpack_OverlapSolveObject Destructor.
int Solve(bool Upper, bool Trans, bool UnitDiagonal, const Epetra_Vector &x, Epetra_Vector &y) const
const Epetra_Import * Importer() const
Ifpack_OverlapSolveObject(char *Label, const Epetra_Comm &Comm)
Constructor.
const Epetra_Export * Exporter() const
int Condest(bool Trans, double &ConditionNumberEstimate) const
Returns the maximum over all the condition number estimate for each local ILU set of factors...
const Epetra_Map & DomainMap() const