Thyra  Version of the Day
Thyra_BlockedLinearOpBase.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_BLOCKED_LINEAR_OP_BASE_HPP
11 #define THYRA_BLOCKED_LINEAR_OP_BASE_HPP
12
13
14 #include "Thyra_LinearOpBase.hpp"
15
16
17 namespace Thyra {
18
19
21 template <class Scalar> class ProductVectorSpaceBase;
22
30 template<class Scalar>
32  : virtual public LinearOpBase<Scalar>
33 {
34 public:
35
42  productRange() const = 0;
43
50  productDomain() const = 0;
51
62  virtual bool blockExists(const int i, const int j) const = 0;
63
74  virtual bool blockIsConst(const int i, const int j) const = 0;
75
93  getNonconstBlock(const int i, const int j) = 0;
94
111  getBlock(const int i, const int j) const = 0;
112
113 };
114
115
116 } // namespace Thyra
117
118
119 #endif // THYRA_BLOCKED_LINEAR_OP_BASE_HPP
Base interface for linear operators that can be accessed as sub-blocks.
virtual bool blockIsConst(const int i, const int j) const =0
Return if the block (i,j) is const only or not.
virtual Teuchos::RCP< const LinearOpBase< Scalar > > getBlock(const int i, const int j) const =0
Return a const view of the block (i,j) if it exists.
virtual bool blockExists(const int i, const int j) const =0
Return if the block (i,j) exists or not.
Base class for all linear operators.
virtual Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > productDomain() const =0
Return the product space for the domain.
virtual Teuchos::RCP< const ProductVectorSpaceBase< Scalar > > productRange() const =0
Return the product space for the range.
virtual Teuchos::RCP< LinearOpBase< Scalar > > getNonconstBlock(const int i, const int j)=0
Return a non-const view of the block (i,j) if it exists.