BISICLES AMR ice sheet model  0.9
Public Member Functions | List of all members
ObjectiveWithGradient< X > Class Template Referenceabstract

Specify operations required to carry out gradient based optimization. More...

#include <CGOptimize.H>

Inheritance diagram for ObjectiveWithGradient< X >:
Inheritance graph
[legend]

Public Member Functions

virtual ~ObjectiveWithGradient ()
 virtual destructor More...
 
virtual Real dotProduct (X &a, const X &b)=0
 
virtual void computeObjectiveAndGradient (Real &fm, Real &fp, X &g, const X &x, bool inner)=0
 
virtual void assign (X &y, const X &x)=0
 Copy x to y. More...
 
virtual void incr (X &y, const X &x, Real s)=0
 Set y = y + s * x. More...
 
virtual void create (X &a, const X &b)=0
 resize a / allocate storage to conform with b More...
 
virtual void free (X &a)=0
 free storage More...
 
virtual void scale (X &a, const Real s)=0
 set a = a * s More...
 
virtual void preCond (X &a, const X &b)=0
 apply precoditioner K, so a = Kb More...
 
virtual void restart ()=0
 carry out whatver operations are required prior to a restart More...
 
virtual int nDoF (const X &x)=0
 number of degrees-of-freedom (maximum number of iterations before restart) More...
 

Detailed Description

template<class X>
class ObjectiveWithGradient< X >

Specify operations required to carry out gradient based optimization.

Constructor & Destructor Documentation

◆ ~ObjectiveWithGradient()

template<class X>
virtual ObjectiveWithGradient< X >::~ObjectiveWithGradient ( )
inlinevirtual

virtual destructor

Member Function Documentation

◆ assign()

template<class X>
virtual void ObjectiveWithGradient< X >::assign ( X &  y,
const X &  x 
)
pure virtual

◆ computeObjectiveAndGradient()

template<class X>
virtual void ObjectiveWithGradient< X >::computeObjectiveAndGradient ( Real &  fm,
Real &  fp,
X &  g,
const X &  x,
bool  inner 
)
pure virtual

Compute a main objective (fm), a penalty function (fp) and the gradient (g) of f + p with respect to x

Parameters
fm(output) main objective
fp(output) penalty function
g(output) gradient
x(input) state vector
inner(input) is this an 'inner' iteration?

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

◆ create()

template<class X>
virtual void ObjectiveWithGradient< X >::create ( X &  a,
const X &  b 
)
pure virtual

resize a / allocate storage to conform with b

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

◆ dotProduct()

template<class X>
virtual Real ObjectiveWithGradient< X >::dotProduct ( X &  a,
const X &  b 
)
pure virtual

◆ free()

template<class X>
virtual void ObjectiveWithGradient< X >::free ( X &  a)
pure virtual

◆ incr()

template<class X>
virtual void ObjectiveWithGradient< X >::incr ( X &  y,
const X &  x,
Real  s 
)
pure virtual

◆ nDoF()

template<class X>
virtual int ObjectiveWithGradient< X >::nDoF ( const X &  x)
pure virtual

number of degrees-of-freedom (maximum number of iterations before restart)

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

◆ preCond()

template<class X>
virtual void ObjectiveWithGradient< X >::preCond ( X &  a,
const X &  b 
)
pure virtual

◆ restart()

template<class X>
virtual void ObjectiveWithGradient< X >::restart ( )
pure virtual

carry out whatver operations are required prior to a restart

Implemented in InverseVerticallyIntegratedVelocitySolver.

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

◆ scale()

template<class X>
virtual void ObjectiveWithGradient< X >::scale ( X &  a,
const Real  s 
)
pure virtual

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