Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DefaultIdentityLinearOp_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_IDENTITY_LINEAR_OP_DECL_HPP
11 #define THYRA_DEFAULT_IDENTITY_LINEAR_OP_DECL_HPP
12 
13 #include "Thyra_IdentityLinearOpBase.hpp"
14 #include "Teuchos_ConstNonconstObjectContainer.hpp"
15 
16 namespace Thyra {
17 
34 template<class Scalar>
35 class DefaultIdentityLinearOp : virtual public IdentityLinearOpBase<Scalar>
36 {
37 public:
38 
41 
49 
53 
70  void initialize(const RCP<const VectorSpaceBase<Scalar> > &space);
71 
78  void uninitialize();
79 
81 
84 
87 
90 
93 
95 
98 
102  std::string description() const;
103 
105 
106 protected:
107 
110 
112  bool opSupportedImpl(EOpTransp M_trans) const;
113 
115  void applyImpl(
116  const EOpTransp M_trans,
117  const MultiVectorBase<Scalar> &X,
118  const Ptr<MultiVectorBase<Scalar> > &Y,
119  const Scalar alpha,
120  const Scalar beta
121  ) const;
122 
124 
125 private:
126 
128 
129  // Not defined and not to be called
132 
133 };
134 
135 
140 template<class Scalar>
142 identity(
143  const RCP<const VectorSpaceBase<Scalar> > &space,
144  const std::string &label = ""
145  );
146 
147 
148 } // end namespace Thyra
149 
150 
151 #endif // THYRA_DEFAULT_IDENTITY_LINEAR_OP_DECL_HPP
EOpTransp
Enumeration for determining how a linear operator is applied. `*.
Represents a identity linear operator M = I.
void applyImpl(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
Interface class for identity linear operators.
std::string description() const
Prints just the name DefaultIdentityLinearOp along with the overall dimensions.
Abstract interface for objects that represent a space for vectors.
Interface for a collection of column vectors called a multi-vector.
bool opSupportedImpl(EOpTransp M_trans) const
Returns true .
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space)
Initialize given a list of non-const linear operators.
RCP< const LinearOpBase< Scalar > > clone() const
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns Teuchos::null if uninitialized.
RCP< const VectorSpaceBase< Scalar > > range() const
Returns Teuchos::null if uninitialized.
DefaultIdentityLinearOp()
Constructs to uninitialized.