BISICLES AMR ice sheet model  0.9
Classes | Functions
CGOptimize.H File Reference

Go to the source code of this file.

Classes

class  ObjectiveWithGradient< X >
 Specify operations required to carry out gradient based optimization. More...
 

Functions

Real sqr (const Real &a)
 
template<class X >
void secantLineSearch (ObjectiveWithGradient< X > &a_F, X &x, X &r, X &d, X &y, X &p, Real a_fx, int a_maxIter, Real a_initialStep, Real a_stepMaxGrow, Real a_tol)
 find y = x + s*d such that f'(y).f'(x) << f'(x).f'(x) More...
 
template<class X >
int CGOptimize (ObjectiveWithGradient< X > &a_F, X &a_x, int a_maxIter, Real a_tol, Real a_hang, Real a_secantParameter, Real a_secantStepMaxGrow, int a_secantMaxIter, Real a_secantTol, int a_iter=0)
 

Function Documentation

◆ CGOptimize()

template<class X >
int CGOptimize ( ObjectiveWithGradient< X > &  a_F,
X &  a_x,
int  a_maxIter,
Real  a_tol,
Real  a_hang,
Real  a_secantParameter,
Real  a_secantStepMaxGrow,
int  a_secantMaxIter,
Real  a_secantTol,
int  a_iter = 0 
)

◆ secantLineSearch()

template<class X >
void secantLineSearch ( ObjectiveWithGradient< X > &  a_F,
X &  x,
X &  r,
X &  d,
X &  y,
X &  p,
Real  a_fx,
int  a_maxIter,
Real  a_initialStep,
Real  a_stepMaxGrow,
Real  a_tol 
)

find y = x + s*d such that f'(y).f'(x) << f'(x).f'(x)

x - initial point r - input - ||f'(x)||^2 d - input - search direction y - output p - workspace a_fx - f(x) (where f' is the gradient of scalar f > 0)

References ObjectiveWithGradient< X >::assign(), ObjectiveWithGradient< X >::computeObjectiveAndGradient(), ObjectiveWithGradient< X >::dotProduct(), ObjectiveWithGradient< X >::incr(), and sqr().

Referenced by CGOptimize(), and ObjectiveWithGradient< Vector< LevelData< FArrayBox > *> >::~ObjectiveWithGradient().

◆ sqr()

Real sqr ( const Real &  a)
inline

Referenced by CGOptimize(), and secantLineSearch().