ROL
ROL_LowerBoundToConstraint_Def.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_LOWER_BOUND_TO_CONSTRAINT_DEF_H
11#define ROL_LOWER_BOUND_TO_CONSTRAINT_DEF_H
12
13namespace ROL {
14
15template<typename Real>
20
21template<typename Real>
23 lo_ = lo.clone();
24 lo_->set(lo);
25}
26
27template<typename Real>
29 const Real one(1);
30 c.set(x);
31 c.axpy(-one,*lo_);
32}
33
34template<typename Real>
36 const Vector<Real> &v,
37 const Vector<Real> &x,
38 Real &tol) {
39 jv.set(v);
40}
41
42template<typename Real>
44 const Vector<Real> &v,
45 const Vector<Real> &x,
46 Real &tol) {
47 ajv.set(v);
48}
49
50template<typename Real>
52 const Vector<Real> &u,
53 const Vector<Real> &v,
54 const Vector<Real> &x,
55 Real &tol) {
56 ahuv.zero();
57}
58
59}
60
61#endif
Provides the interface to apply upper and lower bound constraints.
virtual const Ptr< const Vector< Real > > getLowerBound(void) const
Return the ref count pointer to the lower bound vector.
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Evaluate the constraint operator at .
LowerBoundToConstraint(BoundConstraint< Real > &bnd)
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the constraint Jacobian at , , to vector .
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the adjoint of the the constraint Jacobian at , , to vector .
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ,...
Defines the linear algebra or vector space interface.
virtual void set(const Vector &x)
Set where .
virtual void zero()
Set to zero vector.
virtual ROL::Ptr< Vector > clone() const =0
Clone to make a new (uninitialized) vector.
virtual void axpy(const Real alpha, const Vector &x)
Compute where .