10 #ifndef THYRA_DEFAULT_ADDED_LINEAR_OP_DECL_HPP
11 #define THYRA_DEFAULT_ADDED_LINEAR_OP_DECL_HPP
14 #include "Thyra_AddedLinearOpBase.hpp"
15 #include "Teuchos_ConstNonconstObjectContainer.hpp"
52 template<
class Scalar>
209 std::vector<Teuchos::ConstNonconstObjectContainer<LinearOpBase<Scalar> > > Ops_;
211 inline void assertInitialized()
const;
212 inline std::string getClassName()
const;
213 inline Ordinal getRangeDim()
const;
214 inline Ordinal getDomainDim()
const;
217 void setupDefaultObjectLabel();
227 template<
class Scalar>
230 defaultAddedLinearOp()
237 template<
class Scalar>
239 RCP<DefaultAddedLinearOp<Scalar> >
240 defaultAddedLinearOp(
const ArrayView<
const RCP<LinearOpBase<Scalar> > > &Ops)
242 return Teuchos::rcp(
new DefaultAddedLinearOp<Scalar>(Ops));
247 template<
class Scalar>
249 RCP<DefaultAddedLinearOp<Scalar> >
250 defaultAddedLinearOp(
const ArrayView<
const RCP<
const LinearOpBase<Scalar> > > &Ops)
252 return Teuchos::rcp(
new DefaultAddedLinearOp<Scalar>(Ops));
260 template<
class Scalar>
261 RCP<LinearOpBase<Scalar> >
263 const RCP<LinearOpBase<Scalar> > &A,
264 const RCP<LinearOpBase<Scalar> > &B,
265 const std::string &label =
""
273 template<
class Scalar>
274 RCP<const LinearOpBase<Scalar> >
276 const RCP<
const LinearOpBase<Scalar> > &A,
277 const RCP<
const LinearOpBase<Scalar> > &B,
278 const std::string &label =
""
286 template<
class Scalar>
287 RCP<LinearOpBase<Scalar> >
289 const RCP<LinearOpBase<Scalar> > &A,
290 const RCP<LinearOpBase<Scalar> > &B,
291 const std::string &label =
""
299 template<
class Scalar>
300 RCP<const LinearOpBase<Scalar> >
302 const RCP<
const LinearOpBase<Scalar> > &A,
303 const RCP<
const LinearOpBase<Scalar> > &B,
304 const std::string &label =
""
311 #endif // THYRA_DEFAULT_ADDED_LINEAR_OP_DECL_HPP
bool opSupportedImpl(EOpTransp M_trans) const
Returns true only if all constituent operators support M_trans.
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
Interface class for implicitly added linear operators.
RCP< const VectorSpaceBase< Scalar > > range() const
Returns this->getOp(0).range() if <t>this->numOps() > 0 and returns Teuchos::null otherwise...
RCP< const LinearOpBase< Scalar > > clone() const
bool opIsConst(const int k) const
Concrete composite LinearOpBase subclass that creates an implicitly added linear operator out of one ...
DefaultAddedLinearOp()
Constructs to uninitialized.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.
Interface for a collection of column vectors called a multi-vector.
void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
Prints the details about the constituent linear operators.
void initialize(const ArrayView< const RCP< LinearOpBase< Scalar > > > &Ops)
Initialize given a list of non-const linear operators.
RCP< LinearOpBase< Scalar > > getNonconstOp(const int k)
void uninitialize()
Set to uninitialized.
Base class for all linear operators.
std::string description() const
Prints just the name DefaultAddedLinearOp along with the overall dimensions and the number of constit...
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns this->getOp(this->numOps()-1).domain() if <t>this->numOps() > 0 and returns Teuchos::null oth...
Teuchos::RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > add(const Scalar &alpha, const bool transposeA, const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &A, const Scalar &beta, const bool transposeB, const CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > &B, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > ¶ms=Teuchos::null)
RCP< const LinearOpBase< Scalar > > getOp(const int k) const