Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DefaultLinearOpSource_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_DEFUALT_LINEAR_OP_SOURCE_DECL_HPP
11 #define THYRA_DEFUALT_LINEAR_OP_SOURCE_DECL_HPP
12 
13 #include "Thyra_LinearOpSourceBase.hpp"
14 #include "Teuchos_ConstNonconstObjectContainer.hpp"
15 
16 namespace Thyra {
17 
21 template<class Scalar>
22 class DefaultLinearOpSource : virtual public LinearOpSourceBase<Scalar>
23 {
24 public:
25 
28 
32 
37  );
38 
42  const Teuchos::RCP<const LinearOpBase<Scalar> > &op
43  );
44 
47  void initialize(
49  );
50 
53  void initialize(
54  const Teuchos::RCP<const LinearOpBase<Scalar> > &op
55  );
56 
63  void uninitialize();
64 
66 
67  // ToDo: Override functions from Describable!
68 
72  bool isOpConst() const;
78 
79 private:
80 
82 
83 };
84 
85 // //////////////////////////////
86 // Related functions
87 
93 template <class Scalar>
96  const Teuchos::RCP<const LinearOpBase<Scalar> > &op
97  )
98 {
100 }
101 
102 } // namespace Thyra
103 
104 #endif // THYRA_DEFUALT_LINEAR_OP_SOURCE_DECL_HPP
Default implementation of a LinearOpSourceBase that just accepts and gives up a single linear operato...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Base interface for objects that can return a linear operator.
Base class for all linear operators.
Teuchos::RCP< const DefaultLinearOpSource< Scalar > > defaultLinearOpSource(const Teuchos::RCP< const LinearOpBase< Scalar > > &op)
Create a DefaultLinearOpSource object out of a LinearOpBase object.
DefaultLinearOpSource()
Construct to uninitialized.
Teuchos::RCP< const LinearOpBase< Scalar > > getOp() const
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstOp()
void initialize(const Teuchos::RCP< LinearOpBase< Scalar > > &op)
Initialize with a non-const linear operator.