Go to the documentation of this file.
20 #ifndef LIBMESH_OPTIMIZATION_SOLVER_H
21 #define LIBMESH_OPTIMIZATION_SOLVER_H
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/reference_counted_object.h"
26 #include "libmesh/libmesh.h"
27 #include "libmesh/parallel_object.h"
28 #include "libmesh/optimization_system.h"
30 #ifdef LIBMESH_FORWARD_DECLARE_ENUMS
36 #include "libmesh/enum_solver_package.h"
47 template <
typename T>
class SparseMatrix;
48 template <
typename T>
class NumericVector;
49 template <
typename T>
class Preconditioner;
84 static std::unique_ptr<OptimizationSolver<T>>
build(
sys_type & s,
101 virtual void init () = 0;
106 virtual void solve () = 0;
114 { libmesh_not_implemented(); }
222 #endif // LIBMESH_OPTIMIZATION_SOLVER_H
This System subclass enables us to assemble an objective function, gradient, Hessian and bounds for o...
OptimizationSystem::ComputeEqualityConstraintsJacobian * equality_constraints_jacobian_object
Object that computes the Jacobian of C_eq(X).
SolverPackage
Defines an enum for various linear solver packages.
static std::unique_ptr< OptimizationSolver< T > > build(sys_type &s, const SolverPackage solver_package=libMesh::default_solver_package())
Builds an OptimizationSolver using the package specified by solver_package.
virtual void print_converged_reason()
Prints a useful message about why the latest optimization solve con(di)verged.
OptimizationSystem::ComputeHessian * hessian_object
Object that computes the Hessian H_f(X) of the objective function at the input iterate X.
unsigned int max_objective_function_evaluations
Maximum number of objective function evaluations allowed.
Abstract base class to be used to calculate the Jacobian of the inequality constraints.
This class implements reference counting.
The libMesh namespace provides an interface to certain functionality in the library.
Abstract base class to be used to calculate the inequality constraints.
virtual int get_converged_reason()
Abstract base class to be used to calculate the Hessian of an objective function.
SolverPackage default_solver_package()
OptimizationSystem::ComputeObjective * objective_object
Object that computes the objective function f(X) at the input iterate X.
Abstract base class to be used to calculate the equality constraints.
virtual void clear()
Release all memory and clear data structures.
virtual void init()=0
Initialize data structures if not done so already.
OptimizationSystem::ComputeInequalityConstraintsJacobian * inequality_constraints_jacobian_object
Object that computes the Jacobian of C_ineq(X).
This base class can be inherited from to provide interfaces to optimization solvers from different pa...
Abstract base class to be used to calculate the lower and upper bounds for all dofs in the system.
double objective_function_relative_tolerance
Required change in objective function which signals convergence.
OptimizationSystem sys_type
The type of system.
Abstract base class to be used to calculate the Jacobian of the equality constraints.
const sys_type & system() const
Abstract base class to be used to calculate the objective function for optimization.
virtual void get_dual_variables()
Get the current values of dual variables associated with inequality and equality constraints.
virtual ~OptimizationSolver()
Destructor.
Abstract base class to be used to calculate the gradient of an objective function.
OptimizationSystem::ComputeLowerAndUpperBounds * lower_and_upper_bounds_object
Object that computes the lower and upper bounds vectors.
OptimizationSolver(sys_type &s)
Constructor.
bool verbose
Control how much is output from the OptimizationSolver as it's running.
bool _is_initialized
Flag indicating if the data structures have been initialized.
virtual void solve()=0
Solves the optimization problem.
An object whose state is distributed along a set of processors.
OptimizationSystem::ComputeGradient * gradient_object
Object that computes the gradient grad_f(X) of the objective function at the input iterate X.
OptimizationSystem::ComputeEqualityConstraints * equality_constraints_object
Object that computes the equality constraints vector C_eq(X).
OptimizationSystem::ComputeInequalityConstraints * inequality_constraints_object
Object that computes the inequality constraints vector C_ineq(X).
void ErrorVector unsigned int
sys_type & _system
A reference to the system we are solving.