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

Evaluates ROL::DynamicObjective over a sequential set of time intervals. More...

#include <ROL_SerialObjective.hpp>

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

Public Types

using size_type = typename std::vector< Real >::size_type
 
- Public Types inherited from ROL::SerialFunction< Real >
using size_type = typename std::vector< Real >::size_type
 

Public Member Functions

 SerialObjective (const Ptr< DynamicObjective< Real >> &obj, const Vector< Real > &u_initial, const TimeStampsPtr< Real > timeStampsPtr)
 
virtual Real value (const Vector< Real > &u, const Vector< Real > &z, Real &tol) override
 Compute value. More...
 
virtual void gradient_1 (Vector< Real > &g, const Vector< Real > &u, const Vector< Real > &z, Real &tol) override
 Compute gradient with respect to first component. More...
 
virtual void gradient_2 (Vector< Real > &g, const Vector< Real > &u, const Vector< Real > &z, Real &tol) override
 Compute gradient with respect to second component. More...
 
virtual void hessVec_11 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol) override
 Apply Hessian approximation to vector. More...
 
virtual void hessVec_12 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol) override
 
virtual void hessVec_21 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol) override
 
virtual void hessVec_22 (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &u, const Vector< Real > &z, Real &tol) override
 
- Public Member Functions inherited from ROL::Objective_SimOpt< Real >
virtual void update (const Vector< Real > &u, const Vector< Real > &z, bool flag=true, int iter=-1)
 Update objective function. u is an iterate, z is an iterate, flag = true if the iterate has changed, iter is the outer algorithm iterations count. More...
 
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update objective function. More...
 
virtual void update (const Vector< Real > &u, const Vector< Real > &z, UpdateType type, int iter=-1)
 
void update (const Vector< Real > &x, UpdateType type, int iter=-1)
 Update objective function. More...
 
Real value (const Vector< Real > &x, Real &tol)
 Compute value. More...
 
void gradient (Vector< Real > &g, const Vector< Real > &x, Real &tol)
 Compute gradient. More...
 
void hessVec (Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply Hessian approximation to vector. More...
 
std::vector< std::vector< Real > > checkGradient_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &d, 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 > > checkGradient_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkGradient_1 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkGradient_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &d, 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 > > checkGradient_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkGradient_2 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &g, const Vector< Real > &d, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, 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 > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_11 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, 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 > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_12 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, 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 > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_21 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
std::vector< std::vector< Real > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, 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 > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream=true, std::ostream &outStream=std::cout, const int order=1)
 
std::vector< std::vector< Real > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const bool printToStream, std::ostream &outStream, const int numSteps, const int order)
 
std::vector< std::vector< Real > > checkHessVec_22 (const Vector< Real > &u, const Vector< Real > &z, const Vector< Real > &hv, const Vector< Real > &v, const std::vector< Real > &steps, const bool printToStream, std::ostream &outStream, const int order)
 
- Public Member Functions inherited from ROL::Objective< Real >
virtual ~Objective ()
 
 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 void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner to vector. More...
 
virtual void prox (Vector< Real > &Pv, const Vector< Real > &v, Real t, Real &tol)
 Compute the proximity operator. More...
 
virtual void proxJacVec (Vector< Real > &Jv, const Vector< Real > &v, const Vector< Real > &x, Real t, Real &tol)
 Apply the Jacobian of the proximity operator. 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...
 
virtual std::vector
< std::vector< Real > > 
checkProxJacVec (const Vector< Real > &x, const Vector< Real > &v, Real t=Real(1), bool printToStream=true, std::ostream &outStream=std::cout, int numSteps=ROL_NUM_CHECKDERIV_STEPS)
 Finite-difference proximity operator Jacobian-applied-to-vector check. More...
 
virtual void setParameter (const std::vector< Real > &param)
 
- Public Member Functions inherited from ROL::SerialFunction< Real >
 SerialFunction (const Vector< Real > &u_initial, const TimeStampsPtr< Real > &timeStampsPtr)
 
size_type numTimeSteps () const
 
const Vector< Real > & getInitialCondition () const
 
void setInitialCondition (const Vector< Real > &u_initial)
 
const Vector< Real > & getZeroState () const
 
bool getSkipInitialCondition () const
 
void setSkipInitialCondition (bool skip)
 
TimeStampsPtr< Real > getTimeStampsPtr () const
 
void setTimeStampsPtr (const TimeStampsPtr< Real > &timeStampsPtr)
 
TimeStamp< Real > & getTimeStamp (size_type i)
 
const TimeStamp< Real > & getTimeStamp (size_type i) const
 
void setTimeStamp (size_type i, const TimeStamp< Real > &timeStamp)
 

Private Types

using PV = PartitionedVector< Real >
 

Private Attributes

Ptr< DynamicObjective< Real > > obj_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::Objective< Real >
const std::vector< Real > getParameter (void) const
 
- Protected Member Functions inherited from ROL::SerialFunction< Real >
const TimeStamp< Real > & ts (size_type i) const
 
Ptr< Vector< Real > > clone (const Vector< Real > &x)
 

Detailed Description

template<typename Real>
class ROL::SerialObjective< Real >

Evaluates ROL::DynamicObjective over a sequential set of time intervals.

\[ f(u,z) = \sum\limits_{k=1}^n f_k(u_{k-1},u_k,z_k) \]

\[ \frac{\partial f}{\partial u_j} = \frac{\partial f_j(u_{j-1},u_j,z_j}{\partial u_j} + \frac{\partial f_{j+1}(u_j,u_{j+1},z_{j+1}}{\partial u_j} \]


Definition at line 37 of file ROL_SerialObjective.hpp.

Member Typedef Documentation

template<typename Real >
using ROL::SerialObjective< Real >::PV = PartitionedVector<Real>
private

Definition at line 40 of file ROL_SerialObjective.hpp.

template<typename Real >
using ROL::SerialObjective< Real >::size_type = typename std::vector<Real>::size_type

Definition at line 48 of file ROL_SerialObjective.hpp.

Constructor & Destructor Documentation

template<typename Real >
ROL::SerialObjective< Real >::SerialObjective ( const Ptr< DynamicObjective< Real >> &  obj,
const Vector< Real > &  u_initial,
const TimeStampsPtr< Real >  timeStampsPtr 
)
inline

Definition at line 54 of file ROL_SerialObjective.hpp.

Member Function Documentation

template<typename Real >
virtual Real ROL::SerialObjective< Real >::value ( const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlineoverridevirtual
template<typename Real >
virtual void ROL::SerialObjective< Real >::gradient_1 ( Vector< Real > &  g,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlineoverridevirtual
template<typename Real >
virtual void ROL::SerialObjective< Real >::gradient_2 ( Vector< Real > &  g,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlineoverridevirtual
template<typename Real >
virtual void ROL::SerialObjective< Real >::hessVec_11 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlineoverridevirtual
template<typename Real >
virtual void ROL::SerialObjective< Real >::hessVec_12 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlineoverridevirtual
template<typename Real >
virtual void ROL::SerialObjective< Real >::hessVec_21 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlineoverridevirtual
template<typename Real >
virtual void ROL::SerialObjective< Real >::hessVec_22 ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  u,
const Vector< Real > &  z,
Real &  tol 
)
inlineoverridevirtual

Member Data Documentation

template<typename Real >
Ptr<DynamicObjective<Real> > ROL::SerialObjective< Real >::obj_
private

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