ROL
Constraint_SimOpt Class Referenceabstract

Defines the constraint operator interface for simulation-based optimization. More...

#include <ROL_Constraint_SimOpt.hpp>

+ Inheritance diagram for Constraint_SimOpt:

Public Member Functions

 Constraint_SimOpt ()
 
virtual void update (const Vector< Real > &u, const Vector< Real > &z, bool flag=true, int iter=-1)
 Update constraint functions.
x is the optimization variable, flag = true if optimization variable is changed, iter is the outer algorithm iterations count.
 
virtual void update (const Vector< Real > &u, const Vector< Real > &z, UpdateType type, int iter=-1)
 
virtual void update_1 (const Vector< Real > &u, bool flag=true, int iter=-1)
 Update constraint functions with respect to Sim variable.
x is the optimization variable, flag = true if optimization variable is changed, iter is the outer algorithm iterations count.
 
virtual void update_1 (const Vector< Real > &u, UpdateType type, int iter=-1)
 
virtual void update_2 (const Vector< Real > &z, bool flag=true, int iter=-1)
 Update constraint functions with respect to Opt variable. x is the optimization variable, flag = true if optimization variable is changed, iter is the outer algorithm iterations count.
 
virtual void update_2 (const Vector< Real > &z, UpdateType type, int iter=-1)
 
virtual void solve_update (const Vector< Real > &u, const Vector< Real > &z, UpdateType type, int iter=-1)
 Update SimOpt constraint during solve (disconnected from optimization updates).
 
virtual void value (Vector< Real > &c, const Vector< Real > &u, const Vector< Real > &z, Real &tol)=0
 Evaluate the constraint operator \(c:\mathcal{U}\times\mathcal{Z} \rightarrow \mathcal{C}\) at \((u,z)\).
 
virtual void solve (Vector< Real > &c, Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Given \(z\), solve \(c(u,z)=0\) for \(u\).
 
virtual void setSolveParameters (ParameterList &parlist)
 Set solve parameters.
 
virtual void applyJacobian_1 (Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the partial constraint Jacobian at \((u,z)\), \(c_u(u,z) \in L(\mathcal{U}, \mathcal{C})\), to the vector \(v\).
 
virtual void applyJacobian_2 (Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the partial constraint Jacobian at \((u,z)\), \(c_z(u,z) \in L(\mathcal{Z}, \mathcal{C})\), to the vector \(v\).
 
virtual void applyInverseJacobian_1 (Vector< Real > &ijv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the inverse partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^{-1} \in L(\mathcal{C}, \mathcal{U})\), to the vector \(v\).
 
virtual void applyAdjointJacobian_1 (Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^* \in L(\mathcal{C}^*, \mathcal{U}^*)\), to the vector \(v\). This is the primary interface.
 
virtual void applyAdjointJacobian_1 (Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &dualv, Real &tol)
 Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^* \in L(\mathcal{C}^*, \mathcal{U}^*)\), to the vector \(v\). This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.
 
virtual void applyAdjointJacobian_2 (Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_z(u,z)^* \in L(\mathcal{C}^*, \mathcal{Z}^*)\), to vector \(v\). This is the primary interface.
 
virtual void applyAdjointJacobian_2 (Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &dualv, Real &tol)
 Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_z(u,z)^* \in L(\mathcal{C}^*, \mathcal{Z}^*)\), to vector \(v\). This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.
 
virtual void applyInverseAdjointJacobian_1 (Vector< Real > &iajv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the inverse of the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^{-*} \in L(\mathcal{U}^*, \mathcal{C}^*)\), to the vector \(v\).
 
virtual void applyAdjointHessian_11 (Vector< Real > &ahwv, const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the simulation-space derivative of the adjoint of the constraint simulation-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{uu}(u,z)(v,\cdot)^*w\).
 
virtual void applyAdjointHessian_12 (Vector< Real > &ahwv, const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the optimization-space derivative of the adjoint of the constraint simulation-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{uz}(u,z)(v,\cdot)^*w\).
 
virtual void applyAdjointHessian_21 (Vector< Real > &ahwv, const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the simulation-space derivative of the adjoint of the constraint optimization-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{zu}(u,z)(v,\cdot)^*w\).
 
virtual void applyAdjointHessian_22 (Vector< Real > &ahwv, const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol)
 Apply the optimization-space derivative of the adjoint of the constraint optimization-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{zz}(u,z)(v,\cdot)^*w\).
 
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
 
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 \(x\), \(P(x) \in L(\mathcal{C}, \mathcal{C})\), to vector \(v\). In general, this preconditioner satisfies the following relationship:
 
virtual 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 changed, iter is the outer algorithm iterations count.
 
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 
virtual void value (Vector< Real > &c, const Vector< Real > &x, Real &tol)
 
virtual void applyJacobian (Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 
virtual void applyAdjointJacobian (Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 
virtual void applyAdjointHessian (Vector< Real > &ahwv, const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 
virtual Real checkSolve (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &c, const bool printToStream=true, std::ostream &outStream=std::cout)
 
virtual Real checkAdjointConsistencyJacobian_1 (const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const bool printToStream=true, std::ostream &outStream=std::cout)
 Check the consistency of the Jacobian and its adjoint. This is the primary interface.
 
virtual Real checkAdjointConsistencyJacobian_1 (const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &dualw, const Vector< Real > &dualv, const bool printToStream=true, std::ostream &outStream=std::cout)
 Check the consistency of the Jacobian and its adjoint. This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.
 
virtual Real checkAdjointConsistencyJacobian_2 (const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const bool printToStream=true, std::ostream &outStream=std::cout)
 Check the consistency of the Jacobian and its adjoint. This is the primary interface.
 
virtual Real checkAdjointConsistencyJacobian_2 (const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &dualw, const Vector< Real > &dualv, const bool printToStream=true, std::ostream &outStream=std::cout)
 Check the consistency of the Jacobian and its adjoint. This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.
 
virtual Real checkInverseJacobian_1 (const Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const bool printToStream=true, std::ostream &outStream=std::cout)
 
virtual Real checkInverseAdjointJacobian_1 (const Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, const bool printToStream=true, std::ostream &outStream=std::cout)
 
std::vector< std::vector< Real > > checkApplyJacobian_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const Vector< Real > &jv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkApplyJacobian_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const Vector< Real > &jv, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkApplyJacobian_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const Vector< Real > &jv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkApplyJacobian_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const Vector< Real > &jv, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 \( u\in U \), \( z\in Z \), \( p\in C^\ast \), \( v \in U \), \( hv \in U^\ast \)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 \( u\in U \), \( z\in Z \), \( p\in C^\ast \), \( v \in U \), \( hv \in U^\ast \)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 \( u\in U \), \( z\in Z \), \( p\in C^\ast \), \( v \in U \), \( hv \in U^\ast \)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 
std::vector< std::vector< Real > > checkApplyAdjointHessian_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &p, const Vector< Real > &v, const Vector< Real > &hv, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
- Public Member Functions inherited from ROL::Constraint< Real >
virtual ~Constraint (void)
 
 Constraint (void)
 
virtual void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update constraint function.
 
virtual 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 changed, iter is the outer algorithm iterations count.
 
virtual void value (Vector< Real > &c, const Vector< Real > &x, Real &tol)=0
 Evaluate the constraint operator \(c:\mathcal{X} \rightarrow \mathcal{C}\) at \(x\).
 
virtual void applyJacobian (Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply the constraint Jacobian at \(x\), \(c'(x) \in L(\mathcal{X}, \mathcal{C})\), to vector \(v\).
 
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 \(x\), \(c'(x)^* \in L(\mathcal{C}^*, \mathcal{X}^*)\), to vector \(v\).
 
virtual void applyAdjointJacobian (Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &dualv, Real &tol)
 Apply the adjoint of the the constraint Jacobian at \(x\), \(c'(x)^* \in L(\mathcal{C}^*, \mathcal{X}^*)\), to vector \(v\).
 
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 \(x\) to vector \(u\) in direction \(v\), according to \( v \mapsto c''(x)(v,\cdot)^*u \).
 
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
 
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 \(x\), \(P(x) \in L(\mathcal{C}, \mathcal{C}^*)\), to vector \(v\). Ideally, this preconditioner satisfies the following relationship:
 
void activate (void)
 Turn on constraints.
 
void deactivate (void)
 Turn off constraints.
 
bool isActivated (void)
 Check if constraints are on.
 
virtual std::vector< std::vector< Real > > checkApplyJacobian (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &jv, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference check for the constraint Jacobian application.
 
virtual std::vector< std::vector< Real > > checkApplyJacobian (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &jv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference check for the constraint Jacobian application.
 
virtual std::vector< std::vector< Real > > checkApplyAdjointJacobian (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &c, const Vector< Real > &ajv, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS)
 Finite-difference check for the application of the adjoint of constraint Jacobian.
 
virtual Real checkAdjointConsistencyJacobian (const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &x, const bool printToStream=true, std::ostream &outStream=std::cout)
 
virtual Real checkAdjointConsistencyJacobian (const Vector< Real > &w, const Vector< Real > &v, const Vector< Real > &x, const Vector< Real > &dualw, const Vector< Real > &dualv, const bool printToStream=true, std::ostream &outStream=std::cout)
 
virtual std::vector< std::vector< Real > > checkApplyAdjointHessian (const Vector< Real > &x, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &hv, const std::vector< Real > &step, const bool printToScreen=true, std::ostream &outStream=std::cout, const int order=1)
 Finite-difference check for the application of the adjoint of constraint Hessian.
 
virtual std::vector< std::vector< Real > > checkApplyAdjointHessian (const Vector< Real > &x, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &hv, const bool printToScreen=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1)
 Finite-difference check for the application of the adjoint of constraint Hessian.
 
virtual void setParameter (const std::vector< Real > &param)
 

Protected Attributes

Real atol_
 
Real rtol_
 
Real stol_
 
Real factor_
 
Real decr_
 
int maxit_
 
bool print_
 
bool zero_
 
int solverType_
 
bool firstSolve_
 

Private Attributes

Ptr< Vector< Real > > unew_
 
Ptr< Vector< Real > > jv_
 
const Real DEFAULT_atol_
 
const Real DEFAULT_rtol_
 
const Real DEFAULT_stol_
 
const Real DEFAULT_factor_
 
const Real DEFAULT_decr_
 
const int DEFAULT_maxit_
 
const bool DEFAULT_print_
 
const bool DEFAULT_zero_
 
const int DEFAULT_solverType_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::Constraint< Real >
const std::vector< Real > getParameter (void) const
 

Detailed Description

Defines the constraint operator interface for simulation-based optimization.

This constraint interface inherits from ROL_Constraint, for the use case when \(\mathcal{X}=\mathcal{U}\times\mathcal{Z}\) where \(\mathcal{U}\) and \(\mathcal{Z}\) are Banach spaces. \(\mathcal{U}\) denotes the "simulation space" and \(\mathcal{Z}\) denotes the "optimization space" (of designs, controls, parameters). The simulation-based constraints are of the form

\[ c(u,z) = 0 \,. \]

The basic operator interface, to be implemented by the user, requires:

  • value – constraint evaluation.
  • applyJacobian_1 – action of the partial constraint Jacobian –derivatives are with respect to the first component \(\mathcal{U}\);
  • applyJacobian_2 – action of the partial constraint Jacobian –derivatives are with respect to the second component \(\mathcal{Z}\);
  • applyAdjointJacobian_1 – action of the adjoint of the partial constraint Jacobian –derivatives are with respect to the first component \(\mathcal{U}\);
  • applyAdjointJacobian_2 – action of the adjoint of the partial constraint Jacobian –derivatives are with respect to the second component \(\mathcal{Z}\);

The user may also overload:

  • applyAdjointHessian_11 – action of the adjoint of the partial constraint Hessian –derivatives are with respect to the first component only;
  • applyAdjointHessian_12 – action of the adjoint of the partial constraint Hessian –derivatives are with respect to the first and second components;
  • applyAdjointHessian_21 – action of the adjoint of the partial constraint Hessian –derivatives are with respect to the second and first components;
  • applyAdjointHessian_22 – action of the adjoint of the partial constraint Hessian –derivatives are with respect to the second component only;
  • solveAugmentedSystem – solution of the augmented system –the default is an iterative scheme based on the action of the Jacobian and its adjoint.
  • applyPreconditioner – action of a constraint preconditioner –the default is null-op.

Constructor & Destructor Documentation

◆ Constraint_SimOpt()

Constraint_SimOpt::Constraint_SimOpt ( )
inline

Definition at line 142 of file ROL_Constraint_SimOpt.hpp.

References ROL::Constraint< Real >::Constraint().

Member Function Documentation

◆ update() [1/4]

◆ update() [2/4]

virtual void Constraint_SimOpt::update ( const Vector< Real > & u,
const Vector< Real > & z,
UpdateType type,
int iter = -1 )
inlinevirtual

◆ update_1() [1/2]

virtual void Constraint_SimOpt::update_1 ( const Vector< Real > & u,
bool flag = true,
int iter = -1 )
inlinevirtual

Update constraint functions with respect to Sim variable.
x is the optimization variable, flag = true if optimization variable is changed, iter is the outer algorithm iterations count.

Definition at line 177 of file ROL_Constraint_SimOpt.hpp.

Referenced by Constraint_SimOpt::update(), and Constraint_SimOpt::update().

◆ update_1() [2/2]

virtual void Constraint_SimOpt::update_1 ( const Vector< Real > & u,
UpdateType type,
int iter = -1 )
inlinevirtual

Definition at line 178 of file ROL_Constraint_SimOpt.hpp.

◆ update_2() [1/2]

virtual void Constraint_SimOpt::update_2 ( const Vector< Real > & z,
bool flag = true,
int iter = -1 )
inlinevirtual

Update constraint functions with respect to Opt variable. x is the optimization variable, flag = true if optimization variable is changed, iter is the outer algorithm iterations count.

Definition at line 185 of file ROL_Constraint_SimOpt.hpp.

Referenced by Constraint_SimOpt::update(), and Constraint_SimOpt::update().

◆ update_2() [2/2]

virtual void Constraint_SimOpt::update_2 ( const Vector< Real > & z,
UpdateType type,
int iter = -1 )
inlinevirtual

Definition at line 186 of file ROL_Constraint_SimOpt.hpp.

◆ solve_update()

virtual void Constraint_SimOpt::solve_update ( const Vector< Real > & u,
const Vector< Real > & z,
UpdateType type,
int iter = -1 )
inlinevirtual

Update SimOpt constraint during solve (disconnected from optimization updates).

     @param[in]    x is the optimization variable
     @param[in] type is the update type
     @param[in] iter is the solver iteration count

Definition at line 194 of file ROL_Constraint_SimOpt.hpp.

Referenced by Constraint_SimOpt::solve().

◆ value() [1/2]

virtual void Constraint_SimOpt::value ( Vector< Real > & c,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
pure virtual

Evaluate the constraint operator \(c:\mathcal{U}\times\mathcal{Z} \rightarrow \mathcal{C}\) at \((u,z)\).

Parameters
[out]cis the result of evaluating the constraint operator at \((u,z)\); a constraint-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{c} = c(u,z)\), where \(\mathsf{c} \in \mathcal{C}\), \(\mathsf{u} \in \mathcal{U}\), and $ \(\mathsf{z} \in\mathcal{Z}\).


◆ solve()

virtual void Constraint_SimOpt::solve ( Vector< Real > & c,
Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Given \(z\), solve \(c(u,z)=0\) for \(u\).

  @param[out]      c   is the result of evaluating the constraint operator at @b \f$(u,z)\f$; a constraint-space vector
  @param[in,out]   u   is the solution vector; a simulation-space vector
  @param[in]       z   is the constraint argument; an optimization-space vector
  @param[in,out]   tol is a tolerance for inexact evaluations; currently unused

  The defualt implementation is Newton's method globalized with a backtracking line search.

  ---

Definition at line 225 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyInverseJacobian_1(), cnorm, Constraint_SimOpt::solve_update(), and value.

Referenced by Constraint_SimOpt::checkSolve().

◆ setSolveParameters()

virtual void Constraint_SimOpt::setSolveParameters ( ParameterList & parlist)
inlinevirtual

Set solve parameters.

  @param[in]       parlist   ParameterList containing solve parameters

  For the default implementation, parlist has two sublist ("SimOpt"
  and "Solve") and the "Solve" sublist has six input parameters.

     - "Residual Tolerance": Absolute tolerance for the norm of the residual (Real)
     - "Iteration Limit": Maximum number of Newton iterations (int)
     - "Sufficient Decrease Tolerance": Tolerance signifying sufficient decrease in the residual norm, between 0 and 1 (Real)
     - "Step Tolerance": Absolute tolerance for the step size parameter (Real)
     - "Backtracking Factor": Rate for decreasing step size during backtracking, between 0 and 1 (Real)
     - "Output Iteration History": Set to true in order to print solve iteration history (bool)
     - "Zero Initial Guess": Use a vector of zeros as an initial guess for the solve (bool)
     - "Solver Type": Determine which solver to use (0: Newton with line search, 1: Levenberg-Marquardt, 2: SQP) (int)

  These parameters are accessed as parlist.sublist("SimOpt").sublist("Solve").get(...).

  ---

Definition at line 337 of file ROL_Constraint_SimOpt.hpp.

Referenced by main().

◆ applyJacobian_1()

virtual void Constraint_SimOpt::applyJacobian_1 ( Vector< Real > & jv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the partial constraint Jacobian at \((u,z)\), \(c_u(u,z) \in L(\mathcal{U}, \mathcal{C})\), to the vector \(v\).

Parameters
[out]jvis the result of applying the constraint Jacobian to v at \((u,z)\); a constraint-space vector
[in]vis a simulation-space vector
[in]uis the constraint argument; an simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{jv} = c_u(u,z)v\), where \(v \in \mathcal{U}\), \(\mathsf{jv} \in \mathcal{C}\).


Definition at line 365 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::update(), and value.

Referenced by Constraint_SimOpt::applyJacobian(), Constraint_SimOpt::checkAdjointConsistencyJacobian_1(), Constraint_SimOpt::checkApplyJacobian_1(), and Constraint_SimOpt::checkInverseJacobian_1().

◆ applyJacobian_2()

virtual void Constraint_SimOpt::applyJacobian_2 ( Vector< Real > & jv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the partial constraint Jacobian at \((u,z)\), \(c_z(u,z) \in L(\mathcal{Z}, \mathcal{C})\), to the vector \(v\).

Parameters
[out]jvis the result of applying the constraint Jacobian to v at \((u,z)\); a constraint-space vector
[in]vis an optimization-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{jv} = c_z(u,z)v\), where \(v \in \mathcal{Z}\), \(\mathsf{jv} \in \mathcal{C}\).


Definition at line 408 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::update(), and value.

Referenced by Constraint_SimOpt::applyJacobian(), Constraint_SimOpt::checkAdjointConsistencyJacobian_2(), and Constraint_SimOpt::checkApplyJacobian_2().

◆ applyInverseJacobian_1()

virtual void Constraint_SimOpt::applyInverseJacobian_1 ( Vector< Real > & ijv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the inverse partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^{-1} \in L(\mathcal{C}, \mathcal{U})\), to the vector \(v\).

Parameters
[out]ijvis the result of applying the inverse constraint Jacobian to v at \((u,z)\); a simulation-space vector
[in]vis a constraint-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ijv} = c_u(u,z)^{-1}v\), where \(v \in \mathcal{C}\), \(\mathsf{ijv} \in \mathcal{U}\).


Definition at line 450 of file ROL_Constraint_SimOpt.hpp.

Referenced by Constraint_SimOpt::applyPreconditioner(), Constraint_SimOpt::checkInverseJacobian_1(), and Constraint_SimOpt::solve().

◆ applyAdjointJacobian_1() [1/2]

virtual void Constraint_SimOpt::applyAdjointJacobian_1 ( Vector< Real > & ajv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^* \in L(\mathcal{C}^*, \mathcal{U}^*)\), to the vector \(v\). This is the primary interface.

Parameters
[out]ajvis the result of applying the adjoint of the constraint Jacobian to v at (u,z); a dual simulation-space vector
[in]vis a dual constraint-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ajv} = c_u(u,z)^*v\), where \(v \in \mathcal{C}^*\), \(\mathsf{ajv} \in \mathcal{U}^*\).


Definition at line 474 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_1().

Referenced by Constraint_SimOpt::applyAdjointHessian_11(), Constraint_SimOpt::applyAdjointHessian_21(), Constraint_SimOpt::applyAdjointJacobian(), Constraint_SimOpt::applyAdjointJacobian_1(), Constraint_SimOpt::checkAdjointConsistencyJacobian_1(), Constraint_SimOpt::checkApplyAdjointHessian_11(), Constraint_SimOpt::checkApplyAdjointHessian_21(), and Constraint_SimOpt::checkInverseAdjointJacobian_1().

◆ applyAdjointJacobian_1() [2/2]

virtual void Constraint_SimOpt::applyAdjointJacobian_1 ( Vector< Real > & ajv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & dualv,
Real & tol )
inlinevirtual

Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^* \in L(\mathcal{C}^*, \mathcal{U}^*)\), to the vector \(v\). This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.

Parameters
[out]ajvis the result of applying the adjoint of the constraint Jacobian to v at (u,z); a dual simulation-space vector
[in]vis a dual constraint-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in]dualvis a vector used for temporary variables; a constraint-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ajv} = c_u(u,z)^*v\), where \(v \in \mathcal{C}^*\), \(\mathsf{ajv} \in \mathcal{U}^*\).


Definition at line 500 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::update(), and value.

◆ applyAdjointJacobian_2() [1/2]

virtual void Constraint_SimOpt::applyAdjointJacobian_2 ( Vector< Real > & ajv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_z(u,z)^* \in L(\mathcal{C}^*, \mathcal{Z}^*)\), to vector \(v\). This is the primary interface.

Parameters
[out]ajvis the result of applying the adjoint of the constraint Jacobian to v at \((u,z)\); a dual optimization-space vector
[in]vis a dual constraint-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ajv} = c_z(u,z)^*v\), where \(v \in \mathcal{C}^*\), \(\mathsf{ajv} \in \mathcal{Z}^*\).


Definition at line 545 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_2().

Referenced by Constraint_SimOpt::applyAdjointHessian_12(), Constraint_SimOpt::applyAdjointHessian_22(), Constraint_SimOpt::applyAdjointJacobian(), Constraint_SimOpt::applyAdjointJacobian_2(), Constraint_SimOpt::checkAdjointConsistencyJacobian_2(), Constraint_SimOpt::checkApplyAdjointHessian_12(), and Constraint_SimOpt::checkApplyAdjointHessian_22().

◆ applyAdjointJacobian_2() [2/2]

virtual void Constraint_SimOpt::applyAdjointJacobian_2 ( Vector< Real > & ajv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & dualv,
Real & tol )
inlinevirtual

Apply the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_z(u,z)^* \in L(\mathcal{C}^*, \mathcal{Z}^*)\), to vector \(v\). This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.

Parameters
[out]ajvis the result of applying the adjoint of the constraint Jacobian to v at \((u,z)\); a dual optimization-space vector
[in]vis a dual constraint-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in]dualvis a vector used for temporary variables; a constraint-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ajv} = c_z(u,z)^*v\), where \(v \in \mathcal{C}^*\), \(\mathsf{ajv} \in \mathcal{Z}^*\).


Definition at line 571 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::update(), and value.

◆ applyInverseAdjointJacobian_1()

virtual void Constraint_SimOpt::applyInverseAdjointJacobian_1 ( Vector< Real > & iajv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the inverse of the adjoint of the partial constraint Jacobian at \((u,z)\), \(c_u(u,z)^{-*} \in L(\mathcal{U}^*, \mathcal{C}^*)\), to the vector \(v\).

Parameters
[out]iajvis the result of applying the inverse adjoint of the constraint Jacobian to v at (u,z); a dual constraint-space vector
[in]vis a dual simulation-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{iajv} = c_u(u,z)^{-*}v\), where \(v \in \mathcal{U}^*\), \(\mathsf{iajv} \in \mathcal{C}^*\).


Definition at line 615 of file ROL_Constraint_SimOpt.hpp.

Referenced by Constraint_SimOpt::applyPreconditioner(), and Constraint_SimOpt::checkInverseAdjointJacobian_1().

◆ applyAdjointHessian_11()

virtual void Constraint_SimOpt::applyAdjointHessian_11 ( Vector< Real > & ahwv,
const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the simulation-space derivative of the adjoint of the constraint simulation-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{uu}(u,z)(v,\cdot)^*w\).

Parameters
[out]ahwvis the result of applying the simulation-space derivative of the adjoint of the constraint simulation-space Jacobian at \((u,z)\) to the vector \(w\) in direction \(w\); a dual simulation-space vector
[in]wis the direction vector; a dual constraint-space vector
[in]vis a simulation-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ahwv} = c_{uu}(u,z)(v,\cdot)^*w\), where \(w \in \mathcal{C}^*\), \(v \in \mathcal{U}\), and \(\mathsf{ahwv} \in \mathcal{U}^*\).


Definition at line 641 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_1(), and Constraint_SimOpt::update().

Referenced by Constraint_SimOpt::applyAdjointHessian(), and Constraint_SimOpt::checkApplyAdjointHessian_11().

◆ applyAdjointHessian_12()

virtual void Constraint_SimOpt::applyAdjointHessian_12 ( Vector< Real > & ahwv,
const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the optimization-space derivative of the adjoint of the constraint simulation-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{uz}(u,z)(v,\cdot)^*w\).

Parameters
[out]ahwvis the result of applying the optimization-space derivative of the adjoint of the constraint simulation-space Jacobian at \((u,z)\) to the vector \(w\) in direction \(w\); a dual optimization-space vector
[in]wis the direction vector; a dual constraint-space vector
[in]vis a simulation-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ahwv} = c_{uz}(u,z)(v,\cdot)^*w\), where \(w \in \mathcal{C}^*\), \(v \in \mathcal{U}\), and \(\mathsf{ahwv} \in \mathcal{Z}^*\).


Definition at line 686 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_2(), and Constraint_SimOpt::update().

Referenced by Constraint_SimOpt::applyAdjointHessian(), and Constraint_SimOpt::checkApplyAdjointHessian_12().

◆ applyAdjointHessian_21()

virtual void Constraint_SimOpt::applyAdjointHessian_21 ( Vector< Real > & ahwv,
const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the simulation-space derivative of the adjoint of the constraint optimization-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{zu}(u,z)(v,\cdot)^*w\).

Parameters
[out]ahwvis the result of applying the simulation-space derivative of the adjoint of the constraint optimization-space Jacobian at \((u,z)\) to the vector \(w\) in direction \(w\); a dual simulation-space vector
[in]wis the direction vector; a dual constraint-space vector
[in]vis a optimization-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ahwv} = c_{zu}(u,z)(v,\cdot)^*w\), where \(w \in \mathcal{C}^*\), \(v \in \mathcal{Z}\), and \(\mathsf{ahwv} \in \mathcal{U}^*\).


Definition at line 731 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_1(), and Constraint_SimOpt::update().

Referenced by Constraint_SimOpt::applyAdjointHessian(), and Constraint_SimOpt::checkApplyAdjointHessian_21().

◆ applyAdjointHessian_22()

virtual void Constraint_SimOpt::applyAdjointHessian_22 ( Vector< Real > & ahwv,
const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
Real & tol )
inlinevirtual

Apply the optimization-space derivative of the adjoint of the constraint optimization-space Jacobian at \((u,z)\) to the vector \(w\) in the direction \(v\), according to \(v\mapsto c_{zz}(u,z)(v,\cdot)^*w\).

Parameters
[out]ahwvis the result of applying the optimization-space derivative of the adjoint of the constraint optimization-space Jacobian at \((u,z)\) to the vector \(w\) in direction \(w\); a dual optimization-space vector
[in]wis the direction vector; a dual constraint-space vector
[in]vis a optimization-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations; currently unused

On return, \(\mathsf{ahwv} = c_{zz}(u,z)(v,\cdot)^*w\), where \(w \in \mathcal{C}^*\), \(v \in \mathcal{Z}\), and \(\mathsf{ahwv} \in \mathcal{Z}^*\).


Definition at line 775 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_2(), and Constraint_SimOpt::update().

Referenced by Constraint_SimOpt::applyAdjointHessian(), and Constraint_SimOpt::checkApplyAdjointHessian_22().

◆ solveAugmentedSystem()

virtual std::vector< Real > Constraint_SimOpt::solveAugmentedSystem ( Vector< Real > & v1,
Vector< Real > & v2,
const Vector< Real > & b1,
const Vector< Real > & b2,
const Vector< Real > & x,
Real & tol )
inlinevirtual

Approximately solves the augmented system

\[ \begin{pmatrix} I & c'(x)^* \\ c'(x) & 0 \end{pmatrix} \begin{pmatrix} v_{1} \\ v_{2} \end{pmatrix} = \begin{pmatrix} b_{1} \\ b_{2} \end{pmatrix} \]

where \(v_{1} \in \mathcal{X}\), \(v_{2} \in \mathcal{C}^*\), \(b_{1} \in \mathcal{X}^*\), \(b_{2} \in \mathcal{C}\), \(I : \mathcal{X} \rightarrow \mathcal{X}^*\) is an identity operator, and \(0 : \mathcal{C}^* \rightarrow \mathcal{C}\) is a zero operator.

Parameters
[out]v1is the optimization-space component of the result
[out]v2is the dual constraint-space component of the result
[in]b1is the dual optimization-space component of the right-hand side
[in]b2is the constraint-space component of the right-hand side
[in]xis the constraint argument; an optimization-space vector
[in,out]tolis the nominal relative residual tolerance

On return, \( [\mathsf{v1} \,\, \mathsf{v2}] \) approximately solves the augmented system, where the size of the residual is governed by special stopping conditions.

The default implementation is the preconditioned generalized minimal residual (GMRES) method, which enables the use of nonsymmetric preconditioners.


Definition at line 840 of file ROL_Constraint_SimOpt.hpp.

◆ applyPreconditioner()

virtual void Constraint_SimOpt::applyPreconditioner ( Vector< Real > & pv,
const Vector< Real > & v,
const Vector< Real > & x,
const Vector< Real > & g,
Real & tol )
inlinevirtual

Apply a constraint preconditioner at \(x\), \(P(x) \in L(\mathcal{C}, \mathcal{C})\), to vector \(v\). In general, this preconditioner satisfies the following relationship:

\[ c'(x) c'(x)^* P(x) v \approx v \,. \]

It is used by the solveAugmentedSystem method.

Parameters
[out]pvis the result of applying the constraint preconditioner to v at x; a constraint-space vector
[in]vis a constraint-space vector
[in]xis the preconditioner argument; an optimization-space vector
[in,out]tolis a tolerance for inexact evaluations

On return, \(\mathsf{pv} = P(x)v\), where \(v \in \mathcal{C}\), \(\mathsf{pv} \in \mathcal{C}\).

The default implementation is a null-op.


Definition at line 868 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyInverseAdjointJacobian_1(), and Constraint_SimOpt::applyInverseJacobian_1().

◆ update() [3/4]

virtual void Constraint_SimOpt::update ( const Vector< Real > & x,
bool flag = true,
int iter = -1 )
inlinevirtual

Update constraint functions.
x is the optimization variable, flag = true if optimization variable is changed, iter is the outer algorithm iterations count.

Definition at line 903 of file ROL_Constraint_SimOpt.hpp.

References flag, iter, and Constraint_SimOpt::update().

◆ update() [4/4]

virtual void Constraint_SimOpt::update ( const Vector< Real > & x,
UpdateType type,
int iter = -1 )
inlinevirtual

Definition at line 908 of file ROL_Constraint_SimOpt.hpp.

References iter, and Constraint_SimOpt::update().

◆ value() [2/2]

virtual void Constraint_SimOpt::value ( Vector< Real > & c,
const Vector< Real > & x,
Real & tol )
inlinevirtual

Definition at line 914 of file ROL_Constraint_SimOpt.hpp.

References value.

◆ applyJacobian()

virtual void Constraint_SimOpt::applyJacobian ( Vector< Real > & jv,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
inlinevirtual

◆ applyAdjointJacobian()

virtual void Constraint_SimOpt::applyAdjointJacobian ( Vector< Real > & ajv,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
inlinevirtual

◆ applyAdjointHessian()

virtual void Constraint_SimOpt::applyAdjointHessian ( Vector< Real > & ahwv,
const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & x,
Real & tol )
inlinevirtual

◆ checkSolve()

virtual Real Constraint_SimOpt::checkSolve ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & c,
const bool printToStream = true,
std::ostream & outStream = std::cout )
inlinevirtual

Definition at line 985 of file ROL_Constraint_SimOpt.hpp.

References cnorm, Constraint_SimOpt::solve(), Constraint_SimOpt::update(), and value.

Referenced by main().

◆ checkAdjointConsistencyJacobian_1() [1/2]

virtual Real Constraint_SimOpt::checkAdjointConsistencyJacobian_1 ( const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const bool printToStream = true,
std::ostream & outStream = std::cout )
inlinevirtual

Check the consistency of the Jacobian and its adjoint. This is the primary interface.

Parameters
[out]wis a dual constraint-space vector
[in]vis a simulation-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in]printToStreamis is a flag that turns on/off output
[in]outStreamis the output stream

Definition at line 1026 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::checkAdjointConsistencyJacobian_1().

Referenced by Constraint_SimOpt::checkAdjointConsistencyJacobian_1(), and main().

◆ checkAdjointConsistencyJacobian_1() [2/2]

virtual Real Constraint_SimOpt::checkAdjointConsistencyJacobian_1 ( const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & dualw,
const Vector< Real > & dualv,
const bool printToStream = true,
std::ostream & outStream = std::cout )
inlinevirtual

Check the consistency of the Jacobian and its adjoint. This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.

Parameters
[out]wis a dual constraint-space vector
[in]vis a simulation-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in]dualwis a constraint-space vector
[in]dualvis a dual simulation-space vector
[in]printToStreamis is a flag that turns on/off output
[in]outStreamis the output stream

Definition at line 1051 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_1(), Constraint_SimOpt::applyJacobian_1(), and Constraint_SimOpt::update().

◆ checkAdjointConsistencyJacobian_2() [1/2]

virtual Real Constraint_SimOpt::checkAdjointConsistencyJacobian_2 ( const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const bool printToStream = true,
std::ostream & outStream = std::cout )
inlinevirtual

Check the consistency of the Jacobian and its adjoint. This is the primary interface.

Parameters
[out]wis a dual constraint-space vector
[in]vis an optimization-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in]printToStreamis is a flag that turns on/off output
[in]outStreamis the output stream

Definition at line 1096 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::checkAdjointConsistencyJacobian_2().

Referenced by Constraint_SimOpt::checkAdjointConsistencyJacobian_2(), and main().

◆ checkAdjointConsistencyJacobian_2() [2/2]

virtual Real Constraint_SimOpt::checkAdjointConsistencyJacobian_2 ( const Vector< Real > & w,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & dualw,
const Vector< Real > & dualv,
const bool printToStream = true,
std::ostream & outStream = std::cout )
inlinevirtual

Check the consistency of the Jacobian and its adjoint. This is the secondary interface, for use with dual spaces where the user does not define the dual() operation.

Parameters
[out]wis a dual constraint-space vector
[in]vis an optimization-space vector
[in]uis the constraint argument; a simulation-space vector
[in]zis the constraint argument; an optimization-space vector
[in]dualwis a constraint-space vector
[in]dualvis a dual optimization-space vector
[in]printToStreamis is a flag that turns on/off output
[in]outStreamis the output stream

Definition at line 1120 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointJacobian_2(), Constraint_SimOpt::applyJacobian_2(), and Constraint_SimOpt::update().

◆ checkInverseJacobian_1()

virtual Real Constraint_SimOpt::checkInverseJacobian_1 ( const Vector< Real > & jv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const bool printToStream = true,
std::ostream & outStream = std::cout )
inlinevirtual

◆ checkInverseAdjointJacobian_1()

virtual Real Constraint_SimOpt::checkInverseAdjointJacobian_1 ( const Vector< Real > & jv,
const Vector< Real > & v,
const Vector< Real > & u,
const Vector< Real > & z,
const bool printToStream = true,
std::ostream & outStream = std::cout )
inlinevirtual

◆ checkApplyJacobian_1() [1/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyJacobian_1 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & v,
const Vector< Real > & jv,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
const int order = 1 )
inline

◆ checkApplyJacobian_1() [2/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyJacobian_1 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & v,
const Vector< Real > & jv,
const std::vector< Real > & steps,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int order = 1 )
inline

◆ checkApplyJacobian_2() [1/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyJacobian_2 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & v,
const Vector< Real > & jv,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
const int order = 1 )
inline

◆ checkApplyJacobian_2() [2/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyJacobian_2 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & v,
const Vector< Real > & jv,
const std::vector< Real > & steps,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int order = 1 )
inline

◆ checkApplyAdjointHessian_11() [1/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_11 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
const int order = 1 )
inline

◆ checkApplyAdjointHessian_11() [2/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_11 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const std::vector< Real > & steps,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int order = 1 )
inline

◆ checkApplyAdjointHessian_21() [1/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_21 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
const int order = 1 )
inline

\( u\in U \), \( z\in Z \), \( p\in C^\ast \), \( v \in U \), \( hv \in U^\ast \)

Definition at line 1588 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::checkApplyAdjointHessian_21().

Referenced by Constraint_SimOpt::checkApplyAdjointHessian_21(), and main().

◆ checkApplyAdjointHessian_21() [2/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_21 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const std::vector< Real > & steps,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int order = 1 )
inline

\( u\in U \), \( z\in Z \), \( p\in C^\ast \), \( v \in U \), \( hv \in U^\ast \)

Definition at line 1609 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::applyAdjointHessian_21(), Constraint_SimOpt::applyAdjointJacobian_1(), and Constraint_SimOpt::update().

◆ checkApplyAdjointHessian_12() [1/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_12 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
const int order = 1 )
inline

\( u\in U \), \( z\in Z \), \( p\in C^\ast \), \( v \in U \), \( hv \in U^\ast \)

Definition at line 1714 of file ROL_Constraint_SimOpt.hpp.

References Constraint_SimOpt::checkApplyAdjointHessian_12().

Referenced by Constraint_SimOpt::checkApplyAdjointHessian_12(), and main().

◆ checkApplyAdjointHessian_12() [2/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_12 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const std::vector< Real > & steps,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int order = 1 )
inline

◆ checkApplyAdjointHessian_22() [1/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_22 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int numSteps = ROL_NUM_CHECKDERIV_STEPS,
const int order = 1 )
inline

◆ checkApplyAdjointHessian_22() [2/2]

std::vector< std::vector< Real > > Constraint_SimOpt::checkApplyAdjointHessian_22 ( const Vector< Real > & u,
const Vector< Real > & z,
const Vector< Real > & p,
const Vector< Real > & v,
const Vector< Real > & hv,
const std::vector< Real > & steps,
const bool printToStream = true,
std::ostream & outStream = std::cout,
const int order = 1 )
inline

Member Data Documentation

◆ unew_

Ptr<Vector<Real> > Constraint_SimOpt::unew_
private

Definition at line 111 of file ROL_Constraint_SimOpt.hpp.

◆ jv_

Ptr<Vector<Real> > Constraint_SimOpt::jv_
private

Definition at line 112 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_atol_

const Real Constraint_SimOpt::DEFAULT_atol_
private

Definition at line 115 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_rtol_

const Real Constraint_SimOpt::DEFAULT_rtol_
private

Definition at line 116 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_stol_

const Real Constraint_SimOpt::DEFAULT_stol_
private

Definition at line 117 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_factor_

const Real Constraint_SimOpt::DEFAULT_factor_
private

Definition at line 118 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_decr_

const Real Constraint_SimOpt::DEFAULT_decr_
private

Definition at line 119 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_maxit_

const int Constraint_SimOpt::DEFAULT_maxit_
private

Definition at line 120 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_print_

const bool Constraint_SimOpt::DEFAULT_print_
private

Definition at line 121 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_zero_

const bool Constraint_SimOpt::DEFAULT_zero_
private

Definition at line 122 of file ROL_Constraint_SimOpt.hpp.

◆ DEFAULT_solverType_

const int Constraint_SimOpt::DEFAULT_solverType_
private

Definition at line 123 of file ROL_Constraint_SimOpt.hpp.

◆ atol_

Real Constraint_SimOpt::atol_
protected

Definition at line 128 of file ROL_Constraint_SimOpt.hpp.

◆ rtol_

Real Constraint_SimOpt::rtol_
protected

Definition at line 129 of file ROL_Constraint_SimOpt.hpp.

◆ stol_

Real Constraint_SimOpt::stol_
protected

Definition at line 130 of file ROL_Constraint_SimOpt.hpp.

◆ factor_

Real Constraint_SimOpt::factor_
protected

Definition at line 131 of file ROL_Constraint_SimOpt.hpp.

◆ decr_

Real Constraint_SimOpt::decr_
protected

Definition at line 132 of file ROL_Constraint_SimOpt.hpp.

◆ maxit_

int Constraint_SimOpt::maxit_
protected

Definition at line 133 of file ROL_Constraint_SimOpt.hpp.

◆ print_

bool Constraint_SimOpt::print_
protected

Definition at line 134 of file ROL_Constraint_SimOpt.hpp.

◆ zero_

bool Constraint_SimOpt::zero_
protected

Definition at line 135 of file ROL_Constraint_SimOpt.hpp.

◆ solverType_

int Constraint_SimOpt::solverType_
protected

Definition at line 136 of file ROL_Constraint_SimOpt.hpp.

◆ firstSolve_

bool Constraint_SimOpt::firstSolve_
protected

Definition at line 139 of file ROL_Constraint_SimOpt.hpp.


The documentation for this class was generated from the following file: