mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@ -175,9 +175,6 @@ void optimisationType::update()
|
|||||||
|
|
||||||
void optimisationType::update(scalarField& direction)
|
void optimisationType::update(scalarField& direction)
|
||||||
{
|
{
|
||||||
// Compute eta if needed
|
|
||||||
computeEta(direction);
|
|
||||||
|
|
||||||
// Multiply with line search step, if necessary
|
// Multiply with line search step, if necessary
|
||||||
scalarField correction(direction);
|
scalarField correction(direction);
|
||||||
if (lineSearch_)
|
if (lineSearch_)
|
||||||
@ -218,6 +215,9 @@ tmp<scalarField> optimisationType::computeDirection()
|
|||||||
scalarField& correction = tcorrection.ref();
|
scalarField& correction = tcorrection.ref();
|
||||||
correction = updateMethod_->returnCorrection();
|
correction = updateMethod_->returnCorrection();
|
||||||
|
|
||||||
|
// Compute eta if needed
|
||||||
|
computeEta(correction);
|
||||||
|
|
||||||
return tcorrection;
|
return tcorrection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -376,7 +376,7 @@ Foam::scalar Foam::updateMethod::computeMeritFunction()
|
|||||||
|
|
||||||
Foam::scalar Foam::updateMethod::meritFunctionDirectionalDerivative()
|
Foam::scalar Foam::updateMethod::meritFunctionDirectionalDerivative()
|
||||||
{
|
{
|
||||||
return sum(objectiveDerivatives_*correction_);
|
return globalSum(objectiveDerivatives_*correction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1828,31 +1828,28 @@ void Foam::NURBS3DVolume::writeCps
|
|||||||
|
|
||||||
void Foam::NURBS3DVolume::writeCpsInDict() const
|
void Foam::NURBS3DVolume::writeCpsInDict() const
|
||||||
{
|
{
|
||||||
if (Pstream::master())
|
IOdictionary cpsDict
|
||||||
{
|
(
|
||||||
IOdictionary cpsDict
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
name_ + "cpsBsplines" + mesh_.time().timeName(),
|
||||||
(
|
mesh_.time().caseConstant(),
|
||||||
name_ + "cpsBsplines" + mesh_.time().timeName(),
|
cpsFolder_,
|
||||||
mesh_.time().caseConstant(),
|
mesh_,
|
||||||
cpsFolder_,
|
IOobject::NO_READ,
|
||||||
mesh_,
|
IOobject::NO_WRITE,
|
||||||
IOobject::NO_READ,
|
false
|
||||||
IOobject::NO_WRITE,
|
)
|
||||||
false
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
cpsDict.add("controlPoints", cps_);
|
cpsDict.add("controlPoints", cps_);
|
||||||
|
|
||||||
// Always write in ASCII, but allow compression
|
// Always write in ASCII, but allow compression
|
||||||
cpsDict.regIOobject::writeObject
|
cpsDict.regIOobject::writeObject
|
||||||
(
|
(
|
||||||
IOstreamOption(IOstream::ASCII, mesh_.time().writeCompression()),
|
IOstreamOption(IOstream::ASCII, mesh_.time().writeCompression()),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user