ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
function
constraint
ROL_SlacklessConstraint.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_SLACKLESSCONSTRAINT_HPP
11
#define ROL_SLACKLESSCONSTRAINT_HPP
12
13
#include "
ROL_Constraint.hpp
"
14
#include "
ROL_PartitionedVector.hpp
"
15
21
22
namespace
ROL
{
23
24
template
<
typename
Real>
25
class
SlacklessConstraint
:
public
Constraint
<Real> {
26
private
:
27
const
Ptr<Constraint<Real>>
con_
;
28
29
public
:
30
SlacklessConstraint
(
const
Ptr<
Constraint<Real>
> &con );
31
32
void
update
(
const
Vector<Real>
&x,
UpdateType
type,
int
iter = -1 )
override
;
33
void
update
(
const
Vector<Real>
&x,
bool
flag =
true
,
int
iter = -1 )
override
;
34
void
value
(
Vector<Real>
&c,
const
Vector<Real>
&x, Real &tol )
override
;
35
void
applyJacobian
(
Vector<Real>
&jv,
const
Vector<Real>
&v,
const
Vector<Real>
&x, Real &tol )
override
;
36
void
applyAdjointJacobian
(
Vector<Real>
&ajv,
const
Vector<Real>
&v,
const
Vector<Real>
&x,
const
Vector<Real>
&dualv, Real &tol )
override
;
37
void
applyAdjointHessian
(
Vector<Real>
&ahuv,
const
Vector<Real>
&u,
const
Vector<Real>
&v,
const
Vector<Real>
&x, Real &tol )
override
;
38
39
// Definitions for parametrized (stochastic) constraint functions
40
public
:
41
void
setParameter
(
const
std::vector<Real> ¶m)
override
;
42
43
private
:
44
Ptr<Vector<Real>>
getOpt
(
Vector<Real>
&xs )
const
;
45
Ptr<const Vector<Real>>
getOpt
(
const
Vector<Real>
&xs )
const
;
46
void
zeroSlack
(
Vector<Real>
&x )
const
;
47
48
};
// class SlacklessConstraint
49
50
}
// namespace ROL
51
52
#include "
ROL_SlacklessConstraint_Def.hpp
"
53
54
#endif
// ROL__SLACKLESSCONSTRAINT_HPP
55
ROL_Constraint.hpp
ROL_PartitionedVector.hpp
ROL_SlacklessConstraint_Def.hpp
ROL::ROL::Constraint::Constraint
Constraint(void)
Definition
ROL_Constraint_SerialSimOpt.hpp:59
ROL::SlacklessConstraint::applyJacobian
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessConstraint_Def.hpp:34
ROL::SlacklessConstraint::setParameter
void setParameter(const std::vector< Real > ¶m) override
Definition
ROL_SlacklessConstraint_Def.hpp:51
ROL::SlacklessConstraint::con_
const Ptr< Constraint< Real > > con_
Definition
ROL_SlacklessConstraint.hpp:27
ROL::SlacklessConstraint::SlacklessConstraint
SlacklessConstraint(const Ptr< Constraint< Real > > &con)
Definition
ROL_SlacklessConstraint_Def.hpp:16
ROL::SlacklessConstraint::value
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessConstraint_Def.hpp:29
ROL::SlacklessConstraint::zeroSlack
void zeroSlack(Vector< Real > &x) const
Definition
ROL_SlacklessConstraint_Def.hpp:67
ROL::SlacklessConstraint::getOpt
Ptr< Vector< Real > > getOpt(Vector< Real > &xs) const
Definition
ROL_SlacklessConstraint_Def.hpp:57
ROL::SlacklessConstraint::applyAdjointHessian
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessConstraint_Def.hpp:45
ROL::SlacklessConstraint::applyAdjointJacobian
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &dualv, Real &tol) override
Definition
ROL_SlacklessConstraint_Def.hpp:39
ROL::SlacklessConstraint::update
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Definition
ROL_SlacklessConstraint_Def.hpp:19
ROL::Vector
Defines the linear algebra or vector space interface.
Definition
ROL_Vector.hpp:51
ROL
Definition
ROL_ElementwiseVector.hpp:27
ROL::UpdateType
UpdateType
Definition
ROL_UpdateType.hpp:18
Generated by
1.17.0