(9)

MyOpt Class Referenceabstract

Abstract class to define by user specified optimization function. More...

Public Member Functions

 MyOpt ()
 Default Constructor.
 
 MyOpt (Mesh &mesh)
 Constructor using mesh instance. More...
 
virtual ~MyOpt ()
 Destructor.
 
virtual real_t Objective (Vect< real_t > &x)=0
 Virtual member function to define objective. More...
 
virtual void Gradient (Vect< real_t > &x, Vect< real_t > &g)
 Virtual member function to define gradient vector of objective. More...
 
void setEquation (Equa *eq)
 Define equation instance. More...
 
EquagetEquation () const
 Get pointer to equation instance. More...
 

Detailed Description

Abstract class to define by user specified optimization function.

The user has to implement a class that inherits from the present one where the virtual functions are implemented.

Author
Rachid Touzani

Constructor & Destructor Documentation

◆ MyOpt()

MyOpt ( Mesh mesh)

Constructor using mesh instance.

Parameters
meshReference to Mesh instance

Member Function Documentation

◆ getEquation()

Equa* getEquation ( ) const

Get pointer to equation instance.

Returns
Pointer to equation instance

◆ Gradient()

virtual void Gradient ( Vect< real_t > &  x,
Vect< real_t > &  g 
)
virtual

Virtual member function to define gradient vector of objective.

Parameters
[in]xVector of optimization variables
[out]gGradient vector

◆ Objective()

virtual real_t Objective ( Vect< real_t > &  x)
pure virtual

Virtual member function to define objective.

Parameters
[in]xVector of optimization variables
Returns
Value of objective

◆ setEquation()

void setEquation ( Equa eq)

Define equation instance.

Parameters
[in]eqPointer to equation instance
Remarks
This member function is to be invoked in the user class defining the optimization problem