ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
function
operator
ROL_NullOperator.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_NULLOPERATOR_H
11
#define ROL_NULLOPERATOR_H
12
13
#include "
ROL_LinearOperator.hpp
"
14
15
20
21
namespace
ROL
{
22
23
template
<
class
Real>
24
class
NullOperator
:
public
LinearOperator
<Real> {
25
26
void
apply
(
Vector<Real>
&Hv,
const
Vector<Real>
&v, Real &tol )
const
{
27
Hv.
zero
();
28
}
29
30
void
applyInverse
(
Vector<Real>
&Hv,
const
Vector<Real>
&v, Real &tol )
const
{
31
ROL_TEST_FOR_EXCEPTION(
true
, std::logic_error,
32
">>> ERROR (ROL_NullOperator, applyInverse): "
33
"Null Operator has no inverse."
);
34
}
35
36
};
37
38
}
// namespace ROL
39
40
41
42
43
#endif
// ROL_NULLOPERATOR_H
44
ROL_LinearOperator.hpp
ROL::LinearOperator
Provides the interface to apply a linear operator.
Definition
ROL_LinearOperator.hpp:37
ROL::NullOperator
Multiplication by zero.
Definition
ROL_NullOperator.hpp:24
ROL::NullOperator::applyInverse
void applyInverse(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Definition
ROL_NullOperator.hpp:30
ROL::NullOperator::apply
void apply(Vector< Real > &Hv, const Vector< Real > &v, Real &tol) const
Definition
ROL_NullOperator.hpp:26
ROL::Vector
Defines the linear algebra or vector space interface.
Definition
ROL_Vector.hpp:51
ROL::Vector::zero
virtual void zero()
Set to zero vector.
Definition
ROL_Vector.hpp:134
ROL
Definition
ROL_ElementwiseVector.hpp:27
Generated by
1.17.0