ROL
ROL_LinearConstraint_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_LINEARCONSTRAINT_DEF_H
11#define ROL_LINEARCONSTRAINT_DEF_H
12
13namespace ROL {
14
15template<typename Real>
17 const Ptr<const Vector<Real>> &b) : A_(A), b_(b) {}
18
19template<typename Real>
20void LinearConstraint<Real>::update( const Vector<Real> &x, UpdateType type, int iter ) {}
21
22template<typename Real>
23void LinearConstraint<Real>::update( const Vector<Real> &x, bool flag, int iter ) {}
24
25template<typename Real>
27 A_->apply(c,x,tol);
28 c.plus(*b_);
29}
30
31template<typename Real>
33 A_->apply(jv,v,tol);
34}
35
36template<typename Real>
38 A_->applyAdjoint(ajv,v,tol);
39}
40
41template<typename Real>
43 A_->applyAdjoint(ajv,v,tol);
44}
45
46template<typename Real>
48 ahuv.zero();
49}
50
51template<typename Real>
53 return b_->clone();
54}
55
56} // namespace ROL
57
58#endif
ROL::Ptr< OP > A_
Ptr< Vector< Real > > createRangeSpaceVector(void) const
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update constraint function.
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 ,...
LinearConstraint(const Ptr< const LinearOperator< Real > > &A, const Ptr< const Vector< Real > > &b)
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 value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Evaluate the constraint operator at .
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the constraint Jacobian at , , to vector .
Provides the interface to apply a linear operator.
Defines the linear algebra or vector space interface.
virtual void plus(const Vector &x)=0
Compute , where .
virtual void zero()
Set to zero vector.