BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::opt::Objective Class Referenceabstract

an object that defines a scalar objective function to be optimized. More...

#include <cl_Objective.hpp>

Inheritance diagram for belfem::opt::Objective:
[legend]

Public Member Functions

 Objective (const uint aDimension)
virtual ~Objective ()=default
virtual real compute_objective (const Vector< real > &aX, Vector< real > &aGradient)=0
 evaluate the objective at the design point aX.
uint dimension () const
 return the number of design variables

Detailed Description

an object that defines a scalar objective function to be optimized.

This base class is agnostic of the optimization algorithm: the user derives from it and implements compute_objective(). It plays the same role for the Optimizer that ode::ODE plays for the ode::Integrator.

Constructor & Destructor Documentation

◆ Objective()

belfem::opt::Objective::Objective ( const uint aDimension)
inline

◆ ~Objective()

virtual belfem::opt::Objective::~Objective ( )
virtualdefault

Member Function Documentation

◆ compute_objective()

virtual real belfem::opt::Objective::compute_objective ( const Vector< real > & aX,
Vector< real > & aGradient )
pure virtual

evaluate the objective at the design point aX.

Parameters
aXdesign vector, length dimension()
aGradientgradient output. For derivative-free algorithms this vector has length zero and must be ignored. For gradient-based algorithms it has length dimension() and the implementation must fill it with d(objective)/d(aX).
Returns
the scalar objective value at aX

Implemented in Rosenbrock.

◆ dimension()

uint belfem::opt::Objective::dimension ( ) const
inline

return the number of design variables


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