Thyra Version of the Day
Loading...
Searching...
No Matches
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
18namespace Thyra {
19
20
21// Constructors/initializers/accessors
22
23
24template <class Scalar>
27
28
29template <class Scalar>
36
37
38template <class Scalar>
40 const Teuchos::RCP<const LinearOpBase<Scalar> > &op
41 )
42{
43 op_.initialize(op);
44}
45
46
47template <class Scalar>
50 )
51{
52 op_.initialize(op);
53}
54
55
56template <class Scalar>
58 const Teuchos::RCP<const LinearOpBase<Scalar> > &op
59 )
60{
61 op_.initialize(op);
62}
63
64
65template <class Scalar>
67{
68 op_.uninitialize();
69}
70
71
72// Overridden from LinearOpSourceBase
73
74
75template <class Scalar>
77{
78 return op_.isConst();
79}
80
81
82template <class Scalar>
85{
86 return op_.getNonconstObj();
87}
88
89
90template <class Scalar>
93{
94 return op_.getConstObj();
95}
96
97
98} // namespace Thyra
99
100
101#endif // THYRA_DEFUALT_LINEAR_OP_SOURCE_HPP
void initialize(const Teuchos::RCP< LinearOpBase< Scalar > > &op)
Initialize with a non-const linear operator.
DefaultLinearOpSource()
Construct to uninitialized.
Teuchos::RCP< LinearOpBase< Scalar > > getNonconstOp()
Teuchos::RCP< const LinearOpBase< Scalar > > getOp() const
Base class for all linear operators.