Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_LinearOpWithSolveFactoryBase_decl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Thyra: Interfaces and Support for Abstract Numerical Algorithms
4 //
5 // Copyright 2004 NTESS and the Thyra contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_BASE_DECL_HPP
11 #define THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_BASE_DECL_HPP
12 
13 #include "Thyra_LinearOpWithSolveBase.hpp"
14 #include "Thyra_PreconditionerFactoryBase.hpp"
15 #include "Teuchos_ParameterListAcceptor.hpp"
16 #include "Teuchos_VerboseObject.hpp"
17 
18 
19 namespace Thyra {
20 
21 
371 template<class Scalar>
373  : virtual public Teuchos::Describable,
374  virtual public Teuchos::VerboseObject<LinearOpWithSolveFactoryBase<Scalar> >,
375  virtual public Teuchos::ParameterListAcceptor
376 {
377 public:
378 
381 
386  virtual bool acceptsPreconditionerFactory() const;
387 
409  virtual void setPreconditionerFactory(
410  const RCP<PreconditionerFactoryBase<Scalar> > &precFactory,
411  const std::string &precFactoryName
412  );
413 
419  getPreconditionerFactory() const;
420 
429  virtual void unsetPreconditionerFactory(
430  RCP<PreconditionerFactoryBase<Scalar> > *precFactory = NULL,
431  std::string *precFactoryName = NULL
432  );
433 
435 
438 
442  virtual bool isCompatible(
443  const LinearOpSourceBase<Scalar> &fwdOpSrc ) const = 0;
444 
454  createOp() const = 0;
455 
529  virtual void initializeOp(
530  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
532  const ESupportSolveUse supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED
533  ) const = 0;
534 
601  virtual void initializeAndReuseOp(
602  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
604  ) const;
605 
665  virtual void uninitializeOp(
667  RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc = NULL,
668  RCP<const PreconditionerBase<Scalar> > *prec = NULL,
669  RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc = NULL,
670  ESupportSolveUse *supportSolveUse = NULL
671  ) const = 0;
672 
674 
677 
682  virtual bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const;
683 
801  virtual void initializePreconditionedOp(
802  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
803  const RCP<const PreconditionerBase<Scalar> > &prec,
805  const ESupportSolveUse supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED
806  ) const;
807 
834  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
835  const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
837  const ESupportSolveUse supportSolveUse = SUPPORT_SOLVE_UNSPECIFIED
838  ) const;
839 
841 
842 private:
843 
844  // Not defined and not to be called
846  operator=(const LinearOpWithSolveFactoryBase<Scalar>&);
847 
848 };
849 
850 
851 } // namespace Thyra
852 
853 
854 #endif // THYRA_LINEAR_OP_WITH_SOLVE_FACTORY_BASE_DECL_HPP
How the output LOWSB object will be useded for solves in unspecified.
Base class for all linear operators that can support a high-level solve operation.
virtual void initializePreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const PreconditionerBase< Scalar > > &prec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED) const
Initialize a pre-created LinearOpWithSolveBase object given a &quot;compatible&quot; LinearOpBase object and an...
virtual void initializeOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED) const =0
Initialize a pre-created LinearOpWithSolveBase object given a &quot;compatible&quot; LinearOpBase object...
virtual bool acceptsPreconditionerFactory() const
Determines if *this accepts external preconditioner factories.
Simple interface class to access a precreated preconditioner as one or more linear operators objects ...
virtual void unsetPreconditionerFactory(RCP< PreconditionerFactoryBase< Scalar > > *precFactory=NULL, std::string *precFactoryName=NULL)
Unset the preconditioner factory (if one is set).
virtual void initializeAndReuseOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op) const
Initialize a pre-created LinearOpWithSolveBase object given a &quot;compatible&quot; LinearOpBase object but al...
virtual void initializeApproxPreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const LinearOpSourceBase< Scalar > > &approxFwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse=SUPPORT_SOLVE_UNSPECIFIED) const
Initialize a pre-created LinearOpWithSolveBase object given a &quot;compatible&quot; forward LinearOpBase objec...
virtual RCP< LinearOpWithSolveBase< Scalar > > createOp() const =0
Create an (uninitialized) LinearOpWithSolveBase object to be initialized later in this-&gt;initializeOp(...
Factory interface for creating LinearOpWithSolveBase objects from compatible LinearOpBase objects...
Factory interface for creating preconditioner objects from LinearOpBase objects.
Base interface for objects that can return a linear operator.
ESupportSolveUse
Enum that specifies how a LinearOpWithSolveBase object will be used for solves after it is constructe...
virtual bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const =0
Check that a LinearOpBase object is compatible with *this factory object.
virtual void uninitializeOp(LinearOpWithSolveBase< Scalar > *Op, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc=NULL, RCP< const PreconditionerBase< Scalar > > *prec=NULL, RCP< const LinearOpSourceBase< Scalar > > *approxFwdOpSrc=NULL, ESupportSolveUse *supportSolveUse=NULL) const =0
Uninitialize a LinearOpWithSolveBase object and return its remembered forward linear operator and pot...
EPreconditionerInputType
Enum defining the status of a preconditioner object.
virtual bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
Determines if *this supports given preconditioner type.
virtual RCP< PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
Get a preconditioner factory object.
virtual void setPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &precFactory, const std::string &precFactoryName)
Set a preconditioner factory object.