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

#include <ROL_Reduced_ParametrizedObjective_SimOpt.hpp>

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

Public Member Functions

 Reduced_ParametrizedObjective_SimOpt (Teuchos::RCP< ParametrizedObjective_SimOpt< Real > > &obj, Teuchos::RCP< ParametrizedEqualityConstraint_SimOpt< Real > > &con, Teuchos::RCP< Vector< Real > > &state, Teuchos::RCP< Vector< Real > > &adjoint, bool storage=true, bool useFDhessVec=false)
 Constructor. More...
 
 Reduced_ParametrizedObjective_SimOpt (Teuchos::RCP< ParametrizedObjective_SimOpt< Real > > &obj, Teuchos::RCP< ParametrizedEqualityConstraint_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 setParameter (const std::vector< Real > &param)
 
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::ParametrizedObjective< Real >
virtual ~ParametrizedObjective (void)
 
- 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...
 
- Public Member Functions inherited from ROL::Parametrize< Real >
virtual ~Parametrize (void)
 

Private Member Functions

void solve_state_equation (const Vector< Real > &x, Real &tol, bool flag=true, int iter=-1)
 
void solve_adjoint_equation (const 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 Vector< Real > &v, const 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 Vector< Real > &v, const 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
< ParametrizedObjective_SimOpt
< Real > > 
obj_
 
Teuchos::RCP
< ParametrizedEqualityConstraint_SimOpt
< Real > > 
con_
 
Teuchos::RCP< Vector< Real > > state_
 
Teuchos::RCP< Vector< Real > > state_sens_
 
Teuchos::RCP< Vector< Real > > adjoint_
 
Teuchos::RCP< Vector< Real > > adjoint_sens_
 
Teuchos::RCP< Vector< Real > > dualstate_
 
Teuchos::RCP< Vector< Real > > dualstate1_
 
Teuchos::RCP< Vector< Real > > dualadjoint_
 
Teuchos::RCP< Vector< Real > > dualcontrol_
 
std::map< std::vector< Real >
, Teuchos::RCP< Vector< Real > > > 
state_storage_
 
std::map< std::vector< Real >
, Teuchos::RCP< Vector< Real > > > 
adjoint_storage_
 
bool storage_
 
bool useFDhessVec_
 
bool is_initialized_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::Objective< Real >
const std::vector< Real > getParameter (void) const
 
- Protected Member Functions inherited from ROL::Parametrize< Real >
const std::vector< Real > getParameter (void) const
 Return the parameter. More...
 

Detailed Description

template<class Real>
class ROL::Reduced_ParametrizedObjective_SimOpt< Real >

Definition at line 56 of file ROL_Reduced_ParametrizedObjective_SimOpt.hpp.

Constructor & Destructor Documentation

template<class Real >
ROL::Reduced_ParametrizedObjective_SimOpt< Real >::Reduced_ParametrizedObjective_SimOpt ( Teuchos::RCP< ParametrizedObjective_SimOpt< Real > > &  obj,
Teuchos::RCP< ParametrizedEqualityConstraint_SimOpt< Real > > &  con,
Teuchos::RCP< Vector< Real > > &  state,
Teuchos::RCP< Vector< Real > > &  adjoint,
bool  storage = true,
bool  useFDhessVec = false 
)
inline

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.

Definition at line 172 of file ROL_Reduced_ParametrizedObjective_SimOpt.hpp.

References ROL::Reduced_ParametrizedObjective_SimOpt< Real >::adjoint_storage_, and ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_storage_.

template<class Real >
ROL::Reduced_ParametrizedObjective_SimOpt< Real >::Reduced_ParametrizedObjective_SimOpt ( Teuchos::RCP< ParametrizedObjective_SimOpt< Real > > &  obj,
Teuchos::RCP< ParametrizedEqualityConstraint_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 199 of file ROL_Reduced_ParametrizedObjective_SimOpt.hpp.

References ROL::Reduced_ParametrizedObjective_SimOpt< Real >::adjoint_storage_, and ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_storage_.

Member Function Documentation

template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::solve_state_equation ( const Vector< Real > &  x,
Real &  tol,
bool  flag = true,
int  iter = -1 
)
inlineprivate
template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::solve_adjoint_equation ( const Vector< Real > &  x,
Real &  tol 
)
inlineprivate
template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::solve_state_sensitivity ( const Vector< Real > &  v,
const 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 134 of file ROL_Reduced_ParametrizedObjective_SimOpt.hpp.

References ROL::Reduced_ParametrizedObjective_SimOpt< Real >::con_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::dualadjoint_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_, and ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_sens_.

Referenced by ROL::Reduced_ParametrizedObjective_SimOpt< Real >::hessVec().

template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::solve_adjoint_sensitivity ( const Vector< Real > &  v,
const 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 148 of file ROL_Reduced_ParametrizedObjective_SimOpt.hpp.

References ROL::Reduced_ParametrizedObjective_SimOpt< Real >::adjoint_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::adjoint_sens_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::con_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::dualstate1_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::dualstate_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::obj_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_, and ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_sens_.

Referenced by ROL::Reduced_ParametrizedObjective_SimOpt< Real >::hessVec().

template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::setParameter ( const std::vector< Real > &  param)
inlinevirtual
template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::update ( const Vector< Real > &  x,
bool  flag = true,
int  iter = -1 
)
inlinevirtual
template<class Real >
Real ROL::Reduced_ParametrizedObjective_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 237 of file ROL_Reduced_ParametrizedObjective_SimOpt.hpp.

References ROL::Reduced_ParametrizedObjective_SimOpt< Real >::obj_, ROL::Reduced_ParametrizedObjective_SimOpt< Real >::solve_state_equation(), and ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_.

template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual
template<class Real >
void ROL::Reduced_ParametrizedObjective_SimOpt< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual
template<class Real >
virtual void ROL::Reduced_ParametrizedObjective_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 300 of file ROL_Reduced_ParametrizedObjective_SimOpt.hpp.

References ROL::Vector< Real >::dual(), and ROL::Vector< Real >::set().

Member Data Documentation

template<class Real >
Teuchos::RCP<ParametrizedObjective_SimOpt<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::obj_
private
template<class Real >
Teuchos::RCP<ParametrizedEqualityConstraint_SimOpt<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::con_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_sens_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::adjoint_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::adjoint_sens_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::dualstate_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::dualstate1_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::dualadjoint_
private
template<class Real >
Teuchos::RCP<Vector<Real> > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::dualcontrol_
private
template<class Real >
std::map<std::vector<Real>,Teuchos::RCP<Vector<Real> > > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::state_storage_
private
template<class Real >
std::map<std::vector<Real>,Teuchos::RCP<Vector<Real> > > ROL::Reduced_ParametrizedObjective_SimOpt< Real >::adjoint_storage_
private
template<class Real >
bool ROL::Reduced_ParametrizedObjective_SimOpt< Real >::storage_
private
template<class Real >
bool ROL::Reduced_ParametrizedObjective_SimOpt< Real >::useFDhessVec_
private
template<class Real >
bool ROL::Reduced_ParametrizedObjective_SimOpt< Real >::is_initialized_
private

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