Merge branch 'fix-function-objects-in-optimisation' into 'develop'
FIX: functions objects in optimisation See merge request Development/openfoam!654
This commit is contained in:
commit
f88e06cac2
@ -107,7 +107,8 @@ Foam::simple::simple
|
||||
incoVars_(allocateVars()),
|
||||
MRF_(mesh, word(useSolverNameForFields() ? solverName_ : word::null)),
|
||||
cumulativeContErr_(Zero),
|
||||
objectives_()
|
||||
objectives_(),
|
||||
allowFunctionObjects_(dict.getOrDefault("allowFunctionObjects", false))
|
||||
{
|
||||
addExtraSchemes();
|
||||
setRefCell
|
||||
@ -246,7 +247,7 @@ void Foam::simple::postIter()
|
||||
{
|
||||
// Execute function objects in optimisation cases
|
||||
// Disabled in Time since we are subsycling
|
||||
if (managerType_ == "steadyOptimisation")
|
||||
if (managerType_ == "steadyOptimisation" && allowFunctionObjects_)
|
||||
{
|
||||
const_cast<Time&>(mesh_.time()).functionObjects().execute(false);
|
||||
}
|
||||
|
@ -86,6 +86,12 @@ protected:
|
||||
//- List of objectives related to this primal solver
|
||||
UPtrList<objective> objectives_;
|
||||
|
||||
//- Allow the execution of function objects in optimisation mode.
|
||||
// Depending on the functions used and the setup, this might lead
|
||||
// to a high amount of data written to the hard drive.
|
||||
// WIP
|
||||
bool allowFunctionObjects_;
|
||||
|
||||
|
||||
//- Protected Member Functions
|
||||
|
||||
|
@ -44,16 +44,5 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
{
|
||||
yPlus
|
||||
{
|
||||
type yPlus;
|
||||
libs ( fieldFunctionObjects );
|
||||
writeFields yes;
|
||||
writeControl writeTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -44,16 +44,5 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
{
|
||||
yPlus
|
||||
{
|
||||
type yPlus;
|
||||
libs (fieldFunctionObjects);
|
||||
writeFields yes;
|
||||
writeControl writeTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -44,16 +44,5 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
{
|
||||
yPlus
|
||||
{
|
||||
type yPlus;
|
||||
libs (fieldFunctionObjects);
|
||||
writeFields yes;
|
||||
writeControl writeTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -44,15 +44,5 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
{
|
||||
yPlus
|
||||
{
|
||||
type yPlus;
|
||||
libs (fieldFunctionObjects);
|
||||
writeFields yes;
|
||||
writeControl writeTime;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -44,15 +44,5 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
{
|
||||
yPlus
|
||||
{
|
||||
type yPlus;
|
||||
libs (fieldFunctionObjects);
|
||||
writeFields yes;
|
||||
writeControl writeTime;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -44,15 +44,5 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
{
|
||||
// yPlus
|
||||
// {
|
||||
// type yPlus;
|
||||
// libs ("libfieldFunctionObjects.so");
|
||||
// writeFields yes;
|
||||
// writeControl writeTime;
|
||||
// }
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
Loading…
Reference in New Issue
Block a user