ROL
|
Public Member Functions | |
Objective_PoissonInversion (int nz=32, Real alpha=1.e-4) | |
void | apply_mass (std::vector< Real > &Mz, const std::vector< Real > &z) |
Real | evaluate_target (Real x) |
void | apply_linearized_control_operator (std::vector< Real > &Bd, const std::vector< Real > &z, const std::vector< Real > &d, const std::vector< Real > &u, bool addBC=true) |
void | apply_transposed_linearized_control_operator (std::vector< Real > &Bd, const std::vector< Real > &z, const std::vector< Real > &d, const std::vector< Real > &u, bool addBC=true) |
void | solve_state_equation (std::vector< Real > &u, const std::vector< Real > &z) |
void | solve_adjoint_equation (std::vector< Real > &p, const std::vector< Real > &u, const std::vector< Real > &z) |
void | solve_state_sensitivity_equation (std::vector< Real > &w, const std::vector< Real > &v, const std::vector< Real > &u, const std::vector< Real > &z) |
void | solve_adjoint_sensitivity_equation (std::vector< Real > &q, const std::vector< Real > &w, const std::vector< Real > &v, const std::vector< Real > &p, const std::vector< Real > &u, const std::vector< Real > &z) |
void | update (const ROL::Vector< Real > &z, bool flag, int iter) |
Update objective function. More... | |
Real | value (const ROL::Vector< Real > &z, Real &tol) |
Compute value. More... | |
void | gradient (ROL::Vector< Real > &g, const ROL::Vector< Real > &z, Real &tol) |
Compute gradient. More... | |
void | hessVec (ROL::Vector< Real > &hv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &z, Real &tol) |
Apply Hessian approximation to vector. More... | |
void | activateInertia (void) |
void | deactivateInertia (void) |
void | hessVec_true (ROL::Vector< Real > &hv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &z, Real &tol) |
void | hessVec_inertia (ROL::Vector< Real > &hv, const ROL::Vector< Real > &v, const ROL::Vector< Real > &z, Real &tol) |
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 Types | |
typedef std::vector< Real > | vector |
typedef ROL::Vector< Real > | V |
typedef ROL::StdVector< Real > | SV |
typedef vector::size_type | uint |
Private Member Functions | |
ROL::Ptr< const vector > | getVector (const V &x) |
ROL::Ptr< vector > | getVector (V &x) |
Private Attributes | |
uint | nu_ |
uint | nz_ |
Real | hu_ |
Real | hz_ |
Real | u0_ |
Real | u1_ |
Real | alpha_ |
bool | useCorrection_ |
Teuchos::SerialDenseMatrix < int, Real > | H_ |
Additional Inherited Members | |
Protected Member Functions inherited from ROL::Objective< Real > | |
const std::vector< Real > | getParameter (void) const |
Definition at line 68 of file poisson-inversion/example_02.cpp.
|
private |
Definition at line 70 of file poisson-inversion/example_02.cpp.
|
private |
Definition at line 71 of file poisson-inversion/example_02.cpp.
|
private |
Definition at line 72 of file poisson-inversion/example_02.cpp.
|
private |
Definition at line 74 of file poisson-inversion/example_02.cpp.
|
inline |
Definition at line 105 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::hu_, Objective_PoissonInversion< Real >::hz_, Objective_PoissonInversion< Real >::nu_, and Objective_PoissonInversion< Real >::nz_.
|
inlineprivate |
Definition at line 92 of file poisson-inversion/example_02.cpp.
Referenced by Objective_PoissonInversion< Real >::getVector(), Objective_PoissonInversion< Real >::gradient(), Objective_PoissonInversion< Real >::hessVec_inertia(), Objective_PoissonInversion< Real >::hessVec_true(), and Objective_PoissonInversion< Real >::value().
|
inlineprivate |
Definition at line 97 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::getVector().
|
inline |
Definition at line 112 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::hu_, and Objective_PoissonInversion< Real >::nu_.
Referenced by Objective_PoissonInversion< Real >::solve_adjoint_equation(), and Objective_PoissonInversion< Real >::solve_adjoint_sensitivity_equation().
|
inline |
Definition at line 127 of file poisson-inversion/example_02.cpp.
Referenced by Objective_PoissonInversion< Real >::solve_adjoint_equation(), and Objective_PoissonInversion< Real >::value().
|
inline |
Definition at line 131 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::hu_, Objective_PoissonInversion< Real >::nu_, Objective_PoissonInversion< Real >::nz_, Objective_PoissonInversion< Real >::u0_, and Objective_PoissonInversion< Real >::u1_.
Referenced by Objective_PoissonInversion< Real >::solve_adjoint_sensitivity_equation(), and Objective_PoissonInversion< Real >::solve_state_sensitivity_equation().
|
inline |
Definition at line 153 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::hu_, Objective_PoissonInversion< Real >::nu_, Objective_PoissonInversion< Real >::nz_, Objective_PoissonInversion< Real >::u0_, and Objective_PoissonInversion< Real >::u1_.
Referenced by Objective_PoissonInversion< Real >::gradient(), and Objective_PoissonInversion< Real >::hessVec_true().
|
inline |
Definition at line 176 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::hu_, Objective_PoissonInversion< Real >::nu_, Objective_PoissonInversion< Real >::nz_, Objective_PoissonInversion< Real >::u0_, and Objective_PoissonInversion< Real >::u1_.
Referenced by Objective_PoissonInversion< Real >::gradient(), Objective_PoissonInversion< Real >::hessVec_true(), main(), and Objective_PoissonInversion< Real >::value().
|
inline |
Definition at line 200 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::apply_mass(), Objective_PoissonInversion< Real >::evaluate_target(), Objective_PoissonInversion< Real >::hu_, and Objective_PoissonInversion< Real >::nu_.
Referenced by Objective_PoissonInversion< Real >::gradient(), and Objective_PoissonInversion< Real >::hessVec_true().
|
inline |
Definition at line 227 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::apply_linearized_control_operator(), Objective_PoissonInversion< Real >::hu_, and Objective_PoissonInversion< Real >::nu_.
Referenced by Objective_PoissonInversion< Real >::hessVec_true().
|
inline |
Definition at line 251 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::apply_linearized_control_operator(), Objective_PoissonInversion< Real >::apply_mass(), Objective_PoissonInversion< Real >::hu_, and Objective_PoissonInversion< Real >::nu_.
Referenced by Objective_PoissonInversion< Real >::hessVec_true().
|
inlinevirtual |
Update objective function.
This function updates the objective function at new iterations.
[in] | x | is the new iterate. |
[in] | flag | is true if the iterate has changed. |
[in] | iter | is the outer algorithm iterations count. |
Reimplemented from ROL::Objective< Real >.
Definition at line 281 of file poisson-inversion/example_02.cpp.
References ROL::Vector< Real >::basis(), ROL::Vector< Real >::clone(), Objective_PoissonInversion< Real >::H_, Objective_PoissonInversion< Real >::hessVec_true(), Objective_PoissonInversion< Real >::nz_, and Objective_PoissonInversion< Real >::useCorrection_.
|
inlinevirtual |
Compute value.
This function returns the objective function value.
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact objective function computation. |
Implements ROL::Objective< Real >.
Definition at line 322 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::alpha_, Objective_PoissonInversion< Real >::evaluate_target(), Objective_PoissonInversion< Real >::getVector(), Objective_PoissonInversion< Real >::hu_, Objective_PoissonInversion< Real >::hz_, Objective_PoissonInversion< Real >::nu_, Objective_PoissonInversion< Real >::nz_, and Objective_PoissonInversion< Real >::solve_state_equation().
|
inlinevirtual |
Compute gradient.
This function returns the objective function gradient.
[out] | g | is the gradient. |
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact objective function computation. |
The default implementation is a finite-difference approximation based on the function value. This requires the definition of a basis \(\{\phi_i\}\) for the optimization vectors x and the definition of a basis \(\{\psi_j\}\) for the dual optimization vectors (gradient vectors g). The bases must be related through the Riesz map, i.e., \( R \{\phi_i\} = \{\psi_j\}\), and this must be reflected in the implementation of the ROL::Vector::dual() method.
Reimplemented from ROL::Objective< Real >.
Definition at line 362 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::alpha_, Objective_PoissonInversion< Real >::apply_transposed_linearized_control_operator(), Objective_PoissonInversion< Real >::getVector(), Objective_PoissonInversion< Real >::hz_, Objective_PoissonInversion< Real >::nu_, Objective_PoissonInversion< Real >::nz_, Objective_PoissonInversion< Real >::solve_adjoint_equation(), and Objective_PoissonInversion< Real >::solve_state_equation().
|
inlinevirtual |
Apply Hessian approximation to vector.
This function applies the Hessian of the objective function to the vector \(v\).
[out] | hv | is the the action of the Hessian on \(v\). |
[in] | v | is the direction vector. |
[in] | x | is the current iterate. |
[in] | tol | is a tolerance for inexact objective function computation. |
Reimplemented from ROL::Objective< Real >.
Definition at line 385 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::hessVec_inertia(), Objective_PoissonInversion< Real >::hessVec_true(), and Objective_PoissonInversion< Real >::useCorrection_.
|
inline |
Definition at line 394 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::useCorrection_.
|
inline |
Definition at line 398 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::useCorrection_.
Referenced by main().
|
inline |
Definition at line 402 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::alpha_, Objective_PoissonInversion< Real >::apply_transposed_linearized_control_operator(), Objective_PoissonInversion< Real >::getVector(), Objective_PoissonInversion< Real >::hz_, Objective_PoissonInversion< Real >::nu_, Objective_PoissonInversion< Real >::nz_, Objective_PoissonInversion< Real >::solve_adjoint_equation(), Objective_PoissonInversion< Real >::solve_adjoint_sensitivity_equation(), Objective_PoissonInversion< Real >::solve_state_equation(), and Objective_PoissonInversion< Real >::solve_state_sensitivity_equation().
Referenced by Objective_PoissonInversion< Real >::hessVec(), and Objective_PoissonInversion< Real >::update().
|
inline |
Definition at line 440 of file poisson-inversion/example_02.cpp.
References Objective_PoissonInversion< Real >::getVector(), Objective_PoissonInversion< Real >::H_, and Objective_PoissonInversion< Real >::nz_.
Referenced by Objective_PoissonInversion< Real >::hessVec().
|
private |
Definition at line 78 of file poisson-inversion/example_02.cpp.
Referenced by Objective_PoissonInversion< Real >::apply_linearized_control_operator(), Objective_PoissonInversion< Real >::apply_mass(), Objective_PoissonInversion< Real >::apply_transposed_linearized_control_operator(), Objective_PoissonInversion< Real >::gradient(), Objective_PoissonInversion< Real >::hessVec_true(), Objective_PoissonInversion< Real >::Objective_PoissonInversion(), Objective_PoissonInversion< Real >::solve_adjoint_equation(), Objective_PoissonInversion< Real >::solve_adjoint_sensitivity_equation(), Objective_PoissonInversion< Real >::solve_state_equation(), Objective_PoissonInversion< Real >::solve_state_sensitivity_equation(), and Objective_PoissonInversion< Real >::value().
|
private |
Definition at line 79 of file poisson-inversion/example_02.cpp.
Referenced by Objective_PoissonInversion< Real >::apply_linearized_control_operator(), Objective_PoissonInversion< Real >::apply_transposed_linearized_control_operator(), Objective_PoissonInversion< Real >::gradient(), Objective_PoissonInversion< Real >::hessVec_inertia(), Objective_PoissonInversion< Real >::hessVec_true(), Objective_PoissonInversion< Real >::Objective_PoissonInversion(), Objective_PoissonInversion< Real >::solve_state_equation(), Objective_PoissonInversion< Real >::update(), and Objective_PoissonInversion< Real >::value().
|
private |
Definition at line 81 of file poisson-inversion/example_02.cpp.
Referenced by Objective_PoissonInversion< Real >::apply_linearized_control_operator(), Objective_PoissonInversion< Real >::apply_mass(), Objective_PoissonInversion< Real >::apply_transposed_linearized_control_operator(), Objective_PoissonInversion< Real >::Objective_PoissonInversion(), Objective_PoissonInversion< Real >::solve_adjoint_equation(), Objective_PoissonInversion< Real >::solve_adjoint_sensitivity_equation(), Objective_PoissonInversion< Real >::solve_state_equation(), Objective_PoissonInversion< Real >::solve_state_sensitivity_equation(), and Objective_PoissonInversion< Real >::value().
|
private |
|
private |
|
private |
|
private |
Definition at line 87 of file poisson-inversion/example_02.cpp.
Referenced by Objective_PoissonInversion< Real >::gradient(), Objective_PoissonInversion< Real >::hessVec_true(), and Objective_PoissonInversion< Real >::value().
|
private |
|
private |
Definition at line 90 of file poisson-inversion/example_02.cpp.
Referenced by Objective_PoissonInversion< Real >::hessVec_inertia(), and Objective_PoissonInversion< Real >::update().