46 constrainedOptimisationMethod,
55 Foam::constraintProjection::constraintProjection
60 const label nConstraints,
66 useCorrection_(coeffsDict(
type).getOrDefault<bool>(
"useCorrection", true)),
67 delta_(coeffsDict(
type).getOrDefault<scalar>(
"delta", 0.1))
101 constraintContribution +=
109 nonLinearContribution +=
134 return objectiveValue_ + delta_*
sum(
mag(cValues_));
bool useCorrection_
Correct for non-linearities.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
void size(const label n)
Older name for setAddressableSize.
virtual scalar computeMeritFunction()
Compute merit function. Could be different than the objective in the presence of constraints.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
scalarField cValues_
Constraint values.
Abstract base class for optimisation methods supporting constraints. Does not add functionality to up...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Abstract base class for optimisation methods.
void computeCorrection()
Compute design variables correction.
Macros for easy insertion into run-time selection tables.
PtrList< scalarField > constraintDerivatives_
Derivatives of the constraints.
scalar eta_
Step multiplying the correction.
#define forAll(list, i)
Loop across all elements in list.
const labelList & activeDesignVars_
Map to active design variables.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
SquareMatrix< scalar > inv(SquareMatrix< scalar > A)
scalar globalSum(const scalarField &field)
Compute either global or local sum, based on globalSum flag.
defineTypeNameAndDebug(combustionModel, 0)
scalarField objectiveDerivatives_
Derivatives of the objective functions.
Mesh data needed to do the Finite Volume discretisation.
scalarField correction_
Design variables correction.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
SquareMatrix< scalar > scalarSquareMatrix
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)