ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
function
operator
ROL_DyadicOperator.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Rapid Optimization Library (ROL) Package
4
//
5
// Copyright 2014 NTESS and the ROL contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef ROL_DYADICOPERATOR_H
11
#define ROL_DYADICOPERATOR_H
12
13
#include "
ROL_LinearOperator.hpp
"
14
15
20
21
namespace
ROL
{
22
23
// Implementation of a Dyadic operator x*y'
24
template
<
class
Real>
25
class
DyadicOperator
:
public
ROL::LinearOperator
<Real> {
26
27
typedef
ROL::Vector<Real>
V
;
28
29
private
:
30
31
const
ROL::Ptr<const V>
x_
;
32
const
ROL::Ptr<const V>
y_
;
33
34
public
:
35
36
DyadicOperator
(
const
ROL::Ptr<const V> &x,
37
const
ROL::Ptr<const V> &y ) :
x_
(x),
y_
(y) {}
38
39
void
apply
(
V
&Hv,
const
V
&v, Real &tol )
const
{
40
Hv.
set
(*
x_
);
41
Hv.
scale
(v.
dot
(*
y_
));
42
}
43
44
void
applyInverse
(
V
&Hv,
const
V
&v, Real &tol )
const
{
45
46
ROL_TEST_FOR_EXCEPTION(
true
, std::logic_error,
47
">>> ERROR (ROL_DyadicOperator, applyInverse): "
48
"Not implemented."
);
49
50
}
51
};
// class DyadicOperator
52
53
}
// namespace ROL
54
55
56
57
58
#endif
// ROL_NULLOPERATOR_H
59
ROL_LinearOperator.hpp
ROL::DyadicOperator::applyInverse
void applyInverse(V &Hv, const V &v, Real &tol) const
Apply inverse of linear operator.
Definition
ROL_DyadicOperator.hpp:44
ROL::DyadicOperator::x_
const ROL::Ptr< const V > x_
Definition
ROL_DyadicOperator.hpp:31
ROL::DyadicOperator::apply
void apply(V &Hv, const V &v, Real &tol) const
Apply linear operator.
Definition
ROL_DyadicOperator.hpp:39
ROL::DyadicOperator::y_
const ROL::Ptr< const V > y_
Definition
ROL_DyadicOperator.hpp:32
ROL::DyadicOperator::V
ROL::Vector< Real > V
Definition
ROL_DyadicOperator.hpp:27
ROL::DyadicOperator::DyadicOperator
DyadicOperator(const ROL::Ptr< const V > &x, const ROL::Ptr< const V > &y)
Definition
ROL_DyadicOperator.hpp:36
ROL::ROL::LinearOperator
Definition
ROL_Constraint_SerialSimOpt.hpp:37
ROL::ROL::Vector
Definition
ROL_Constraint_SerialSimOpt.hpp:51
ROL::ROL::Vector::scale
virtual void scale(const Real alpha)=0
Compute where .
ROL::ROL::Vector::set
virtual void set(const Vector &x)
Set where .
Definition
ROL_Constraint_SerialSimOpt.hpp:176
ROL::ROL::Vector::dot
virtual Real dot(const Vector &x) const =0
Compute where .
ROL
Definition
ROL_ElementwiseVector.hpp:27
Generated by
1.17.0