Thyra Version of the Day
Loading...
Searching...
No Matches
Thyra_LinearOpBase_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_LINEAR_OP_BASE_DEF_HPP
11#define THYRA_LINEAR_OP_BASE_DEF_HPP
12
13#include "Thyra_LinearOpBase_decl.hpp"
14#include "Thyra_MultiVectorBase.hpp"
15#include "Thyra_VectorSpaceBase.hpp"
16
17
18namespace Thyra {
19
20
21// Public interface functions
22
23
24template<class Scalar>
25RCP<const LinearOpBase<Scalar> >
27{
28 return Teuchos::null;
29}
30
31
32} // end namespace Thyra
33
34
35// ToDo: You can move this back to the decl file after you have refactored
36// apply(...) to not use raw pointers. Otherwise the Y.ptr() call needs to have
37// the definition of MultiVectorBase.
38
39
40template<class Scalar>
41void Thyra::apply(
42 const LinearOpBase<Scalar> &M,
43 const EOpTransp M_trans,
44 const MultiVectorBase<Scalar> &X,
45 const Ptr<MultiVectorBase<Scalar> > &Y,
46 const Scalar alpha,
47 const Scalar beta
48 )
49{
50 M.apply(M_trans, X, Y, alpha, beta);
51}
52
53
54//
55// Explicit instantiation macro
56//
57
58#define THYRA_LINEAR_OP_BASE_INSTANT(SCALAR) \
59 \
60 template class LinearOpBase<SCALAR >; \
61 \
62 template void apply( \
63 const LinearOpBase<SCALAR > &M, \
64 const EOpTransp M_trans, \
65 const MultiVectorBase<SCALAR > &X, \
66 const Ptr<MultiVectorBase<SCALAR > > &Y, \
67 const SCALAR alpha, \
68 const SCALAR beta \
69 );
70
71
72#endif // THYRA_LINEAR_OP_BASE_DEF_HPP
virtual RCP< const LinearOpBase< Scalar > > clone() const
Clone the linear operator object (if supported).
T_To & dyn_cast(T_From &from)