ROL
Loading...
Searching...
No Matches
src
function
projection
ROL_ZeroProjection.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_ZEROPROJECTION_H
11
#define ROL_ZEROPROJECTION_H
12
13
#include "
ROL_PolyhedralProjection.hpp
"
14
#include <iostream>
15
16
namespace
ROL
{
17
18
template
<
typename
Real>
19
class
ZeroProjection
:
public
PolyhedralProjection
<Real> {
20
public
:
21
22
ZeroProjection
() :
PolyhedralProjection
<Real>(nullPtr) {}
23
24
virtual
void
project
(
Vector<Real>
&x, std::ostream &stream = std::cout)
override
{
25
x.
zero
();
26
}
27
28
virtual
void
applyJacobian
(
Vector<Real>
&v,
const
Vector<Real>
&x)
override
{
29
v.
zero
();
30
}
31
32
};
// class PolyhedralProjection_Zero
33
}
// namespace ROL
34
35
#endif
ROL_PolyhedralProjection.hpp
ROL::PolyhedralProjection
Definition
ROL_PolyhedralProjection.hpp:23
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::ZeroProjection
Definition
ROL_ZeroProjection.hpp:19
ROL::ZeroProjection::ZeroProjection
ZeroProjection()
Definition
ROL_ZeroProjection.hpp:22
ROL::ZeroProjection::applyJacobian
virtual void applyJacobian(Vector< Real > &v, const Vector< Real > &x) override
Definition
ROL_ZeroProjection.hpp:28
ROL::ZeroProjection::project
virtual void project(Vector< Real > &x, std::ostream &stream=std::cout) override
Definition
ROL_ZeroProjection.hpp:24
ROL
Definition
ROL_ElementwiseVector.hpp:27
Generated by
1.9.8