ROL
|
#include <example_02.hpp>
Public Member Functions | |
DiffusionObjective (const ROL::Ptr< FEM< Real > > fem, const Real alpha=1.e-4) | |
Real | value (const ROL::Vector< Real > &u, const ROL::Vector< Real > &z, Real &tol) |
Compute value. More... | |
void | gradient_1 (ROL::Vector< Real > &g, const ROL::Vector< Real > &u, const ROL::Vector< Real > &z, Real &tol) |
Compute gradient with respect to first component. More... | |
void | gradient_2 (ROL::Vector< Real > &g, const ROL::Vector< Real > &u, const ROL::Vector< Real > &z, Real &tol) |
Compute gradient with respect to second component. More... | |
void | hessVec_11 (ROL::Vector< Real > &hv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &u, const ROL::Vector< Real > &z, Real &tol) |
Apply Hessian approximation to vector. More... | |
void | hessVec_12 (ROL::Vector< Real > &hv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &u, const ROL::Vector< Real > &z, Real &tol) |
void | hessVec_21 (ROL::Vector< Real > &hv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &u, const ROL::Vector< Real > &z, Real &tol) |
void | hessVec_22 (ROL::Vector< Real > &hv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &u, const ROL::Vector< Real > &z, Real &tol) |
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... | |
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 () |
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... | |
virtual void | setParameter (const std::vector< Real > ¶m) |
Private Member Functions | |
Real | dot (const std::vector< Real > &x, const std::vector< Real > &y) |
void | scale (std::vector< Real > &u, const Real alpha=0.0) |
Private Attributes | |
const ROL::Ptr< FEM< Real > > | FEM_ |
const Real | alpha_ |
Additional Inherited Members | |
Protected Member Functions inherited from ROL::Objective< Real > | |
const std::vector< Real > | getParameter (void) const |
Definition at line 547 of file poisson-control/example_02.hpp.
|
inline |
Definition at line 577 of file poisson-control/example_02.hpp.
|
inlineprivate |
Definition at line 556 of file poisson-control/example_02.hpp.
Referenced by DiffusionObjective< Real >::value().
|
inlineprivate |
Definition at line 566 of file poisson-control/example_02.hpp.
Referenced by DiffusionObjective< Real >::gradient_2(), and DiffusionObjective< Real >::hessVec_22().
|
inlinevirtual |
Compute value.
Implements ROL::Objective_SimOpt< Real >.
Definition at line 580 of file poisson-control/example_02.hpp.
References DiffusionObjective< Real >::alpha_, DiffusionObjective< Real >::dot(), DiffusionObjective< Real >::FEM_, and ROL::Objective< Real >::getParameter().
|
inlinevirtual |
Compute gradient with respect to first component.
Reimplemented from ROL::Objective_SimOpt< Real >.
Definition at line 599 of file poisson-control/example_02.hpp.
References DiffusionObjective< Real >::FEM_, and ROL::Objective< Real >::getParameter().
|
inlinevirtual |
Compute gradient with respect to second component.
Reimplemented from ROL::Objective_SimOpt< Real >.
Definition at line 611 of file poisson-control/example_02.hpp.
References DiffusionObjective< Real >::alpha_, DiffusionObjective< Real >::FEM_, and DiffusionObjective< Real >::scale().
|
inlinevirtual |
Apply Hessian approximation to vector.
Reimplemented from ROL::Objective_SimOpt< Real >.
Definition at line 619 of file poisson-control/example_02.hpp.
References DiffusionObjective< Real >::FEM_, and ROL::Objective< Real >::getParameter().
|
inlinevirtual |
Reimplemented from ROL::Objective_SimOpt< Real >.
Definition at line 627 of file poisson-control/example_02.hpp.
References ROL::Vector< Real >::zero().
|
inlinevirtual |
Reimplemented from ROL::Objective_SimOpt< Real >.
Definition at line 632 of file poisson-control/example_02.hpp.
References ROL::Vector< Real >::zero().
|
inlinevirtual |
Reimplemented from ROL::Objective_SimOpt< Real >.
Definition at line 637 of file poisson-control/example_02.hpp.
References DiffusionObjective< Real >::alpha_, DiffusionObjective< Real >::FEM_, and DiffusionObjective< Real >::scale().
|
private |
Definition at line 549 of file poisson-control/example_02.hpp.
Referenced by DiffusionObjective< Real >::gradient_1(), DiffusionObjective< Real >::gradient_2(), DiffusionObjective< Real >::hessVec_11(), DiffusionObjective< Real >::hessVec_22(), and DiffusionObjective< Real >::value().
|
private |
Definition at line 550 of file poisson-control/example_02.hpp.
Referenced by DiffusionObjective< Real >::gradient_2(), DiffusionObjective< Real >::hessVec_22(), and DiffusionObjective< Real >::value().