Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LBFGS Class Reference

The quasi-Newton Limited-memory BFGS formula. Keeps nPrevSteps_ of the y and s vectors and approximates the inverse areas through them. Values of 3 < nPrevSteps_ < 20 are suggested. More...

Inheritance diagram for LBFGS:
Inheritance graph
[legend]
Collaboration diagram for LBFGS:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("LBFGS")
 
 LBFGS (const fvMesh &mesh, const dictionary &dict)
 
virtual ~LBFGS ()=default
 
void computeCorrection ()
 
virtual void updateOldCorrection (const scalarField &oldCorrection)
 
virtual void write ()
 
- Public Member Functions inherited from updateMethod
 TypeName ("updateMethod")
 
 declareRunTimeSelectionTable (autoPtr, updateMethod, dictionary,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
 
 updateMethod (const fvMesh &mesh, const dictionary &dict)
 
virtual ~updateMethod ()=default
 
void setObjectiveDeriv (const scalarField &derivs)
 
void setConstraintDeriv (const PtrList< scalarField > &derivs)
 
void setObjectiveValue (const scalar value)
 
void setConstraintValues (const scalarField &values)
 
void setStep (const scalar eta)
 
void setGlobalSum (const bool useGlobalSum)
 
scalarFieldreturnCorrection ()
 
void writeCorrection ()
 
virtual scalar computeMeritFunction ()
 
virtual scalar meritFunctionDirectionalDerivative ()
 
boolinitialEtaSet ()
 

Protected Member Functions

void allocateMatrices ()
 
void pivotFields (PtrList< scalarField > &list, const scalarField &f)
 
void updateVectors ()
 
void update ()
 
void steepestDescentUpdate ()
 
void LBFGSUpdate ()
 
void readFromDict ()
 
- Protected Member Functions inherited from updateMethod
const scalarField leftMult (const scalarField &, const SquareMatrix< scalar > &)
 
const scalarField rightMult (const SquareMatrix< scalar > &, const scalarField &)
 
SquareMatrix< scalar > outerProd (const scalarField &, const scalarField &)
 
SquareMatrix< scalar > inv (SquareMatrix< scalar > A)
 
scalar globalSum (const scalarField &field)
 
scalar globalSum (tmp< scalarField > &tfield)
 
dictionary coeffsDict ()
 

Protected Attributes

scalar etaHessian_
 
label nSteepestDescent_
 
labelList activeDesignVars_
 
label nPrevSteps_
 
PtrList< scalarFieldy_
 
PtrList< scalarFields_
 
scalarField derivativesOld_
 
scalarField correctionOld_
 
label counter_
 
- Protected Attributes inherited from updateMethod
const fvMeshmesh_
 
const dictionary dict_
 
IOdictionary optMethodIODict_
 
scalarField objectiveDerivatives_
 
PtrList< scalarFieldconstraintDerivatives_
 
scalar objectiveValue_
 
scalarField cValues_
 
scalarField correction_
 
scalarField cumulativeCorrection_
 
scalar eta_
 
bool initialEtaSet_
 
word correctionFolder_
 
bool globalSum_
 

Additional Inherited Members

- Static Public Member Functions inherited from updateMethod
static autoPtr< updateMethodNew (const fvMesh &mesh, const dictionary &dict)
 

Detailed Description

The quasi-Newton Limited-memory BFGS formula. Keeps nPrevSteps_ of the y and s vectors and approximates the inverse areas through them. Values of 3 < nPrevSteps_ < 20 are suggested.

Source files

Definition at line 51 of file LBFGS.H.

Constructor & Destructor Documentation

◆ LBFGS()

LBFGS ( const fvMesh mesh,
const dictionary dict 
)

Definition at line 188 of file LBFGS.C.

References Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ ~LBFGS()

virtual ~LBFGS ( )
virtualdefault

Member Function Documentation

◆ allocateMatrices()

void allocateMatrices ( )
protected

Definition at line 42 of file LBFGS.C.

References LBFGS::activeDesignVars_, Foam::identity(), LBFGS::nPrevSteps_, updateMethod::objectiveDerivatives_, LBFGS::s_, LBFGS::y_, and Foam::Zero.

Here is the call graph for this function:

◆ pivotFields()

void pivotFields ( PtrList< scalarField > &  list,
const scalarField f 
)
protected

Definition at line 60 of file LBFGS.C.

References f().

Here is the call graph for this function:

◆ updateVectors()

void updateVectors ( )
protected

Definition at line 83 of file LBFGS.C.

References DebugInfo, Foam::endl(), and Foam::nl.

Here is the call graph for this function:

◆ update()

void update ( )
protected

Definition at line 144 of file LBFGS.C.

◆ steepestDescentUpdate()

void steepestDescentUpdate ( )
protected

Definition at line 102 of file LBFGS.C.

References Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ LBFGSUpdate()

void LBFGSUpdate ( )
protected

Definition at line 109 of file LBFGS.C.

References Foam::constant::physicoChemical::b, forAll, gamma, Foam::min(), and Foam::Zero.

Here is the call graph for this function:

◆ readFromDict()

void readFromDict ( )
protected

Definition at line 164 of file LBFGS.C.

References Foam::identity(), and Foam::Zero.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "LBFGS"  )

◆ computeCorrection()

void computeCorrection ( )
virtual

Implements updateMethod.

Definition at line 232 of file LBFGS.C.

References update().

Here is the call graph for this function:

◆ updateOldCorrection()

void updateOldCorrection ( const scalarField oldCorrection)
virtual

Reimplemented from updateMethod.

Definition at line 248 of file LBFGS.C.

References updateMethod::updateOldCorrection().

Here is the call graph for this function:

◆ write()

void write ( )
virtual

Reimplemented from updateMethod.

Definition at line 255 of file LBFGS.C.

References updateMethod::write().

Here is the call graph for this function:

Member Data Documentation

◆ etaHessian_

scalar etaHessian_
protected

Definition at line 71 of file LBFGS.H.

◆ nSteepestDescent_

label nSteepestDescent_
protected

Definition at line 74 of file LBFGS.H.

◆ activeDesignVars_

labelList activeDesignVars_
protected

Definition at line 77 of file LBFGS.H.

Referenced by LBFGS::allocateMatrices().

◆ nPrevSteps_

label nPrevSteps_
protected

Definition at line 80 of file LBFGS.H.

Referenced by LBFGS::allocateMatrices().

◆ y_

PtrList<scalarField> y_
protected

Definition at line 83 of file LBFGS.H.

Referenced by LBFGS::allocateMatrices().

◆ s_

PtrList<scalarField> s_
protected

Definition at line 86 of file LBFGS.H.

Referenced by LBFGS::allocateMatrices().

◆ derivativesOld_

scalarField derivativesOld_
protected

Definition at line 89 of file LBFGS.H.

◆ correctionOld_

scalarField correctionOld_
protected

Definition at line 92 of file LBFGS.H.

◆ counter_

label counter_
protected

Definition at line 95 of file LBFGS.H.


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