[P]arallel [Hi]gh-order [Li]brary for [P]DEs
Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
|
#include <full_space_step.hpp>
Public Member Functions | |
FullSpace_BirosGhattas (ROL::ParameterList &parlist, const ROL::Ptr< LineSearch< Real > > &lineSearch=ROL::nullPtr, const ROL::Ptr< Secant< Real > > &secant=ROL::nullPtr) | |
< See base class. More... | |
void | computeLagrangianGradient (Vector< Real > &lagrangian_gradient, const Vector< Real > &design_variables, const Vector< Real > &lagrange_mult, const Vector< Real > &objective_gradient, Constraint< Real > &equal_constraints) const |
void | computeInitialLagrangeMultiplier (Vector< Real > &lagrange_mult, const Vector< Real > &design_variables, const Vector< Real > &objective_gradient, Constraint< Real > &equal_constraints) const |
virtual void | initialize (Vector< Real > &design_variables, const Vector< Real > &gradient, Vector< Real > &lagrange_mult, const Vector< Real > &equal_constraints_values, Objective< Real > &objective, Constraint< Real > &equal_constraints, AlgorithmState< Real > &algo_state) override |
Initialize with objective and equality constraints. More... | |
void | initialize (Vector< Real > &design_variables, const Vector< Real > &gradient, Vector< Real > &lagrange_mult, const Vector< Real > &equal_constraints_values, Objective< Real > &objective, Constraint< Real > &equal_constraints, BoundConstraint< Real > &bound_constraints, AlgorithmState< Real > &algo_state) override |
Initialize with objective, equality constraints, and bounded constraints. More... | |
Real | computeAugmentedLagrangianPenalty (const Vector< Real > &search_direction, const Vector< Real > &lagrange_mult_search_direction, const Vector< Real > &design_variables, const Vector< Real > &objective_gradient, const Vector< Real > &equal_constraints_values, const Vector< Real > &adjoint_jacobian_lagrange, Constraint< Real > &equal_constraints, const Real offset) |
Evaluates the penalty of the augmented Lagrangian function using Biros and Ghattas' lower bound. | |
template<typename MatrixType , typename VectorType , typename PreconditionerType > | |
std::vector< double > | solve_linear (MatrixType &matrix_A, VectorType &right_hand_side, VectorType &solution, PreconditionerType &preconditioner) |
Solve a linear system using deal.II's F/GMRES solver. | |
std::vector< Real > | solve_KKT_system (Vector< Real > &search_direction, Vector< Real > &lag_search_direction, const Vector< Real > &design_variables, const Vector< Real > &lagrange_mult, Objective< Real > &objective, Constraint< Real > &equal_constraints) |
Setup and solve the large KKT system. | |
void | compute (Vector< Real > &search_direction, const Vector< Real > &design_variables, const Vector< Real > &lagrange_mult, Objective< Real > &objective, Constraint< Real > &equal_constraints, AlgorithmState< Real > &algo_state) override |
Computes the search directions. More... | |
void | compute (Vector< Real > &search_direction, const Vector< Real > &design_variables, const Vector< Real > &lagrange_mult, Objective< Real > &objective, Constraint< Real > &equal_constraints, BoundConstraint< Real > &bound_constraints, AlgorithmState< Real > &algo_state) override |
Computes the search directions. | |
void | update (Vector< Real > &design_variables, Vector< Real > &lagrange_mult, const Vector< Real > &search_direction, Objective< Real > &objective, Constraint< Real > &equal_constraints, AlgorithmState< Real > &algo_state) override |
Update step, if successful. More... | |
void | update (Vector< Real > &design_variables, Vector< Real > &lagrange_mult, const Vector< Real > &search_direction, Objective< Real > &objective, Constraint< Real > &equal_constraints, BoundConstraint< Real > &bound_constraints, AlgorithmState< Real > &algo_state) override |
Update step, if successful. More... | |
std::string | printHeader (void) const override |
Print iterate header. More... | |
std::string | printName (void) const override |
Print step name. More... | |
std::string | print (AlgorithmState< Real > &algo_state, bool print_header=false) const override |
Print iterate status. More... | |
Private Attributes | |
ROL::Ptr< Vector< Real > > | design_variable_cloner_ |
Vector used to clone a vector like the design variables' size and parallel distribution. | |
ROL::Ptr< Vector< Real > > | lagrange_variable_cloner_ |
Vector used to clone a vector like the Lagrange variables' / constraints size and parallel distribution. | |
ROL::Ptr< Objective< Real > > | merit_function_ |
Merit function used within the line search. More... | |
Real | penalty_value_ |
Penalty value of the augmented Lagrangian. | |
ROL::Ptr< Vector< Real > > | lagrange_mult_search_direction_ |
Lagrange multipliers search direction. | |
ROL::Ptr< Vector< Real > > | previous_reduced_gradient_ |
Store previous gradient for secant method. | |
ROL::Ptr< Secant< Real > > | secant_ |
Secant object (used for quasi-Newton preconditioner). | |
ROL::Ptr< LineSearch< Real > > | lineSearch_ |
Line-search object for globalization. | |
ESecant | esec_ |
Enum determines type of secant to use as reduced Hessian preconditioner. | |
ELineSearch | els_ |
Enum determines type of line search. | |
ECurvatureCondition | econd_ |
Enum determines type of curvature condition. | |
int | verbosity_ |
Print verbosity. More... | |
bool | acceptLastAlpha_ |
Whether the last line search's step length is accepted when the maximum iterations is reached. More... | |
ROL::ParameterList | parlist_ |
Parameter list. | |
std::string | lineSearchName_ |
Line search name. | |
std::string | secantName_ |
Name of secant used as a reduced-Hessian preconditioner. | |
bool | use_approximate_full_space_preconditioner_ |
Use the Tilde{P} version of Biros and Ghattas' preconditioner. | |
std::string | preconditioner_name_ |
Preconditioner name. More... | |
double | search_ctl_norm |
Norm of the control search direction. | |
double | search_sim_norm |
Norm of the simulation search direction. | |
double | search_adj_norm |
Norm of the adjoint search direction. | |
int | n_linesearches |
Number of line searches used in the last design cycle. | |
dealii::ConditionalOStream | pcout |
Parallel std::cout that only outputs on mpi_rank==0. | |
Full-space optimization step where the full KKT linear system is solved with a preconditioner based on the reduced-space. See Biros and Ghattas' 2005 paper.
Definition at line 37 of file full_space_step.hpp.
ROL::FullSpace_BirosGhattas< Real >::FullSpace_BirosGhattas | ( | ROL::ParameterList & | parlist, |
const ROL::Ptr< LineSearch< Real > > & | lineSearch = ROL::nullPtr , |
||
const ROL::Ptr< Secant< Real > > & | secant = ROL::nullPtr |
||
) |
< See base class.
Constructor.
Standard constructor to build a FullSpace_BirosGhattas object. Algorithmic specifications are passed in through a ROL::ParameterList.
[in] | parlist | is a parameter list containing algorithmic specifications |
[in] | lineSearch | is a user-defined line search object |
[in] | secant | is a user-defined secant object |
Definition at line 12 of file full_space_step.cpp.
|
override |
Computes the search directions.
Uses the more general function with bounded constraints.
Definition at line 484 of file full_space_step.cpp.
void ROL::FullSpace_BirosGhattas< Real >::computeInitialLagrangeMultiplier | ( | Vector< Real > & | lagrange_mult, |
const Vector< Real > & | design_variables, | ||
const Vector< Real > & | objective_gradient, | ||
Constraint< Real > & | equal_constraints | ||
) | const |
Evaluates the initial Lagrange multipler by solving the augmented system. Note that we could simplify this by simply solving for the adjoint the typical manner. Using this simply because it was used by a previous ROL algorithm. Has a higher initial cost than solving the adjoint directly.
Definition at line 75 of file full_space_step.cpp.
void ROL::FullSpace_BirosGhattas< Real >::computeLagrangianGradient | ( | Vector< Real > & | lagrangian_gradient, |
const Vector< Real > & | design_variables, | ||
const Vector< Real > & | lagrange_mult, | ||
const Vector< Real > & | objective_gradient, | ||
Constraint< Real > & | equal_constraints | ||
) | const |
Evaluates the gradient of the Lagrangian
Definition at line 53 of file full_space_step.cpp.
|
overridevirtual |
Initialize with objective and equality constraints.
Simply calls the more general initialize with null bounded constraints.
Definition at line 118 of file full_space_step.cpp.
|
override |
Initialize with objective, equality constraints, and bounded constraints.
Note that the current setup does not work for bounded constraints. It will simply ignore the bounded constraints.
Definition at line 141 of file full_space_step.cpp.
|
override |
Print iterate status.
This function prints the iteration status.
[in] | algo_state | is the current state of the algorithm |
[in] | print_header | if set to true will print the header at each iteration |
Definition at line 895 of file full_space_step.cpp.
|
override |
Print iterate header.
This function produces a string containing header information.
Definition at line 846 of file full_space_step.cpp.
|
override |
Print step name.
This function produces a string containing the algorithmic step information.
Definition at line 874 of file full_space_step.cpp.
|
override |
Update step, if successful.
Given a trial step, \(s_k\), this function updates \(x_{k+1}=x_k+s_k\). This function also updates the secant approximation.
[in,out] | design_variables | are the updated design variables (control and simulation) |
[in,out] | lagrange_mult | are the updated dual variables |
[in] | search_direction | is the computed design step |
[in] | objective | is the objective function |
[in] | equal_constraints | are the bound equal_constraints |
[in] | algo_state | contains the current state of the algorithm |
Definition at line 741 of file full_space_step.cpp.
|
override |
Update step, if successful.
Given a trial step, \(s_k\), this function updates \(x_{k+1}=x_k+s_k\). This function also updates the secant approximation.
[in,out] | design_variables | are the updated design variables (control and simulation) |
[in,out] | lagrange_mult | are the updated dual variables |
[in] | search_direction | is the computed design step |
[in] | objective | is the objective function |
[in] | equal_constraints | are the equality constraints |
[in] | bound_constraints | are the bounded constraints |
[in] | algo_state | contains the current state of the algorithm |
Definition at line 756 of file full_space_step.cpp.
|
private |
Whether the last line search's step length is accepted when the maximum iterations is reached.
Currently not used.
Definition at line 75 of file full_space_step.hpp.
|
private |
Merit function used within the line search.
Currently use augmented Lagrangian.
Definition at line 47 of file full_space_step.hpp.
|
private |
Preconditioner name.
Either P2, P4, P2A, P4A, Identity
Definition at line 89 of file full_space_step.hpp.
|
private |
Print verbosity.
Does nothing for now. Can add more stuff later
Definition at line 72 of file full_space_step.hpp.