Thyra Version of the Day
Loading...
Searching...
No Matches
Thyra_DefaultBlockedTriangularLinearOpWithSolveFactory_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_DEFAULT_BLOCKED_TRIANGULAR_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
11#define THYRA_DEFAULT_BLOCKED_TRIANGULAR_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
12
13
14#include "Thyra_LinearOpWithSolveBase.hpp"
15#include "Thyra_DefaultBlockedLinearOp.hpp"
16#include "Thyra_LinearOpSourceBase.hpp"
17
18
19namespace Thyra {
20
21
60template<class Scalar>
62 : virtual public LinearOpWithSolveFactoryBase<Scalar>
63{
64public:
65
68
81 );
82
83
95 const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf
96 );
97
98 // 2007/10/02: rabartl: Add versions of constructor that accept an array of
99 // LOWSFB objects when needed. This will be needed for multi-physics
100 // problems for instance!
101
104
107
109
112
114 std::string description() const;
115
117
120
122 void setParameterList(RCP<ParameterList> const& paramList);
131
133
136
138 virtual bool acceptsPreconditionerFactory() const;
139
141 virtual void setPreconditionerFactory(
142 const RCP<PreconditionerFactoryBase<Scalar> > &precFactory,
143 const std::string &precFactoryName
144 );
145
149
151 virtual void unsetPreconditionerFactory(
153 std::string *precFactoryName
154 );
155
157 virtual bool isCompatible(
158 const LinearOpSourceBase<Scalar> &fwdOpSrc
159 ) const;
160
163
165 virtual void initializeOp(
166 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
168 const ESupportSolveUse supportSolveUse
169 ) const;
170
172 virtual void initializeAndReuseOp(
173 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
175 ) const;
176
178 virtual void uninitializeOp(
180 RCP<const LinearOpSourceBase<Scalar> > *fwdOpSrc,
181 RCP<const PreconditionerBase<Scalar> > *prec,
182 RCP<const LinearOpSourceBase<Scalar> > *approxFwdOpSrc,
183 ESupportSolveUse *supportSolveUse
184 ) const;
185
188 const EPreconditionerInputType precOpType
189 ) const;
190
192 virtual void initializePreconditionedOp(
193 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
194 const RCP<const PreconditionerBase<Scalar> > &prec,
196 const ESupportSolveUse supportSolveUse
197 ) const;
198
201 const RCP<const LinearOpSourceBase<Scalar> > &fwdOpSrc,
202 const RCP<const LinearOpSourceBase<Scalar> > &approxFwdOpSrc,
204 const ESupportSolveUse supportSolveUse
205 ) const;
206
208
209protected:
210
213
215 void informUpdatedVerbosityState() const;
216
218
219private:
220
222
223 LOWSF_t lowsf_;
224
225 // Not defined and not to be called
227
228};
229
230
235template<class Scalar>
237defaultBlockedTriangularLinearOpWithSolveFactory(
239 )
240{
241 return Teuchos::rcp(
243 );
244}
245
246
251template<class Scalar>
252RCP<DefaultBlockedTriangularLinearOpWithSolveFactory<Scalar> >
253defaultBlockedTriangularLinearOpWithSolveFactory(
254 const RCP<const LinearOpWithSolveFactoryBase<Scalar> > &lowsf
255 )
256{
257 return Teuchos::rcp(
258 new DefaultBlockedTriangularLinearOpWithSolveFactory<Scalar>(lowsf)
259 );
260}
261
262
263} // namespace Thyra
264
265
266#endif // THYRA_DEFAULT_BLOCKED_TRIANGULAR_LINEAR_OP_WITH_SOLVE_FACTORY_DECL_HPP
Implicit subclass that takes a blocked triangular LOWB object and turns it into a LOWSB object.
virtual void setPreconditionerFactory(const RCP< PreconditionerFactoryBase< Scalar > > &precFactory, const std::string &precFactoryName)
Throws exception.
virtual void initializeAndReuseOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op) const
virtual void initializePreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const PreconditionerBase< Scalar > > &prec, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
virtual RCP< PreconditionerFactoryBase< Scalar > > getPreconditionerFactory() const
Returns null .
virtual bool supportsPreconditionerInputType(const EPreconditionerInputType precOpType) const
virtual void unsetPreconditionerFactory(RCP< PreconditionerFactoryBase< Scalar > > *precFactory, std::string *precFactoryName)
Throws exception.
virtual void uninitializeOp(LinearOpWithSolveBase< Scalar > *Op, RCP< const LinearOpSourceBase< Scalar > > *fwdOpSrc, RCP< const PreconditionerBase< Scalar > > *prec, RCP< const LinearOpSourceBase< Scalar > > *approxFwdOpSrc, ESupportSolveUse *supportSolveUse) const
virtual void initializeApproxPreconditionedOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, const RCP< const LinearOpSourceBase< Scalar > > &approxFwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
virtual void initializeOp(const RCP< const LinearOpSourceBase< Scalar > > &fwdOpSrc, LinearOpWithSolveBase< Scalar > *Op, const ESupportSolveUse supportSolveUse) const
Base interface for objects that can return a linear operator.
Base class for all linear operators that can support a high-level solve operation.
Factory interface for creating LinearOpWithSolveBase objects from compatible LinearOpBase objects.
Simple interface class to access a precreated preconditioner as one or more linear operators objects ...
Factory interface for creating preconditioner objects from LinearOpBase objects.
EPreconditionerInputType
Enum defining the status of a preconditioner object.
ESupportSolveUse
Enum that specifies how a LinearOpWithSolveBase object will be used for solves after it is constructe...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)