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

Provides the interface to evaluate the Moreau-Yosida penalty function. More...

#include <ROL_MoreauYosidaPenalty.hpp>

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

Public Member Functions

 ~MoreauYosidaPenalty ()
 
 MoreauYosidaPenalty (const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< BoundConstraint< Real > > &con, const ROL::Vector< Real > &x, const Real mu=1e1)
 
 MoreauYosidaPenalty (const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< BoundConstraint< Real > > &con, const ROL::Vector< Real > &x, Teuchos::ParameterList &parlist)
 
 MoreauYosidaPenalty (const Teuchos::RCP< Objective< Real > > &obj, const Teuchos::RCP< BoundConstraint< Real > > &con, const ROL::Vector< Real > &x, const ROL::Vector< Real > &lam, Teuchos::ParameterList &parlist)
 
void updateMultipliers (Real mu, const ROL::Vector< Real > &x)
 
Real testComplementarity (const ROL::Vector< Real > &x)
 
Real getObjectiveValue (void) const
 
Teuchos::RCP< Vector< Real > > getGradient (void) const
 
int getNumberFunctionEvaluations (void)
 
int getNumberGradientEvaluations (void)
 
void update (const Vector< Real > &x, bool flag=true, int iter=-1)
 Update Moreau-Yosida penalty 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...
 
void setParameter (const std::vector< Real > &param)
 
- 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 void precond (Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol)
 Apply preconditioner 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 computePenalty (const Vector< Real > &x)
 
void initialize (const ROL::Vector< Real > &x, const Teuchos::RCP< ROL::BoundConstraint< Real > > &con)
 

Private Attributes

const Teuchos::RCP< Objective< Real > > obj_
 
const Teuchos::RCP< BoundConstraint< Real > > con_
 
Teuchos::RCP< Vector< Real > > g_
 
Teuchos::RCP< Vector< Real > > l_
 
Teuchos::RCP< Vector< Real > > u_
 
Teuchos::RCP< Vector< Real > > l1_
 
Teuchos::RCP< Vector< Real > > u1_
 
Teuchos::RCP< Vector< Real > > dl1_
 
Teuchos::RCP< Vector< Real > > du1_
 
Teuchos::RCP< Vector< Real > > xlam_
 
Teuchos::RCP< Vector< Real > > v_
 
Teuchos::RCP< Vector< Real > > dv_
 
Teuchos::RCP< Vector< Real > > dv2_
 
Teuchos::RCP< Vector< Real > > lam_
 
Teuchos::RCP< Vector< Real > > tmp_
 
Real mu_
 
Real fval_
 
bool isConEvaluated_
 
int nfval_
 
int ngval_
 
bool updateMultiplier_
 
bool updatePenalty_
 

Additional Inherited Members

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

Detailed Description

template<class Real>
class ROL::MoreauYosidaPenalty< Real >

Provides the interface to evaluate the Moreau-Yosida penalty function.


Definition at line 65 of file ROL_MoreauYosidaPenalty.hpp.

Constructor & Destructor Documentation

◆ ~MoreauYosidaPenalty()

template<class Real>
ROL::MoreauYosidaPenalty< Real >::~MoreauYosidaPenalty ( )
inline

Definition at line 158 of file ROL_MoreauYosidaPenalty.hpp.

◆ MoreauYosidaPenalty() [1/3]

template<class Real>
ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty ( const Teuchos::RCP< Objective< Real > > &  obj,
const Teuchos::RCP< BoundConstraint< Real > > &  con,
const ROL::Vector< Real > &  x,
const Real  mu = 1e1 
)
inline

◆ MoreauYosidaPenalty() [2/3]

template<class Real>
ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty ( const Teuchos::RCP< Objective< Real > > &  obj,
const Teuchos::RCP< BoundConstraint< Real > > &  con,
const ROL::Vector< Real > &  x,
Teuchos::ParameterList &  parlist 
)
inline

◆ MoreauYosidaPenalty() [3/3]

template<class Real>
ROL::MoreauYosidaPenalty< Real >::MoreauYosidaPenalty ( const Teuchos::RCP< Objective< Real > > &  obj,
const Teuchos::RCP< BoundConstraint< Real > > &  con,
const ROL::Vector< Real > &  x,
const ROL::Vector< Real > &  lam,
Teuchos::ParameterList &  parlist 
)
inline

Member Function Documentation

◆ computePenalty()

template<class Real>
void ROL::MoreauYosidaPenalty< Real >::computePenalty ( const Vector< Real > &  x)
inlineprivate

◆ initialize()

template<class Real>
void ROL::MoreauYosidaPenalty< Real >::initialize ( const ROL::Vector< Real > &  x,
const Teuchos::RCP< ROL::BoundConstraint< Real > > &  con 
)
inlineprivate

◆ updateMultipliers()

template<class Real>
void ROL::MoreauYosidaPenalty< Real >::updateMultipliers ( Real  mu,
const ROL::Vector< Real > &  x 
)
inline

◆ testComplementarity()

template<class Real>
Real ROL::MoreauYosidaPenalty< Real >::testComplementarity ( const ROL::Vector< Real > &  x)
inline

◆ getObjectiveValue()

template<class Real>
Real ROL::MoreauYosidaPenalty< Real >::getObjectiveValue ( void  ) const
inline

◆ getGradient()

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::getGradient ( void  ) const
inline

Definition at line 242 of file ROL_MoreauYosidaPenalty.hpp.

References ROL::MoreauYosidaPenalty< Real >::g_.

◆ getNumberFunctionEvaluations()

template<class Real>
int ROL::MoreauYosidaPenalty< Real >::getNumberFunctionEvaluations ( void  )
inline

◆ getNumberGradientEvaluations()

template<class Real>
int ROL::MoreauYosidaPenalty< Real >::getNumberGradientEvaluations ( void  )
inline

◆ update()

template<class Real>
void ROL::MoreauYosidaPenalty< Real >::update ( const Vector< Real > &  x,
bool  flag = true,
int  iter = -1 
)
inlinevirtual

Update Moreau-Yosida penalty function.

This function updates the Moreau-Yosida penalty function at new iterations.

Parameters
[in]xis the new iterate.
[in]flagis true if the iterate has changed.
[in]iteris the outer algorithm iterations count.

Reimplemented from ROL::Objective< Real >.

Definition at line 261 of file ROL_MoreauYosidaPenalty.hpp.

Referenced by ROL::MoreauYosidaPenaltyStep< Real >::update(), and ROL::MoreauYosidaPenaltyStep< Real >::updateState().

◆ value()

template<class Real>
Real ROL::MoreauYosidaPenalty< Real >::value ( const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Compute value.

This function returns the Moreau-Yosida penalty value.

Parameters
[in]xis the current iterate.
[in]tolis a tolerance for inexact Moreau-Yosida penalty computation.

Implements ROL::Objective< Real >.

Definition at line 273 of file ROL_MoreauYosidaPenalty.hpp.

References ROL::MoreauYosidaPenalty< Real >::computePenalty(), and ROL::MoreauYosidaPenalty< Real >::fval_.

Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().

◆ gradient()

template<class Real>
void ROL::MoreauYosidaPenalty< Real >::gradient ( Vector< Real > &  g,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Compute gradient.

This function returns the Moreau-Yosida penalty gradient.

Parameters
[out]gis the gradient.
[in]xis the current iterate.
[in]tolis a tolerance for inexact Moreau-Yosida penalty computation.

Reimplemented from ROL::Objective< Real >.

Definition at line 294 of file ROL_MoreauYosidaPenalty.hpp.

References ROL::Vector< Real >::axpy(), ROL::MoreauYosidaPenalty< Real >::computePenalty(), and ROL::Vector< Real >::set().

Referenced by ROL::MoreauYosidaPenaltyStep< Real >::updateState().

◆ hessVec()

template<class Real>
void ROL::MoreauYosidaPenalty< Real >::hessVec ( Vector< Real > &  hv,
const Vector< Real > &  v,
const Vector< Real > &  x,
Real &  tol 
)
inlinevirtual

Apply Hessian approximation to vector.

This function applies the Hessian of the Moreau-Yosida penalty to the vector \(v\).

Parameters
[out]hvis the the action of the Hessian on \(v\).
[in]vis the direction vector.
[in]xis the current iterate.
[in]tolis a tolerance for inexact Moreau-Yosida penalty computation.

Reimplemented from ROL::Objective< Real >.

Definition at line 315 of file ROL_MoreauYosidaPenalty.hpp.

References ROL::Vector< Real >::axpy(), and ROL::MoreauYosidaPenalty< Real >::computePenalty().

◆ setParameter()

template<class Real>
void ROL::MoreauYosidaPenalty< Real >::setParameter ( const std::vector< Real > &  param)
inlinevirtual

Reimplemented from ROL::Objective< Real >.

Definition at line 349 of file ROL_MoreauYosidaPenalty.hpp.

References ROL::Objective< Real >::setParameter().

Member Data Documentation

◆ obj_

template<class Real>
const Teuchos::RCP<Objective<Real> > ROL::MoreauYosidaPenalty< Real >::obj_
private

Definition at line 67 of file ROL_MoreauYosidaPenalty.hpp.

◆ con_

template<class Real>
const Teuchos::RCP<BoundConstraint<Real> > ROL::MoreauYosidaPenalty< Real >::con_
private

Definition at line 68 of file ROL_MoreauYosidaPenalty.hpp.

◆ g_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::g_
private

◆ l_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::l_
private

Definition at line 71 of file ROL_MoreauYosidaPenalty.hpp.

◆ u_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::u_
private

Definition at line 72 of file ROL_MoreauYosidaPenalty.hpp.

◆ l1_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::l1_
private

Definition at line 73 of file ROL_MoreauYosidaPenalty.hpp.

◆ u1_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::u1_
private

Definition at line 74 of file ROL_MoreauYosidaPenalty.hpp.

◆ dl1_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::dl1_
private

Definition at line 75 of file ROL_MoreauYosidaPenalty.hpp.

◆ du1_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::du1_
private

Definition at line 76 of file ROL_MoreauYosidaPenalty.hpp.

◆ xlam_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::xlam_
private

Definition at line 77 of file ROL_MoreauYosidaPenalty.hpp.

◆ v_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::v_
private

Definition at line 78 of file ROL_MoreauYosidaPenalty.hpp.

◆ dv_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::dv_
private

Definition at line 79 of file ROL_MoreauYosidaPenalty.hpp.

◆ dv2_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::dv2_
private

Definition at line 80 of file ROL_MoreauYosidaPenalty.hpp.

◆ lam_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::lam_
private

Definition at line 81 of file ROL_MoreauYosidaPenalty.hpp.

◆ tmp_

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::MoreauYosidaPenalty< Real >::tmp_
private

Definition at line 82 of file ROL_MoreauYosidaPenalty.hpp.

◆ mu_

template<class Real>
Real ROL::MoreauYosidaPenalty< Real >::mu_
private

Definition at line 84 of file ROL_MoreauYosidaPenalty.hpp.

◆ fval_

template<class Real>
Real ROL::MoreauYosidaPenalty< Real >::fval_
private

◆ isConEvaluated_

template<class Real>
bool ROL::MoreauYosidaPenalty< Real >::isConEvaluated_
private

Definition at line 86 of file ROL_MoreauYosidaPenalty.hpp.

◆ nfval_

template<class Real>
int ROL::MoreauYosidaPenalty< Real >::nfval_
private

◆ ngval_

template<class Real>
int ROL::MoreauYosidaPenalty< Real >::ngval_
private

◆ updateMultiplier_

template<class Real>
bool ROL::MoreauYosidaPenalty< Real >::updateMultiplier_
private

Definition at line 89 of file ROL_MoreauYosidaPenalty.hpp.

◆ updatePenalty_

template<class Real>
bool ROL::MoreauYosidaPenalty< Real >::updatePenalty_
private

Definition at line 90 of file ROL_MoreauYosidaPenalty.hpp.


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