Thyra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
interfaces
operator_vector
fundamental
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
18
namespace
Thyra {
19
20
21
// Public interface functions
22
23
24
template
<
class
Scalar>
25
RCP<const LinearOpBase<Scalar>
>
26
LinearOpBase<Scalar>::clone
()
const
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
40
template
<
class
Scalar>
41
void
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
Teuchos::Ptr
Teuchos::RCP
Thyra::LinearOpBase
Base class for all linear operators.
Definition
Thyra_LinearOpBase_decl.hpp:159
Thyra::LinearOpBase::apply
void apply(const LinearOpBase< Scalar > &M, const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha=static_cast< Scalar >(1.0), const Scalar beta=static_cast< Scalar >(0.0))
Non-member function call for M.apply(...).
Definition
Thyra_LinearOpBase_def.hpp:41
Thyra::LinearOpBase::apply
void apply(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
Apply the linear operator to a multi-vector : Y = alpha*op(M)*X + beta*Y.
Definition
Thyra_LinearOpBase_decl.hpp:260
Thyra::LinearOpBase::clone
virtual RCP< const LinearOpBase< Scalar > > clone() const
Clone the linear operator object (if supported).
Definition
Thyra_LinearOpBase_def.hpp:26
Thyra::MultiVectorBase
Interface for a collection of column vectors called a multi-vector.
Definition
Thyra_MultiVectorBase_decl.hpp:464
Generated by
1.17.0