[P]arallel [Hi]gh-order [Li]brary for [P]DEs  Latest
Parallel High-Order Library for PDEs through hp-adaptive Discontinuous Galerkin methods
ROL::FullSpace_BirosGhattas< Real > Class Template Reference

#include <full_space_step.hpp>

Inheritance diagram for ROL::FullSpace_BirosGhattas< Real >:
Collaboration diagram for ROL::FullSpace_BirosGhattas< Real >:

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.
 

Detailed Description

template<class Real>
class ROL::FullSpace_BirosGhattas< Real >

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.

Constructor & Destructor Documentation

◆ FullSpace_BirosGhattas()

template<class Real >
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.

Parameters
[in]parlistis a parameter list containing algorithmic specifications
[in]lineSearchis a user-defined line search object
[in]secantis a user-defined secant object

Definition at line 12 of file full_space_step.cpp.

Member Function Documentation

◆ compute()

template<class Real >
void ROL::FullSpace_BirosGhattas< Real >::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.

Uses the more general function with bounded constraints.

Definition at line 484 of file full_space_step.cpp.

◆ computeInitialLagrangeMultiplier()

template<class Real >
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.

◆ computeLagrangianGradient()

template<class Real >
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.

◆ initialize() [1/2]

template<class Real >
void ROL::FullSpace_BirosGhattas< Real >::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 
)
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.

◆ initialize() [2/2]

template<class Real >
void ROL::FullSpace_BirosGhattas< Real >::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.

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.

◆ print()

template<class Real >
std::string ROL::FullSpace_BirosGhattas< Real >::print ( AlgorithmState< Real > &  algo_state,
bool  print_header = false 
) const
override

Print iterate status.

This function prints the iteration status.

Parameters
[in]algo_stateis the current state of the algorithm
[in]print_headerif set to true will print the header at each iteration

Definition at line 895 of file full_space_step.cpp.

◆ printHeader()

template<class Real >
std::string ROL::FullSpace_BirosGhattas< Real >::printHeader ( void  ) const
override

Print iterate header.

This function produces a string containing header information.

Definition at line 846 of file full_space_step.cpp.

◆ printName()

template<class Real >
std::string ROL::FullSpace_BirosGhattas< Real >::printName ( void  ) const
override

Print step name.

This function produces a string containing the algorithmic step information.

Definition at line 874 of file full_space_step.cpp.

◆ update() [1/2]

template<class Real >
void ROL::FullSpace_BirosGhattas< Real >::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.

Given a trial step, \(s_k\), this function updates \(x_{k+1}=x_k+s_k\). This function also updates the secant approximation.

Parameters
[in,out]design_variablesare the updated design variables (control and simulation)
[in,out]lagrange_multare the updated dual variables
[in]search_directionis the computed design step
[in]objectiveis the objective function
[in]equal_constraintsare the bound equal_constraints
[in]algo_statecontains the current state of the algorithm

Definition at line 741 of file full_space_step.cpp.

◆ update() [2/2]

template<class Real >
void ROL::FullSpace_BirosGhattas< Real >::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.

Given a trial step, \(s_k\), this function updates \(x_{k+1}=x_k+s_k\). This function also updates the secant approximation.

Parameters
[in,out]design_variablesare the updated design variables (control and simulation)
[in,out]lagrange_multare the updated dual variables
[in]search_directionis the computed design step
[in]objectiveis the objective function
[in]equal_constraintsare the equality constraints
[in]bound_constraintsare the bounded constraints
[in]algo_statecontains the current state of the algorithm

Definition at line 756 of file full_space_step.cpp.

Member Data Documentation

◆ acceptLastAlpha_

template<class Real >
bool ROL::FullSpace_BirosGhattas< Real >::acceptLastAlpha_
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.

◆ merit_function_

template<class Real >
ROL::Ptr<Objective<Real> > ROL::FullSpace_BirosGhattas< Real >::merit_function_
private

Merit function used within the line search.

Currently use augmented Lagrangian.

Definition at line 47 of file full_space_step.hpp.

◆ preconditioner_name_

template<class Real >
std::string ROL::FullSpace_BirosGhattas< Real >::preconditioner_name_
private

Preconditioner name.

Either P2, P4, P2A, P4A, Identity

Definition at line 89 of file full_space_step.hpp.

◆ verbosity_

template<class Real >
int ROL::FullSpace_BirosGhattas< Real >::verbosity_
private

Print verbosity.

Does nothing for now. Can add more stuff later

Definition at line 72 of file full_space_step.hpp.


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