ROL
|
Provides the interface to evaluate simulation-based reduced objective functions. More...
#include <ROL_Reduced_Objective_SimOpt.hpp>
Public Member Functions | |
Reduced_Objective_SimOpt (const Teuchos::RCP< Objective_SimOpt< Real > > &obj, const Teuchos::RCP< EqualityConstraint_SimOpt< Real > > &con, const Teuchos::RCP< Vector< Real > > &state, const Teuchos::RCP< Vector< Real > > &adjoint, bool storage=true, bool useFDhessVec=false) | |
Primary constructor. More... | |
Reduced_Objective_SimOpt (Teuchos::RCP< Objective_SimOpt< Real > > &obj, Teuchos::RCP< EqualityConstraint_SimOpt< Real > > &con, Teuchos::RCP< Vector< Real > > &state, Teuchos::RCP< Vector< Real > > &adjoint, Teuchos::RCP< Vector< Real > > &dualstate, Teuchos::RCP< Vector< Real > > &dualadjoint, bool storage=true, bool useFDhessVec=false) | |
Secondary, general constructor for use with dual optimization vector spaces where the user does not define the dual() method. More... | |
void | update (const Vector< Real > &x, bool flag=true, int iter=-1) |
Update the SimOpt objective function and equality constraint. More... | |
Real | value (const Vector< Real > &x, Real &tol) |
Given \(z\in\mathcal{Z}\), evaluate the objective function \(\widehat{J}(z) = J(u(z),z)\) where \(u=u(z)\in\mathcal{U}\) solves \(e(u,z) = 0\). More... | |
void | gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol) |
Given \(z\in\mathcal{Z}\), evaluate the gradient of the objective function \(\nabla\widehat{J}(z) = J_z(z) + c_z(u,z)^*\lambda\) where \(\lambda=\lambda(u,z)\in\mathcal{C}^*\) solves \(e_u(u,z)^*\lambda+J_u(u,z) = 0\). More... | |
void | hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Given \(z\in\mathcal{Z}\), evaluate the Hessian of the objective function \(\nabla^2\widehat{J}(z)\) in the direction \(v\in\mathcal{Z}\). More... | |
virtual void | precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply a reduced Hessian preconditioner. More... | |
![]() | |
virtual | ~Objective () |
virtual Real | dirDeriv (const Vector< Real > &x, const Vector< Real > &d, Real &tol) |
Compute directional derivative. More... | |
virtual void | invHessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) |
Apply inverse Hessian approximation to vector. More... | |
virtual std::vector< std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference gradient check. More... | |
virtual std::vector< std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference gradient check. More... | |
virtual std::vector< std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference gradient check with specified step sizes. More... | |
virtual std::vector< std::vector< Real > > | checkGradient (const Vector< Real > &x, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference gradient check with specified step sizes. More... | |
virtual std::vector< std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference Hessian-applied-to-vector check. More... | |
virtual std::vector< std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream=true, std::ostream &outStream=std::cout, const int numSteps=ROL_NUM_CHECKDERIV_STEPS, const int order=1) |
Finite-difference Hessian-applied-to-vector check. More... | |
virtual std::vector< std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference Hessian-applied-to-vector check with specified step sizes. More... | |
virtual std::vector< std::vector< Real > > | checkHessVec (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1) |
Finite-difference Hessian-applied-to-vector check with specified step sizes. More... | |
virtual std::vector< Real > | checkHessSym (const Vector< Real > &x, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout) |
Hessian symmetry check. More... | |
virtual std::vector< Real > | checkHessSym (const Vector< Real > &x, const Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &w, const bool printToStream=true, std::ostream &outStream=std::cout) |
Hessian symmetry check. More... | |
Private Member Functions | |
void | solve_state_equation (const ROL::Vector< Real > &x, Real &tol, bool flag=true, int iter=-1) |
Given \(z\in\mathcal{Z}\), solve the state equation \(c(u,z) = 0\) for \(u=u(z)\in\mathcal{U}\). More... | |
void | solve_adjoint_equation (const ROL::Vector< Real > &x, Real &tol) |
Given \((u,z)\in\mathcal{U}\times\mathcal{Z}\) which solves the state equation, solve the adjoint equation \(c_u(u,z)^*\lambda + J_u(u,z) = 0\) for \(\lambda=\lambda(u,z)\in\mathcal{C}^*\). More... | |
void | solve_state_sensitivity (const ROL::Vector< Real > &v, const ROL::Vector< Real > &x, Real &tol) |
Given \((u,z)\in\mathcal{U}\times\mathcal{Z}\) which solves the state equation and a direction \(v\in\mathcal{Z}\), solve the state senstivity equation \(c_u(u,z)s + c_z(u,z)v = 0\) for \(s=u_z(z)v\in\mathcal{U}\). More... | |
void | solve_adjoint_sensitivity (const ROL::Vector< Real > &v, const ROL::Vector< Real > &x, Real &tol) |
Given \((u,z)\in\mathcal{U}\times\mathcal{Z}\), the adjoint variable \(\lambda\in\mathcal{C}^*\), and a direction \(v\in\mathcal{Z}\), solve the adjoint sensitvity equation \(c_u(u,z)^*p + J_{uu}(u,z)s + J_{uz}(u,z)v + c_{uu}(u,z)(\cdot,s)^*\lambda + c_{zu}(u,z)(\cdot,v)^*\lambda = 0\) for \(p = \lambda_z(u(z),z)v\in\mathcal{C}^*\). More... | |
Private Attributes | |
Teuchos::RCP< Objective_SimOpt< Real > > | obj_ |
SimOpt objective function. More... | |
Teuchos::RCP< EqualityConstraint_SimOpt< Real > > | con_ |
SimOpt equality constraint. More... | |
Teuchos::RCP< Vector< Real > > | state_ |
Storage for the state variable. More... | |
Teuchos::RCP< Vector< Real > > | state_sens_ |
Storage for the state sensitivity variable. More... | |
Teuchos::RCP< Vector< Real > > | dualstate_ |
Dual state vector. More... | |
Teuchos::RCP< Vector< Real > > | dualstate1_ |
Dual state vector. More... | |
Teuchos::RCP< Vector< Real > > | adjoint_ |
Storage for the adjoint variable. More... | |
Teuchos::RCP< Vector< Real > > | adjoint_sens_ |
Storage for the adjoint sensitivity variable. More... | |
Teuchos::RCP< Vector< Real > > | dualadjoint_ |
Dual adjoint vector. More... | |
Teuchos::RCP< Vector< Real > > | dualcontrol_ |
Dual control vector. More... | |
bool | storage_ |
Flag whether or not to store computed quantities. More... | |
bool | is_state_computed_ |
Flag whether or not to store the state variable. More... | |
bool | is_adjoint_computed_ |
Flag whether or not to store the adjoint variable. More... | |
bool | is_initialized_ |
Flag if dual control vector is initialized. More... | |
bool | useFDhessVec_ |
Flag whether or not to use finite difference hessVec. More... | |
Provides the interface to evaluate simulation-based reduced objective functions.
The reduced simulation-based objective function is \(\widehat{J}(z) = J(u(z),z)\) where \(u(z)=u\) solves \(c(u,z) = 0\).
Definition at line 62 of file ROL_Reduced_Objective_SimOpt.hpp.
|
inline |
Primary constructor.
[in] | obj | is a pointer to a SimOpt objective function. |
[in] | con | is a pointer to a SimOpt equality constraint. |
[in] | state | is a pointer to a state space vector, \(\mathcal{U}\). |
[in] | adjoint | is a pointer to a dual constraint space vector, \(\mathcal{C}^*\). |
[in] | storage | is a flag whether or not to store computed states and adjoints. |
[in] | useFDhessVec | is a flag whether or not to use a finite-difference Hessian approximation. |
Definition at line 161 of file ROL_Reduced_Objective_SimOpt.hpp.
|
inline |
Secondary, general constructor for use with dual optimization vector spaces where the user does not define the dual() method.
[in] | obj | is a pointer to a SimOpt objective function. |
[in] | con | is a pointer to a SimOpt equality constraint. |
[in] | state | is a pointer to a state space vector, \(\mathcal{U}\). |
[in] | adjoint | is a pointer to a dual constraint space vector, \(\mathcal{C}^*\). |
[in] | dualstate | is a pointer to a dual state space vector, \(\mathcal{U}^*\). |
[in] | dualadjoint | is a pointer to a constraint space vector, \(\mathcal{C}\). |
[in] | storage | is a flag whether or not to store computed states and adjoints. |
[in] | useFDhessVec | is a flag whether or not to use a finite-difference Hessian approximation. |
Definition at line 186 of file ROL_Reduced_Objective_SimOpt.hpp.
|
inlineprivate |
Given \(z\in\mathcal{Z}\), solve the state equation \(c(u,z) = 0\) for \(u=u(z)\in\mathcal{U}\).
Definition at line 87 of file ROL_Reduced_Objective_SimOpt.hpp.
Referenced by ROL::Reduced_Objective_SimOpt< Real >::gradient(), ROL::Reduced_Objective_SimOpt< Real >::hessVec(), ROL::Reduced_Objective_SimOpt< Real >::update(), and ROL::Reduced_Objective_SimOpt< Real >::value().
|
inlineprivate |
Given \((u,z)\in\mathcal{U}\times\mathcal{Z}\) which solves the state equation, solve the adjoint equation \(c_u(u,z)^*\lambda + J_u(u,z) = 0\) for \(\lambda=\lambda(u,z)\in\mathcal{C}^*\).
Definition at line 104 of file ROL_Reduced_Objective_SimOpt.hpp.
Referenced by ROL::Reduced_Objective_SimOpt< Real >::gradient(), and ROL::Reduced_Objective_SimOpt< Real >::hessVec().
|
inlineprivate |
Given \((u,z)\in\mathcal{U}\times\mathcal{Z}\) which solves the state equation and a direction \(v\in\mathcal{Z}\), solve the state senstivity equation \(c_u(u,z)s + c_z(u,z)v = 0\) for \(s=u_z(z)v\in\mathcal{U}\).
Definition at line 121 of file ROL_Reduced_Objective_SimOpt.hpp.
Referenced by ROL::Reduced_Objective_SimOpt< Real >::hessVec().
|
inlineprivate |
Given \((u,z)\in\mathcal{U}\times\mathcal{Z}\), the adjoint variable \(\lambda\in\mathcal{C}^*\), and a direction \(v\in\mathcal{Z}\), solve the adjoint sensitvity equation \(c_u(u,z)^*p + J_{uu}(u,z)s + J_{uz}(u,z)v + c_{uu}(u,z)(\cdot,s)^*\lambda + c_{zu}(u,z)(\cdot,v)^*\lambda = 0\) for \(p = \lambda_z(u(z),z)v\in\mathcal{C}^*\).
Definition at line 135 of file ROL_Reduced_Objective_SimOpt.hpp.
Referenced by ROL::Reduced_Objective_SimOpt< Real >::hessVec().
|
inlinevirtual |
Update the SimOpt objective function and equality constraint.
Reimplemented from ROL::Objective< Real >.
Definition at line 203 of file ROL_Reduced_Objective_SimOpt.hpp.
References ROL::ROL_EPSILON, and ROL::Reduced_Objective_SimOpt< Real >::solve_state_equation().
|
inlinevirtual |
Given \(z\in\mathcal{Z}\), evaluate the objective function \(\widehat{J}(z) = J(u(z),z)\) where \(u=u(z)\in\mathcal{U}\) solves \(e(u,z) = 0\).
Implements ROL::Objective< Real >.
Definition at line 218 of file ROL_Reduced_Objective_SimOpt.hpp.
References ROL::Reduced_Objective_SimOpt< Real >::solve_state_equation().
|
inlinevirtual |
Given \(z\in\mathcal{Z}\), evaluate the gradient of the objective function \(\nabla\widehat{J}(z) = J_z(z) + c_z(u,z)^*\lambda\) where \(\lambda=\lambda(u,z)\in\mathcal{C}^*\) solves \(e_u(u,z)^*\lambda+J_u(u,z) = 0\).
Reimplemented from ROL::Objective< Real >.
Definition at line 230 of file ROL_Reduced_Objective_SimOpt.hpp.
References ROL::Vector< Real >::clone(), ROL::Vector< Real >::plus(), ROL::Reduced_Objective_SimOpt< Real >::solve_adjoint_equation(), and ROL::Reduced_Objective_SimOpt< Real >::solve_state_equation().
|
inlinevirtual |
Given \(z\in\mathcal{Z}\), evaluate the Hessian of the objective function \(\nabla^2\widehat{J}(z)\) in the direction \(v\in\mathcal{Z}\).
Reimplemented from ROL::Objective< Real >.
Definition at line 249 of file ROL_Reduced_Objective_SimOpt.hpp.
References ROL::Vector< Real >::clone(), ROL::Objective< Real >::hessVec(), ROL::Vector< Real >::plus(), ROL::Reduced_Objective_SimOpt< Real >::solve_adjoint_equation(), ROL::Reduced_Objective_SimOpt< Real >::solve_adjoint_sensitivity(), ROL::Reduced_Objective_SimOpt< Real >::solve_state_equation(), and ROL::Reduced_Objective_SimOpt< Real >::solve_state_sensitivity().
|
inlinevirtual |
Apply a reduced Hessian preconditioner.
Reimplemented from ROL::Objective< Real >.
Definition at line 281 of file ROL_Reduced_Objective_SimOpt.hpp.
References ROL::Vector< Real >::dual(), and ROL::Vector< Real >::set().
|
private |
SimOpt objective function.
Definition at line 64 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
SimOpt equality constraint.
Definition at line 65 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Storage for the state variable.
Definition at line 67 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Storage for the state sensitivity variable.
Definition at line 68 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Dual state vector.
Definition at line 69 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Dual state vector.
Definition at line 70 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Storage for the adjoint variable.
Definition at line 71 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Storage for the adjoint sensitivity variable.
Definition at line 72 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Dual adjoint vector.
Definition at line 73 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Dual control vector.
Definition at line 74 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Flag whether or not to store computed quantities.
Definition at line 76 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Flag whether or not to store the state variable.
Definition at line 77 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Flag whether or not to store the adjoint variable.
Definition at line 78 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Flag if dual control vector is initialized.
Definition at line 80 of file ROL_Reduced_Objective_SimOpt.hpp.
|
private |
Flag whether or not to use finite difference hessVec.
Definition at line 82 of file ROL_Reduced_Objective_SimOpt.hpp.