Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_AddedLinearOpBase.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_ADDED_LINEAR_OP_BASE_HPP
11 #define THYRA_ADDED_LINEAR_OP_BASE_HPP
12 
13 #include "Thyra_LinearOpBase.hpp"
14 
15 namespace Thyra {
16 
40 template<class Scalar>
41 class AddedLinearOpBase : virtual public LinearOpBase<Scalar> {
42 public:
43 
46 
52  virtual int numOps() const = 0;
53 
62  virtual bool opIsConst(const int k) const = 0;
63 
73  virtual Teuchos::RCP<LinearOpBase<Scalar> > getNonconstOp(const int k) = 0;
74 
83  virtual Teuchos::RCP<const LinearOpBase<Scalar> > getOp(const int k) const = 0;
84 
86 
87 };
88 
89 } // namespace Thyra
90 
91 #endif // THYRA_ADDED_LINEAR_OP_BASE_HPP
Interface class for implicitly added linear operators.
virtual int numOps() const =0
Returns the number of constituent operators.
virtual bool opIsConst(const int k) const =0
Determine if the kth constituent operator is const-only or not.
Base class for all linear operators.
virtual Teuchos::RCP< const LinearOpBase< Scalar > > getOp(const int k) const =0
Return the kth constant constituent operator.
virtual Teuchos::RCP< LinearOpBase< Scalar > > getNonconstOp(const int k)=0
Return the kth non-constant constituent operator.