functionObjectList: Moved the functions entry from controlDict into a functions file
for consistency with fvModels and fvConstraints, to simplify code and case maintenance and to avoid the potentially complex functions entries being unnecessarily parsed by utilities for which functionObject evaluation is disabled. The functions entry in controlDict is still read if the functions file is not present for backward-compatibility, but it is advisable to migrate cases to use the new functions file.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -279,19 +279,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// Externally stored dictionary for functionObjectList
|
||||
// if not constructed from runTime
|
||||
dictionary functionsControlDict("controlDict");
|
||||
|
||||
// Construct functionObjectList
|
||||
autoPtr<functionObjectList> functionsPtr
|
||||
(
|
||||
functionObjectList::New
|
||||
(
|
||||
args,
|
||||
runTime,
|
||||
functionsControlDict
|
||||
)
|
||||
functionObjectList::New(args, runTime)
|
||||
);
|
||||
|
||||
forAll(timeDirs, timei)
|
||||
@ -303,12 +294,7 @@ int main(int argc, char *argv[])
|
||||
if (mesh.readUpdate() != fvMesh::UNCHANGED)
|
||||
{
|
||||
// Update functionObjectList if mesh changes
|
||||
functionsPtr = functionObjectList::New
|
||||
(
|
||||
args,
|
||||
runTime,
|
||||
functionsControlDict
|
||||
);
|
||||
functionsPtr = functionObjectList::New(args, runTime);
|
||||
}
|
||||
|
||||
FatalIOError.throwExceptions();
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2018-2024 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -119,7 +119,7 @@ listArgs () {
|
||||
|
||||
# Prioritise suggestion locations
|
||||
_tests="\
|
||||
caseDicts/postProcessing/ \
|
||||
caseDicts/functions/ \
|
||||
caseDicts/preProcessing/ \
|
||||
caseDicts/general/ \
|
||||
caseDicts/mesh/ \
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2018-2024 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -163,7 +163,7 @@ listArgs() {
|
||||
_tests="\
|
||||
fields/fvPatchFields/ \
|
||||
fvMesh/fvPatches/ \
|
||||
caseDicts/postProcessing/"
|
||||
caseDicts/functions/"
|
||||
|
||||
_n=0
|
||||
for _t in $_tests
|
||||
|
||||
@ -10,7 +10,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"
|
||||
#includeEtc "caseDicts/functions/fields/fieldAverage.cfg"
|
||||
|
||||
mean yes;
|
||||
prime2Mean no;
|
||||
@ -11,7 +11,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/fields/randomise.cfg"
|
||||
#includeEtc "caseDicts/functions/fields/randomise.cfg"
|
||||
|
||||
field <fieldName>;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/forces/forces.cfg"
|
||||
#includeEtc "caseDicts/functions/forces/forces.cfg"
|
||||
|
||||
type forceCoeffs;
|
||||
|
||||
@ -12,7 +12,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg"
|
||||
#includeEtc "caseDicts/functions/forces/forceCoeffs.cfg"
|
||||
|
||||
patches (<patchNames>); // Names of patches on which to calculate forces
|
||||
|
||||
@ -12,7 +12,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/forces/forceCoeffsIncompressible.cfg"
|
||||
#includeEtc "caseDicts/functions/forces/forceCoeffsIncompressible.cfg"
|
||||
|
||||
patches (<patchNames>); // Names of patches on which to calculate forces
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg"
|
||||
#includeEtc "caseDicts/functions/forces/forceCoeffs.cfg"
|
||||
|
||||
rho rhoInf;
|
||||
rhoInf 1; // Redundant, but currently read in
|
||||
@ -11,7 +11,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/forces/forces.cfg"
|
||||
#includeEtc "caseDicts/functions/forces/forces.cfg"
|
||||
|
||||
patches (<patchNames>); // Names of patches on which to calculate forces
|
||||
|
||||
@ -12,7 +12,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/forces/forcesIncompressible.cfg"
|
||||
#includeEtc "caseDicts/functions/forces/forcesIncompressible.cfg"
|
||||
|
||||
patches (<patchNames>); // Names of patches on which to calculate forces
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/forces/forces.cfg"
|
||||
#includeEtc "caseDicts/functions/forces/forces.cfg"
|
||||
|
||||
rho rhoInf;
|
||||
|
||||
@ -21,6 +21,6 @@ axis distance; // The independent variable of the graph. Can be "x",
|
||||
// "y", "z", "xyz" (all coordinates written out), or
|
||||
// "distance" (from the start point).
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graphCell.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graphCell.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graph.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graph.cfg"
|
||||
|
||||
sets
|
||||
(
|
||||
@ -21,6 +21,6 @@ axis distance; // The independent variable of the graph. Can be "x",
|
||||
// "y", "z", "xyz" (all coordinates written out), or
|
||||
// "distance" (from the start point).
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graphCellFace.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graphCellFace.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graph.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graph.cfg"
|
||||
|
||||
sets
|
||||
(
|
||||
@ -21,6 +21,6 @@ axis distance; // The independent variable of the graph. Can be "x",
|
||||
// "y", "z", "xyz" (all coordinates written out), or
|
||||
// "distance" (from the start point).
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graphFace.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graphFace.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graph.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graph.cfg"
|
||||
|
||||
sets
|
||||
(
|
||||
@ -27,6 +27,6 @@ fields (<fieldsNames>); // Fields to average
|
||||
//weightField <weightFieldName>; // Field or fields with which to weight
|
||||
//weightFields (<weightFieldNames>); // the average
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graphLayerAverage.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graphLayerAverage.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -32,6 +32,6 @@ axis default; // The independent variable of the graph. Can be
|
||||
|
||||
fields (<fieldNames>);
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graphPatchCutLayerAverage.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graphPatchCutLayerAverage.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -22,6 +22,6 @@ axis distance; // The independent variable of the graph. Can be "x",
|
||||
// "y", "z", "xyz" (all coordinates written out), or
|
||||
// "distance" (from the start point).
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graphUniform.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graphUniform.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/graphs/graph.cfg"
|
||||
#includeEtc "caseDicts/functions/graphs/graph.cfg"
|
||||
|
||||
sets
|
||||
(
|
||||
@ -12,7 +12,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg"
|
||||
#includeEtc "caseDicts/functions/numerical/residuals.cfg"
|
||||
|
||||
fields (<fieldNames>);
|
||||
|
||||
@ -11,7 +11,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/pressure/staticPressureIncompressible.cfg"
|
||||
#includeEtc "caseDicts/functions/pressure/staticPressureIncompressible.cfg"
|
||||
|
||||
rhoInf <rhoInf>; // Density with which to scale the kinematic pressure
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/pressure/pressure.cfg"
|
||||
#includeEtc "caseDicts/functions/pressure/pressure.cfg"
|
||||
|
||||
calcTotal no;
|
||||
calcCoeff no;
|
||||
@ -11,6 +11,6 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/pressure/totalPressureCompressible.cfg"
|
||||
#includeEtc "caseDicts/functions/pressure/totalPressureCompressible.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/pressure/pressure.cfg"
|
||||
#includeEtc "caseDicts/functions/pressure/pressure.cfg"
|
||||
|
||||
calcTotal yes;
|
||||
calcCoeff no;
|
||||
@ -11,7 +11,7 @@ Description
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/pressure/totalPressureIncompressible.cfg"
|
||||
#includeEtc "caseDicts/functions/pressure/totalPressureIncompressible.cfg"
|
||||
|
||||
rhoInf <rhoInf>; // Density with which to scale the kinematic pressure
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/pressure/pressure.cfg"
|
||||
#includeEtc "caseDicts/functions/pressure/pressure.cfg"
|
||||
|
||||
calcTotal yes;
|
||||
calcCoeff no;
|
||||
@ -18,6 +18,6 @@ patches (".*");
|
||||
|
||||
fields (<fieldNames>);
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/probes/boundaryProbes.cfg"
|
||||
#includeEtc "caseDicts/functions/probes/boundaryProbes.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -19,6 +19,6 @@ points (<points>);
|
||||
|
||||
alpha <alphaName>;
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/probes/interfaceHeight.cfg"
|
||||
#includeEtc "caseDicts/functions/probes/interfaceHeight.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -16,6 +16,6 @@ fields (<fieldNames>);
|
||||
|
||||
ordered no;
|
||||
|
||||
#includeEtc "caseDicts/postProcessing/probes/internalProbes.cfg"
|
||||
#includeEtc "caseDicts/functions/probes/internalProbes.cfg"
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user