Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Andrew Heather
2020-12-11 17:42:29 +00:00
3 changed files with 23 additions and 26 deletions

View File

@ -175,9 +175,6 @@ void optimisationType::update()
void optimisationType::update(scalarField& direction)
{
// Compute eta if needed
computeEta(direction);
// Multiply with line search step, if necessary
scalarField correction(direction);
if (lineSearch_)
@ -218,6 +215,9 @@ tmp<scalarField> optimisationType::computeDirection()
scalarField& correction = tcorrection.ref();
correction = updateMethod_->returnCorrection();
// Compute eta if needed
computeEta(correction);
return tcorrection;
}

View File

@ -376,7 +376,7 @@ Foam::scalar Foam::updateMethod::computeMeritFunction()
Foam::scalar Foam::updateMethod::meritFunctionDirectionalDerivative()
{
return sum(objectiveDerivatives_*correction_);
return globalSum(objectiveDerivatives_*correction_);
}

View File

@ -1828,8 +1828,6 @@ void Foam::NURBS3DVolume::writeCps
void Foam::NURBS3DVolume::writeCpsInDict() const
{
if (Pstream::master())
{
IOdictionary cpsDict
(
IOobject
@ -1852,7 +1850,6 @@ void Foam::NURBS3DVolume::writeCpsInDict() const
IOstreamOption(IOstream::ASCII, mesh_.time().writeCompression()),
true
);
}
}