Go to the documentation of this file.
39 #ifndef updateMethod_H
40 #define updateMethod_H
206 void setStep(
const scalar eta);
240 virtual void write();
scalarField & returnCorrection()
Return the correction of the design variables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
bool initialEtaSet_
Is initially set?
const scalarField rightMult(const SquareMatrix< scalar > &, const scalarField &)
declareRunTimeSelectionTable(autoPtr, updateMethod, dictionary,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
A class for handling words, derived from Foam::string.
scalarField cValues_
Constraint values.
void setGlobalSum(const bool useGlobalSum)
Set globalSum variable.
void setConstraintValues(const scalarField &values)
Set constraints derivative.
A class for managing temporary objects.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
virtual scalar meritFunctionDirectionalDerivative()
PtrList< scalarField > constraintDerivatives_
Derivatives of the constraints.
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
SquareMatrix< scalar > outerProd(const scalarField &, const scalarField &)
virtual scalar computeMeritFunction()
bool globalSum_
Whether to use gSum or sum in the inner products.
void setConstraintDeriv(const PtrList< scalarField > &derivs)
Set constraints derivative.
virtual ~updateMethod()=default
Destructor.
virtual void updateOldCorrection(const scalarField &oldCorrection)
Abstract base class for optimisation methods.
virtual void computeCorrection()=0
Return the correction of the design variables.
static autoPtr< updateMethod > New(const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected turbulence model.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
scalarField correction_
Design variables correction.
Mesh data needed to do the Finite Volume discretisation.
bool & initialEtaSet()
Return whether initial eta was set.
void setStep(const scalar eta)
Set step for optimisation methods.
dictionary coeffsDict()
Return optional dictionary with parameters specific to each method.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual void write()
Write useful quantities to files.
scalar objectiveValue_
Objective value.
void setObjectiveValue(const scalar value)
Set constraints derivative.
Macros to ease declaration of run-time selection tables.
scalar globalSum(const scalarField &field)
Compute either global or local sum, based on globalSum flag.
TypeName("updateMethod")
Runtime type information.
const scalarField leftMult(const scalarField &, const SquareMatrix< scalar > &)
scalar eta_
Step multiplying the correction.
SquareMatrix< scalar > inv(SquareMatrix< scalar > A)
void setObjectiveDeriv(const scalarField &derivs)
Set objective derivative.
scalarField cumulativeCorrection_
scalarField objectiveDerivatives_
Derivatives of the objective functions.
word correctionFolder_
Folder storing the corrections to file.
IOdictionary optMethodIODict_
Used to output values useful for continuation runs.