ROL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROL::Reduced_Objective_SimOpt< Real > Class Template Reference

Provides the interface to evaluate simulation-based reduced objective functions. More...

#include <ROL_Reduced_Objective_SimOpt.hpp>

+ Inheritance diagram for ROL::Reduced_Objective_SimOpt< Real >:

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...
 
- Public Member Functions inherited from ROL::Objective< Real >
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...
 

Detailed Description

template<class Real>
class ROL::Reduced_Objective_SimOpt< Real >

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.

Constructor & Destructor Documentation

template<class Real>
ROL::Reduced_Objective_SimOpt< Real >::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 
)
inline

Primary constructor.

Parameters
[in]objis a pointer to a SimOpt objective function.
[in]conis a pointer to a SimOpt equality constraint.
[in]stateis a pointer to a state space vector, \(\mathcal{U}\).
[in]adjointis a pointer to a dual constraint space vector, \(\mathcal{C}^*\).
[in]storageis a flag whether or not to store computed states and adjoints.
[in]useFDhessVecis a flag whether or not to use a finite-difference Hessian approximation.

Definition at line 161 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
ROL::Reduced_Objective_SimOpt< Real >::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 
)
inline

Secondary, general constructor for use with dual optimization vector spaces where the user does not define the dual() method.

Parameters
[in]objis a pointer to a SimOpt objective function.
[in]conis a pointer to a SimOpt equality constraint.
[in]stateis a pointer to a state space vector, \(\mathcal{U}\).
[in]adjointis a pointer to a dual constraint space vector, \(\mathcal{C}^*\).
[in]dualstateis a pointer to a dual state space vector, \(\mathcal{U}^*\).
[in]dualadjointis a pointer to a constraint space vector, \(\mathcal{C}\).
[in]storageis a flag whether or not to store computed states and adjoints.
[in]useFDhessVecis a flag whether or not to use a finite-difference Hessian approximation.

Definition at line 186 of file ROL_Reduced_Objective_SimOpt.hpp.

Member Function Documentation

template<class Real>
void ROL::Reduced_Objective_SimOpt< Real >::solve_state_equation ( const ROL::Vector< Real > &  x,
Real &  tol,
bool  flag = true,
int  iter = -1 
)
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().

template<class Real>
void ROL::Reduced_Objective_SimOpt< Real >::solve_adjoint_equation ( const ROL::Vector< Real > &  x,
Real &  tol 
)
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().

template<class Real>
void ROL::Reduced_Objective_SimOpt< Real >::solve_state_sensitivity ( const ROL::Vector< Real > &  v,
const ROL::Vector< Real > &  x,
Real &  tol 
)
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().

template<class Real>
void ROL::Reduced_Objective_SimOpt< Real >::solve_adjoint_sensitivity ( const ROL::Vector< Real > &  v,
const ROL::Vector< Real > &  x,
Real &  tol 
)
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().

template<class Real>
void ROL::Reduced_Objective_SimOpt< Real >::update ( const Vector< Real > &  x,
bool  flag = true,
int  iter = -1 
)
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().

template<class Real>
Real ROL::Reduced_Objective_SimOpt< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
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().

template<class Real>
void ROL::Reduced_Objective_SimOpt< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
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().

template<class Real>
void ROL::Reduced_Objective_SimOpt< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual
template<class Real>
virtual void ROL::Reduced_Objective_SimOpt< Real >::precond ( Vector< Real > &  Pv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
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().

Member Data Documentation

template<class Real>
Teuchos::RCP<Objective_SimOpt<Real> > ROL::Reduced_Objective_SimOpt< Real >::obj_
private

SimOpt objective function.

Definition at line 64 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<EqualityConstraint_SimOpt<Real> > ROL::Reduced_Objective_SimOpt< Real >::con_
private

SimOpt equality constraint.

Definition at line 65 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::state_
private

Storage for the state variable.

Definition at line 67 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::state_sens_
private

Storage for the state sensitivity variable.

Definition at line 68 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::dualstate_
private

Dual state vector.

Definition at line 69 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::dualstate1_
private

Dual state vector.

Definition at line 70 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::adjoint_
private

Storage for the adjoint variable.

Definition at line 71 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::adjoint_sens_
private

Storage for the adjoint sensitivity variable.

Definition at line 72 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::dualadjoint_
private

Dual adjoint vector.

Definition at line 73 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::Reduced_Objective_SimOpt< Real >::dualcontrol_
private

Dual control vector.

Definition at line 74 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
bool ROL::Reduced_Objective_SimOpt< Real >::storage_
private

Flag whether or not to store computed quantities.

Definition at line 76 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
bool ROL::Reduced_Objective_SimOpt< Real >::is_state_computed_
private

Flag whether or not to store the state variable.

Definition at line 77 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
bool ROL::Reduced_Objective_SimOpt< Real >::is_adjoint_computed_
private

Flag whether or not to store the adjoint variable.

Definition at line 78 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
bool ROL::Reduced_Objective_SimOpt< Real >::is_initialized_
private

Flag if dual control vector is initialized.

Definition at line 80 of file ROL_Reduced_Objective_SimOpt.hpp.

template<class Real>
bool ROL::Reduced_Objective_SimOpt< Real >::useFDhessVec_
private

Flag whether or not to use finite difference hessVec.

Definition at line 82 of file ROL_Reduced_Objective_SimOpt.hpp.


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