Thyra Version of the Day
Loading...
Searching...
No Matches
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
16namespace Thyra {
17
34template<class Scalar>
35class DefaultIdentityLinearOp : virtual public IdentityLinearOpBase<Scalar>
36{
37public:
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
106protected:
107
110
112 bool opSupportedImpl(EOpTransp M_trans) const;
113
115 void applyImpl(
116 const EOpTransp M_trans,
118 const Ptr<MultiVectorBase<Scalar> > &Y,
119 const Scalar alpha,
120 const Scalar beta
121 ) const;
122
124
125private:
126
128
129 // Not defined and not to be called
132
133};
134
135
140template<class Scalar>
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
Represents a identity linear operator M = I.
RCP< const VectorSpaceBase< Scalar > > domain() const
Returns Teuchos::null if uninitialized.
DefaultIdentityLinearOp()
Constructs to uninitialized.
bool opSupportedImpl(EOpTransp M_trans) const
Returns true .
RCP< const LinearOpBase< Scalar > > clone() const
RCP< const LinearOpBase< Scalar > > identity(const RCP< const VectorSpaceBase< Scalar > > &space, const std::string &label="")
Create an identity linear operator with given a vector space.
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 > > range() const
Returns Teuchos::null if uninitialized.
void initialize(const RCP< const VectorSpaceBase< Scalar > > &space)
Initialize given a list of non-const linear operators.
std::string description() const
Prints just the name DefaultIdentityLinearOp along with the overall dimensions.
Interface class for identity linear operators.
Interface for a collection of column vectors called a multi-vector.
Abstract interface for objects that represent a space for vectors.
EOpTransp
Enumeration for determining how a linear operator is applied. `*.