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;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Abstract base class for optimisation methods supporting constraints. Does not add functionality to up...
Update design variables using Rosen's projection method.
void computeCorrection()
Compute design variables correction.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
Abstract base class for optimisation methods.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static constexpr const zero Zero
Global zero (0)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
#define forAll(list, i)
Loop across all elements in list.