G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsOptim< T > Class Template Referenceabstract

Detailed Description

template<typename T>
class gismo::gsOptim< T >

Base class for the Optim wrapper.

Template Parameters
Treal type
+ Inheritance diagram for gsOptim< T >:
+ Collaboration diagram for gsOptim< T >:

Public Member Functions

virtual void defaultOptions ()
 Default options.
 
virtual void getOptions ()
 Options getter.
 
 gsOptim ()
 Empty constructor.
 
 gsOptim (gsOptProblem< T > *problem)
 Constructor with a gsOptProblem. More...
 
virtual bool intermediateCallback ()
 Callback function is executed after every iteration. Returning false causes premature termination of the optimization.
 
virtual void solve (const gsMatrix< T > &initialGuess)
 Solve, see gsOptimizer.
 
bool success ()
 Function returning true when optimization was successful.
 

Static Public Member Functions

static uPtr get (const std::string &slv, gsOptProblem< T > *problem)
 Getter for a specific solver. More...
 

Protected Member Functions

virtual bool callOptim (gsVector< T > &initialGuess, gsOptProblem< T > &op, optim::algo_settings_t &settings)=0
 Misc function to call optim.
 
void setConstraints ()
 Sets the box constraints.
 

Protected Attributes

gsMatrix< T > m_curDesign
 Current design variables (and starting point )
 
gsOptionList m_options
 Options.
 

Constructor & Destructor Documentation

gsOptim ( gsOptProblem< T > *  problem)
inline

Constructor with a gsOptProblem.

Parameters
problemThe optimization problem, see gsOptProblem

Member Function Documentation

static uPtr get ( const std::string &  slv,
gsOptProblem< T > *  problem 
)
inlinestatic

Getter for a specific solver.

Parameters
[in]slvThe solver name
problemThe optimization problem
Returns
Pointer to the solver