44 #ifndef ROL_STDEQUALITY_CONSTRAINT_H
45 #define ROL_STDEQUALITY_CONSTRAINT_H
71 virtual void update(
const std::vector<Real> &x,
bool flag =
true,
int iter = -1 ) {}
81 virtual void value( std::vector<Real> &c,
const std::vector<Real> &x, Real &tol ) = 0;
95 catch (std::exception &e ){
100 virtual void applyJacobian( std::vector<Real> &jv,
const std::vector<Real> v,
101 const std::vector<Real> &x, Real &tol ) {
102 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
103 ">>> ERROR (ROL::StdEqualityConstraint): applyJacobian not implemented!");
117 catch (std::exception &e ){
123 const std::vector<Real> &x, Real &tol ) {
124 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
125 ">>> ERROR (ROL::StdEqualityConstraint): applyAdjointJacobian not implemented!");
139 *(xs.getVector()), tol );
141 catch (std::exception &e) {
148 const std::vector<Real> &v,
const std::vector<Real> &x,
150 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
151 ">>> ERROR (ROL::StdEqualityConstraint) : applyAdjointHessian not implemented!");
168 *(b2s.getVector()), *(xs.getVector()), tol );
170 catch (std::exception &e) {
176 const std::vector<Real> &b1,
const std::vector<Real> &b2,
177 const std::vector<Real> &x, Real tol ) {
178 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
179 ">>> ERROR (ROL::StdEqualityConstraint) : solveAugmentedSystem not implemented!");
180 return std::vector<Real>();
193 *(gs.getVector()), tol );
195 catch (std::exception &e) {
201 const std::vector<Real> &x,
const std::vector<Real> &g, Real &tol ) {
202 TEUCHOS_TEST_FOR_EXCEPTION(
true, std::invalid_argument,
203 ">>> ERROR (ROL::StdEqualityConstraint) : applyPreconditioner not implemented!");
virtual std::vector< Real > solveAugmentedSystem(std::vector< Real > &v1, std::vector< Real > &v2, const std::vector< Real > &b1, const std::vector< Real > &b2, const std::vector< Real > &x, Real tol)
void update(const Vector< Real > &x, bool flag=true, int iter=-1)
Update constraint functions. x is the optimization variable, flag = true if optimization variable is ...
Teuchos::RCP< const std::vector< Element > > getVector() const
virtual void update(const std::vector< Real > &x, bool flag=true, int iter=-1)
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ...
virtual ~StdEqualityConstraint()
virtual void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ...
virtual void applyPreconditioner(std::vector< Real > &pv, const std::vector< Real > &v, const std::vector< Real > &x, const std::vector< Real > &g, Real &tol)
virtual void applyAdjointJacobian(std::vector< Real > &ajv, const std::vector< Real > v, const std::vector< Real > &x, Real &tol)
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol)
Evaluate the constraint operator at .
Defines the linear algebra or vector space interface.
virtual std::vector< Real > solveAugmentedSystem(Vector< Real > &v1, Vector< Real > &v2, const Vector< Real > &b1, const Vector< Real > &b2, const Vector< Real > &x, Real &tol)
Approximately solves the augmented system where , , , , is an identity or Riesz operator...
Defines the equality constraint operator interface.
Defines the equality constraint operator interface for StdVectors.
virtual void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the adjoint of the the constraint Jacobian at , , to vector .
virtual void applyJacobian(std::vector< Real > &jv, const std::vector< Real > v, const std::vector< Real > &x, Real &tol)
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the adjoint of the the constraint Jacobian at , , to vector .
virtual void applyPreconditioner(Vector< Real > &pv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, Real &tol)
Apply a constraint preconditioner at , , to vector . Ideally, this preconditioner satisfies the follo...
virtual void applyAdjointHessian(std::vector< Real > &ahuv, const std::vector< Real > &u, const std::vector< Real > &v, const std::vector< Real > &x, Real &tol)
virtual void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the constraint Jacobian at , , to vector .
std::vector< Real > solveAugmentedSystem(Vector< Real > &v1, Vector< Real > &v2, const Vector< Real > &b1, const Vector< Real > &b2, const Vector< Real > &x, Real &tol)
Approximately solves the augmented system where , , , , is an identity or Riesz operator...
void applyPreconditioner(Vector< Real > &pv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &g, Real &tol)
Apply a constraint preconditioner at , , to vector . Ideally, this preconditioner satisfies the follo...
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
Apply the constraint Jacobian at , , to vector .