Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DefaultLinearOpSource_def.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_HPP
11 #define THYRA_DEFUALT_LINEAR_OP_SOURCE_HPP
12 
13 
14 #include "Thyra_DefaultLinearOpSource_decl.hpp"
15 #include "Thyra_LinearOpBase.hpp"
16 
17 
18 namespace Thyra {
19 
20 
21 // Constructors/initializers/accessors
22 
23 
24 template <class Scalar>
26 {}
27 
28 
29 template <class Scalar>
32  )
33 {
34  op_.initialize(op);
35 }
36 
37 
38 template <class Scalar>
40  const Teuchos::RCP<const LinearOpBase<Scalar> > &op
41  )
42 {
43  op_.initialize(op);
44 }
45 
46 
47 template <class Scalar>
50  )
51 {
52  op_.initialize(op);
53 }
54 
55 
56 template <class Scalar>
58  const Teuchos::RCP<const LinearOpBase<Scalar> > &op
59  )
60 {
61  op_.initialize(op);
62 }
63 
64 
65 template <class Scalar>
67 {
68  op_.uninitialize();
69 }
70 
71 
72 // Overridden from LinearOpSourceBase
73 
74 
75 template <class Scalar>
77 {
78  return op_.isConst();
79 }
80 
81 
82 template <class Scalar>
85 {
86  return op_.getNonconstObj();
87 }
88 
89 
90 template <class Scalar>
93 {
94  return op_.getConstObj();
95 }
96 
97 
98 } // namespace Thyra
99 
100 
101 #endif // THYRA_DEFUALT_LINEAR_OP_SOURCE_HPP
Base class for all linear operators.
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.