42 #ifndef THYRA_AZTECOO_LINEAR_OP_WITH_SOLVE_HPP 43 #define THYRA_AZTECOO_LINEAR_OP_WITH_SOLVE_HPP 45 #include "Thyra_LinearOpWithSolveBase.hpp" 46 #include "Thyra_LinearOpSourceBase.hpp" 47 #include "Thyra_EpetraLinearOp.hpp" 48 #include "Thyra_PreconditionerBase.hpp" 49 #include "Teuchos_StandardMemberCompositionMacros.hpp" 91 const int fwdDefaultMaxIterations = 400,
92 const double fwdDefaultTol = 1e-6,
93 const int adjDefaultMaxIterations = 400,
94 const double adjDefaultTol = 1e-6,
95 const bool outputEveryRhs =
false 183 const RCP<
const LinearOpBase<double> > &fwdOp,
184 const RCP<
const LinearOpSourceBase<double> > &fwdOpSrc,
185 const RCP<
const PreconditionerBase<double> > &prec,
187 const RCP<
const LinearOpSourceBase<double> > &approxFwdOpSrc,
188 const RCP<AztecOO> &aztecFwdSolver,
189 const bool allowInexactFwdSolve =
false,
190 const RCP<AztecOO> &aztecAdjSolver = Teuchos::null,
191 const bool allowInexactAdjSolve =
false,
192 const double aztecSolverScalar = 1.0
216 RCP<
const LinearOpBase<double> > *fwdOp = NULL,
217 RCP<
const LinearOpSourceBase<double> > *fwdOpSrc = NULL,
218 RCP<
const PreconditionerBase<double> > *prec = NULL,
220 RCP<
const LinearOpSourceBase<double> > *approxFwdOpSrc = NULL,
221 RCP<AztecOO> *aztecFwdSolver = NULL,
222 bool *allowInexactFwdSolve = NULL,
223 RCP<AztecOO> *aztecAdjSolver = NULL,
224 bool *allowInexactAdjSolve = NULL,
225 double *aztecSolverScalar = NULL
233 RCP< const VectorSpaceBase<double> >
range()
const;
235 RCP< const VectorSpaceBase<double> >
domain()
const;
237 RCP<const LinearOpBase<double> >
clone()
const;
246 Teuchos::FancyOStream &out,
247 const Teuchos::EVerbosityLevel verbLevel
259 const EOpTransp M_trans,
260 const MultiVectorBase<double> &X,
261 const Ptr<MultiVectorBase<double> > &Y,
273 EOpTransp M_trans,
const SolveMeasureType& solveMeasureType
277 const EOpTransp M_trans,
278 const MultiVectorBase<double> &B,
279 const Ptr<MultiVectorBase<double> > &X,
280 const Ptr<
const SolveCriteria<double> > solveCriteria
286 RCP<const LinearOpBase<double> > fwdOp_;
287 RCP<const LinearOpSourceBase<double> > fwdOpSrc_;
288 RCP<const PreconditionerBase<double> > prec_;
289 bool isExternalPrec_;
290 RCP<const LinearOpSourceBase<double> > approxFwdOpSrc_;
291 RCP<AztecOO> aztecFwdSolver_;
292 bool allowInexactFwdSolve_;
293 RCP<AztecOO> aztecAdjSolver_;
294 bool allowInexactAdjSolve_;
295 double aztecSolverScalar_;
297 void assertInitialized()
const;
304 #endif // THYRA_AZTECOO_LINEAR_OP_WITH_SOLVE_HPP RCP< const LinearOpBase< double > > clone() const
virtual bool solveSupportsSolveMeasureTypeImpl(EOpTransp M_trans, const SolveMeasureType &solveMeasureType) const
RCP< const LinearOpSourceBase< double > > extract_fwdOpSrc()
Extract the forward LinearOpBase<double> object so that it can be modified.
RCP< const VectorSpaceBase< double > > domain() const
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
STANDARD_MEMBER_COMPOSITION_MEMBERS(int, fwdDefaultMaxIterations)
The default maximum number of iterations for forward solves.
bool isExternalPrec() const
Determine if the preconditioner was external or not.
virtual bool solveSupportsImpl(EOpTransp M_trans) const
SolveStatus< double > solveImpl(const EOpTransp M_trans, const MultiVectorBase< double > &B, const Ptr< MultiVectorBase< double > > &X, const Ptr< const SolveCriteria< double > > solveCriteria) const
void uninitialize(RCP< const LinearOpBase< double > > *fwdOp=NULL, RCP< const LinearOpSourceBase< double > > *fwdOpSrc=NULL, RCP< const PreconditionerBase< double > > *prec=NULL, bool *isExternalPrec=NULL, RCP< const LinearOpSourceBase< double > > *approxFwdOpSrc=NULL, RCP< AztecOO > *aztecFwdSolver=NULL, bool *allowInexactFwdSolve=NULL, RCP< AztecOO > *aztecAdjSolver=NULL, bool *allowInexactAdjSolve=NULL, double *aztecSolverScalar=NULL)
Uninitialize.
RCP< const PreconditionerBase< double > > extract_prec()
Extract the preconditioner.
std::string description() const
RCP< const VectorSpaceBase< double > > range() const
virtual void applyImpl(const EOpTransp M_trans, const MultiVectorBase< double > &X, const Ptr< MultiVectorBase< double > > &Y, const double alpha, const double beta) const
void initialize(const RCP< const LinearOpBase< double > > &fwdOp, const RCP< const LinearOpSourceBase< double > > &fwdOpSrc, const RCP< const PreconditionerBase< double > > &prec, const bool isExternalPrec, const RCP< const LinearOpSourceBase< double > > &approxFwdOpSrc, const RCP< AztecOO > &aztecFwdSolver, const bool allowInexactFwdSolve=false, const RCP< AztecOO > &aztecAdjSolver=Teuchos::null, const bool allowInexactAdjSolve=false, const double aztecSolverScalar=1.0)
Sets up this object.
virtual bool opSupportedImpl(EOpTransp M_trans) const
Concrete LinearOpWithSolveBase subclass implemented using AztecOO.
RCP< const LinearOpSourceBase< double > > extract_approxFwdOpSrc()
Extract the approximate forward LinearOpBase<double> object used to build the preconditioner.
AztecOOLinearOpWithSolve(const int fwdDefaultMaxIterations=400, const double fwdDefaultTol=1e-6, const int adjDefaultMaxIterations=400, const double adjDefaultTol=1e-6, const bool outputEveryRhs=false)