Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DelayedLinearOpWithSolveFactory_decl.hpp
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Thyra: Interfaces and Support for Abstract Numerical Algorithms
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (bartlettra@ornl.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef THYRA_DELAYED_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
43 #define THYRA_DELAYED_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
44 
45 
46 #include "Thyra_LinearOpWithSolveFactoryBase.hpp"
47 #include "Thyra_LinearOpSourceBase.hpp"
48 
49 
50 namespace Thyra {
51 
52 
61 template<class Scalar>
63  : virtual public LinearOpWithSolveFactoryBase<Scalar>
64 {
65 public:
66 
69 
73  );
74 
77 
80 
82 
85 
87  std::string description() const;
88 
90 
93 
95  void setParameterList(RCP<ParameterList> const& paramList);
104 
106 
109 
111  virtual bool acceptsPreconditionerFactory() const;
112 
114  virtual void setPreconditionerFactory(
115  const RCP<PreconditionerFactoryBase<Scalar> > &precFactory,
116  const std::string &precFactoryName
117  );
118 
121  getPreconditionerFactory() const;
122 
124  virtual void unsetPreconditionerFactory(
125  RCP<PreconditionerFactoryBase<Scalar> > *precFactory,
126  std::string *precFactoryName
127  );
128 
130  virtual bool isCompatible(
131  const LinearOpSourceBase<Scalar> &fwdOpSrc
132  ) const;
133 
136 
138  virtual void initializeOp(
139  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
141  const ESupportSolveUse supportSolveUse
142  ) const;
143 
145  virtual void initializeAndReuseOp(
146  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
148  ) const;
149 
151  virtual void uninitializeOp(
153  RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc,
154  RCP<const PreconditionerBase<Scalar> > *prec,
155  RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc,
156  ESupportSolveUse *supportSolveUse
157  ) const;
158 
160  virtual bool supportsPreconditionerInputType(
161  const EPreconditionerInputType precOpType
162  ) const;
163 
165  virtual void initializePreconditionedOp(
166  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
167  const RCP<const PreconditionerBase<Scalar> > &prec,
169  const ESupportSolveUse supportSolveUse
170  ) const;
171 
174  const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
175  const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
177  const ESupportSolveUse supportSolveUse
178  ) const;
179 
181 
182 protected:
183 
186 
188  void informUpdatedVerbosityState() const;
189 
191 
192 private:
193 
195 
196  // Not defined and not to be called
198 
199 };
200 
201 
202 } // namespace Thyra
203 
204 
205 #endif // THYRA_DELAYED_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
Base class for all linear operators that can support a high-level solve operation.
virtual bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
virtual bool isCompatible(const LinearOpSourceBase< Scalar > &fwdOpSrc) const
virtual RCP< LinearOpWithSolveBase< Scalar > > createOp() const
virtual RCP< PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
virtual void setPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &precFactory, const std::string &precFactoryName)
virtual void initializeApproxPreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const LinearOpSourceBase< Scalar > > &approxFwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
virtual void unsetPreconditionerFactory(RCP< PreconditionerFactoryBase< Scalar > > *precFactory, std::string *precFactoryName)
Simple interface class to access a precreated preconditioner as one or more linear operators objects ...
virtual void initializePreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const PreconditionerBase< Scalar > > &prec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Factory interface for creating LinearOpWithSolveBase objects from compatible LinearOpBase objects...
virtual void initializeOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Factory interface for creating preconditioner objects from LinearOpBase objects.
Base interface for objects that can return a linear operator.
General delayed construction LinearOpWithSolveFactoryBase subclass.
ESupportSolveUse
Enum that specifies how a LinearOpWithSolveBase object will be used for solves after it is constructe...
void informUpdatedVerbosityState() const
Overridden from Teuchos::VerboseObjectBase.
RCP< LinearOpWithSolveFactoryBase< Scalar > > getUnderlyingLOWSF()
virtual void initializeAndReuseOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op) const
EPreconditionerInputType
Enum defining the status of a preconditioner object.
void setParameterList(RCP< ParameterList > const &paramList)
virtual void uninitializeOp(LinearOpWithSolveBase< Scalar > *Op, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc, RCP< const PreconditionerBase< Scalar > > *prec, RCP< const LinearOpSourceBase< Scalar > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const