Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DiagonalLinearOpBase.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_DIAGONAL_LINEAR_OP_BASE_HPP
11 #define THYRA_DIAGONAL_LINEAR_OP_BASE_HPP
12 
13 #include "Thyra_LinearOpBase.hpp"
14 
15 namespace Thyra {
16 
42 template<class Scalar>
43 class DiagonalLinearOpBase : virtual public LinearOpBase<Scalar> {
44 public:
45 
48 
50  virtual bool isDiagConst() const = 0;
51 
65 
71  virtual Teuchos::RCP<const VectorBase<Scalar> > getDiag() const = 0;
72 
74 
75 };
76 
77 } // end namespace Thyra
78 
79 #endif // THYRA_DIAGONAL_LINEAR_OP_BASE_HPP
virtual Teuchos::RCP< const VectorBase< Scalar > > getDiag() const =0
Returns the const diagonal vector diag.
Base class for all linear operators.
virtual Teuchos::RCP< VectorBase< Scalar > > getNonconstDiag()=0
Returns the non-const diagonal vector diag.
virtual bool isDiagConst() const =0
Returns true if the diagonal vector is const-only.
Interface class for for diagonal linear operators.