46 constrainedOptimisationMethod,
55 Foam::constraintProjection::constraintProjection
64 coeffsDict().getOrDefault<bool>(
"useCorrection", true)
74 const label
n = objectiveDerivatives_.size();
75 const label m = constraintDerivatives_.size();
80 forAll(constraintDerivatives_, cI)
82 forAll(constraintDerivatives_, cJ)
87 constraintDerivatives_[cI] * constraintDerivatives_[cJ]
96 forAll(constraintDerivatives_, cI)
98 forAll(constraintDerivatives_, cJ)
100 constraintContribution +=
101 constraintDerivatives_[cI]
103 *globalSum(constraintDerivatives_[cJ] * objectiveDerivatives_);
108 nonLinearContribution +=
109 constraintDerivatives_[cI]
117 correction_ = objectiveDerivatives_ - constraintContribution;
118 correction_ *= -eta_;
121 correction_ -= nonLinearContribution;
Abstract base class for optimisation methods supporting constraints. Does not add functionality to up...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
void computeCorrection()
Compute design variables correction.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Mesh data needed to do the Finite Volume discretisation.
SquareMatrix< scalar > scalarSquareMatrix
static constexpr const zero Zero
Global zero (0)