![]() |
COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
#include <FindMinimum.hpp>
Inherits BracketMethod.
Public Member Functions | |
| Golden (const Real toll=3.0e-8) | |
| Default constructor. More... | |
| template<class T > | |
| Real | minimize (T &func) |
Public Member Functions inherited from BracketMethod | |
| BracketMethod () | |
| Default constructor. More... | |
| template<class T > | |
| void | bracket (const Real a, const Real b, T &func) |
| void | setMaxStep (const Real &step) |
Private Attributes | |
| Real | xmin |
| Real | fmin |
| const Real | tol |
Additional Inherited Members | |
Protected Member Functions inherited from BracketMethod | |
| void | shft2 (Real &a, Real &b, const Real c) |
| void | shft3 (Real &a, Real &b, Real &c, const Real d) |
| void | mov3 (Real &a, Real &b, Real &c, const Real d, const Real e, const Real f) |
| void | swap (Real &a, Real &b) |
Protected Attributes inherited from BracketMethod | |
| Real | m_maxStep |
| Real | ax |
| Real | bx |
| Real | cx |
| Real | fa |
| Real | fb |
| Real | fc |
Golden: This class is finds the minimum of a given function, using the golden method.
Use:
/// class Function
/// {
/// Real operator() (const Real& x) { return x*x;}
/// };
/// Function func;
/// Golden golden;
/// golden.bracket(a,b,func);
/// Real xmin = golden.minimize(func);
///
Definition at line 162 of file FindMinimum.hpp.
|
inline |
Default constructor.
Definition at line 169 of file FindMinimum.hpp.
|
inline |
Minimizes the given function
| func | The given function |
Definition at line 175 of file FindMinimum.hpp.
|
private |
Definition at line 164 of file FindMinimum.hpp.
|
private |
Definition at line 165 of file FindMinimum.hpp.
|
private |
Definition at line 164 of file FindMinimum.hpp.
1.8.9.1
|
Send comments to: COOLFluiD Web Admin |