From 08544446e8c8276ab2f6f756f8b6c38e4d7095e9 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 6 Jun 2023 08:17:52 +0100 Subject: [PATCH] Time, functionObjectList: Refactored to simplify construction and switching-off functionObjects --- .../test/fvMeshStitcher/Test-fvMeshStitcher.C | 5 +- .../passiveParticle/Test-passiveParticle.C | 3 +- .../utilities/mesh/advanced/PDRMesh/PDRMesh.C | 5 +- .../advanced/collapseEdges/collapseEdges.C | 6 +- .../combinePatchFaces/combinePatchFaces.C | 5 +- .../mesh/advanced/modifyMesh/modifyMesh.C | 5 +- .../advanced/refineHexMesh/refineHexMesh.C | 5 +- .../refineWallLayer/refineWallLayer.C | 5 +- .../mesh/advanced/removeFaces/removeFaces.C | 5 +- .../mesh/advanced/splitCells/splitCells.C | 5 +- .../conversion/writeMeshObj/writeMeshObj.C | 3 +- .../generation/extrude2DMesh/extrude2DMesh.C | 7 +- .../generation/snappyHexMesh/snappyHexMesh.C | 3 +- .../mesh/manipulation/attachMesh/attachMesh.C | 5 +- .../mesh/manipulation/autoPatch/autoPatch.C | 5 +- .../createBaffles/createBaffles.C | 3 +- .../createNonConformalCouples.C | 5 +- .../manipulation/createPatch/createPatch.C | 5 +- .../manipulation/mergeBaffles/mergeBaffles.C | 3 +- .../manipulation/mergeMeshes/createTimes.H | 8 +- .../mesh/manipulation/refineMesh/refineMesh.C | 3 +- .../manipulation/renumberMesh/renumberMesh.C | 3 +- .../manipulation/splitBaffles/splitBaffles.C | 5 +- .../mesh/manipulation/splitMesh/splitMesh.C | 5 +- .../splitMeshRegions/splitMeshRegions.C | 5 +- .../mesh/manipulation/stitchMesh/stitchMesh.C | 5 +- .../mesh/manipulation/subsetMesh/subsetMesh.C | 5 +- .../redistributePar/redistributePar.C | 4 +- .../graphics/PVReaders/vtkPVFoam/vtkPVFoam.C | 7 +- .../PVReaders/vtkPVblockMesh/vtkPVblockMesh.C | 7 +- .../temporalInterpolate/temporalInterpolate.C | 5 +- .../surfaceRedistributePar.C | 5 +- src/OpenFOAM/db/Time/Time.C | 237 ++++++++---------- src/OpenFOAM/db/Time/Time.H | 11 +- src/OpenFOAM/db/Time/TimePaths.C | 27 +- src/OpenFOAM/db/Time/TimePaths.H | 27 +- .../functionObjectList/functionObjectList.C | 19 -- .../functionObjectList/functionObjectList.H | 9 - .../include/createTimeNoFunctionObjects.H | 3 + src/OpenFOAM/primitives/hashes/Hash/Hash.H | 3 +- .../edgeMeshFormats/edgeMesh/edgeMeshFormat.C | 6 +- .../edgeMeshFormats/vtk/VTKedgeFormat.C | 4 +- .../extendedEdgeMeshFormat.C | 4 +- .../surfaceFormats/vtk/VTKsurfaceFormat.C | 4 +- .../Test-fvMeshTools/Test-fvMeshTools.C | 5 +- 45 files changed, 205 insertions(+), 309 deletions(-) create mode 100644 src/OpenFOAM/include/createTimeNoFunctionObjects.H diff --git a/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C b/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C index c006d507c4..52d3c6b5d5 100644 --- a/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C +++ b/applications/test/fvMeshStitcher/Test-fvMeshStitcher.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,8 +39,7 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createNamedMesh.H" const bool write = args.optionFound("write"); diff --git a/applications/test/passiveParticle/Test-passiveParticle.C b/applications/test/passiveParticle/Test-passiveParticle.C index 06ab2e2a8d..14fe6aadf4 100644 --- a/applications/test/passiveParticle/Test-passiveParticle.C +++ b/applications/test/passiveParticle/Test-passiveParticle.C @@ -41,9 +41,8 @@ int main(int argc, char *argv[]) { argList::validArgs.append("cloudName"); #include "setRootCase.H" - #include "createTime.H" + #include "createTimeNoFunctionObjects.H" #include "createMesh.H" - runTime.functionObjects().off(); const word cloudName = args[1]; diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index a196c4be92..d14d233e8a 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -563,8 +563,7 @@ int main(int argc, char *argv[]) { #include "addOverwriteOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createMeshNoChangers.H" // Read control dictionary diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index 01b7a85a0f..d6ffb7152b 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -84,9 +84,7 @@ int main(int argc, char *argv[]) #include "addDictOption.H" #include "addOverwriteOption.H" #include "setRootCase.H" - #include "createTime.H" - - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" instantList timeDirs = timeSelector::selectIfPresent(runTime, args); #include "createMeshNoChangers.H" diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index 19fd2f9239..b9f4dd25b6 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -358,8 +358,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index e5d9fba4fe..37025aabcd 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -332,8 +332,7 @@ int main(int argc, char *argv[]) #include "addOverwriteOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C index dbbfa1dafa..46be859401 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C +++ b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,8 +69,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" const bool overwrite = args.optionFound("overwrite"); const bool minSet = args.optionFound("minSet"); diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 50fc73a90a..90de5f1353 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,8 +75,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" Foam::word meshRegionName = polyMesh::defaultRegion; args.optionReadIfPresent("region", meshRegionName); diff --git a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C index 15bf5b6f60..0a8573d1a9 100644 --- a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C +++ b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,8 +59,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" const bool overwrite = args.optionFound("overwrite"); const bool fields = !args.optionFound("noFields"); diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index dd43e5a712..1ad616aa9d 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -545,8 +545,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C index 060427ee46..8d2264e764 100644 --- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C +++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C @@ -420,8 +420,7 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" const bool patchFaces = args.optionFound("patchFaces"); const bool patchEdges = args.optionFound("patchEdges"); diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C index f01a72a615..0b9fba663e 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,11 +125,10 @@ int main(int argc, char *argv[]) ( Time::controlDictName, args.rootPath(), - args.caseName() + args.caseName(), + false ); - runTimeExtruded.functionObjects().off(); - const ExtrudeMode surfaceFormat = ExtrudeModeNames[args[1]]; const bool overwrite = args.optionFound("overwrite"); diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index 37c143b7fa..56168d51e9 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -665,8 +665,7 @@ int main(int argc, char *argv[]) #include "addDictOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" const bool overwrite = args.optionFound("overwrite"); const bool checkGeometry = args.optionFound("checkGeometry"); diff --git a/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C b/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C index 5063f24df7..73f120ab2c 100644 --- a/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C +++ b/applications/utilities/mesh/manipulation/attachMesh/attachMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,8 +44,7 @@ int main(int argc, char *argv[]) argList::noParallel(); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C index 01e5882e4e..915e27be45 100644 --- a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C +++ b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,8 +75,7 @@ int main(int argc, char *argv[]) argList::validArgs.append("feature angle[0-180]"); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index a3aa262cb0..99f5cb7dac 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -361,8 +361,7 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createNamedMesh.H" const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C b/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C index 75a68537a3..0923d64588 100644 --- a/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C +++ b/applications/utilities/mesh/manipulation/createNonConformalCouples/createNonConformalCouples.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,8 +94,7 @@ int main(int argc, char *argv[]) } #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" // Flag to determine whether or not patches are added to fields bool fields; diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index a8780eacc6..7b63050409 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -468,8 +468,7 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" #include "addDictOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" Foam::word meshRegionName = polyMesh::defaultRegion; args.optionReadIfPresent("region", meshRegionName); diff --git a/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C b/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C index f112f1f9ee..087507d909 100644 --- a/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeBaffles/mergeBaffles.C @@ -186,8 +186,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createNamedMesh.H" const bool overwrite = args.optionFound("overwrite"); diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H b/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H index 3cb000ccc2..68abcae67b 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H +++ b/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H @@ -7,9 +7,9 @@ ( Time::controlDictName, masterCasePath, - masterCaseName + masterCaseName, + false ); - runTimeMaster.functionObjects().off(); const fileName addCasePath = addCase.path(); const fileName addCaseName = addCase.name(); @@ -18,6 +18,6 @@ ( Time::controlDictName, addCasePath, - addCaseName + addCaseName, + false ); - runTimeToAdd.functionObjects().off(); diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index a0c5fac125..b25846fa74 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -169,8 +169,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createNamedPolyMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 9c594988b8..e17e71f038 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -619,8 +619,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" // Force linker to include zoltan symbols. This section is only needed since // Zoltan is a static library diff --git a/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C b/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C index 375247022f..4dc9ab81f7 100644 --- a/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C +++ b/applications/utilities/mesh/manipulation/splitBaffles/splitBaffles.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,8 +62,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createNamedMesh.H" const bool overwrite = args.optionFound("overwrite"); diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C index 8965c788d3..28285d4ab6 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C +++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,8 +117,7 @@ int main(int argc, char *argv[]) argList::validArgs.append("slavePatch"); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 513f1887d0..45a2607d29 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -1469,10 +1469,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - - runTime.functionObjects().off(); - + #include "createTimeNoFunctionObjects.H" #include "createNamedMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 74f636dbe5..96f2196e9d 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -236,8 +236,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createNamedMesh.H" const word oldInstance = mesh.pointsInstance(); diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index aaf42ba9d9..e38bd430a3 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C +++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -215,8 +215,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" Foam::word meshRegionName = polyMesh::defaultRegion; args.optionReadIfPresent("region", meshRegionName); diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index b9f7947f4e..b3478ef7b2 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -339,13 +339,11 @@ int main(int argc, char *argv[]) // Make sure we do not use the master-only reading. regIOobject::fileModificationChecking = regIOobject::timeStamp; - #include "createTime.H" + #include "createTimeNoFunctionObjects.H" // Allow override of time instantList times = timeSelector::selectIfPresent(runTime, args); runTime.setTime(times[0], 0); - runTime.functionObjects().off(); - word regionName = polyMesh::defaultRegion; fileName meshSubDir; diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C index e228f905a7..6c7f8167b6 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -348,12 +348,11 @@ Foam::vtkPVFoam::vtkPVFoam ( Time::controlDictName, fileName(fullCasePath.path()), - fileName(fullCasePath.name()) + fileName(fullCasePath.name()), + false ) ); - dbPtr_().functionObjects().off(); - fileNameList configDictFiles = findEtcFiles("paraFoam", false); forAllReverse(configDictFiles, cdfi) { diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/vtkPVblockMesh.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/vtkPVblockMesh.C index c3c0d2b0d6..981db5d0df 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/vtkPVblockMesh.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVblockMesh/vtkPVblockMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -233,12 +233,11 @@ Foam::vtkPVblockMesh::vtkPVblockMesh ( Time::controlDictName, fileName(fullCasePath.path()), - fileName(fullCasePath.name()) + fileName(fullCasePath.name()), + false ) ); - dbPtr_().functionObjects().off(); - updateInfo(); } diff --git a/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C b/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C index 8df313441b..0e65d22b1b 100644 --- a/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C +++ b/applications/utilities/postProcessing/miscellaneous/temporalInterpolate/temporalInterpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -202,8 +202,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" HashSet selectedFields; if (args.optionFound("fields")) diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C index d8bd5ac302..f30f7bcdbb 100644 --- a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C +++ b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,8 +109,7 @@ int main(int argc, char *argv[]) ); #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" const fileName surfFileName = args[1]; const word distType = args[2]; diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index ea24eaad5d..bea80694c3 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -332,19 +332,16 @@ void Foam::Time::setControls() Foam::Time::Time ( const word& controlDictName, - const fileName& rootPath, - const fileName& caseName, - const word& systemName, - const word& constantName, + const argList& args, const bool enableFunctionObjects ) : TimePaths ( - rootPath, - caseName, - systemName, - constantName + args.parRunControl().parRun(), + args.rootPath(), + args.globalCaseName(), + args.caseName() ), objectRegistry(*this), @@ -387,6 +384,105 @@ Foam::Time::Time graphFormat_("raw"), cacheTemporaryObjects_(true), + functionObjects_ + ( + *this, + enableFunctionObjects + ? argList::validOptions.found("withFunctionObjects") + ? args.optionFound("withFunctionObjects") + : !args.optionFound("noFunctionObjects") + : false + ) +{ + libs.open(controlDict_, "libs"); + + // Explicitly set read flags on objectRegistry so anything constructed + // from it reads as well (e.g. fvSolution). + readOpt() = IOobject::MUST_READ_IF_MODIFIED; + + if (args.options().found("case")) + { + const wordList switchSets + ( + { + "InfoSwitches", + "OptimisationSwitches", + "DebugSwitches", + "DimensionedConstants", + "DimensionSets" + } + ); + + forAll(switchSets, i) + { + if (controlDict_.found(switchSets[i])) + { + IOWarningInFunction(controlDict_) + << switchSets[i] + << " in system/controlDict are only processed if " + << args.executable() << " is run in the " + << args.path() << " directory" << endl; + } + } + } + + setControls(); + + // Add a watch on the controlDict file after runTimeModifiable_ is set + controlDict_.addWatch(); +} + + +Foam::Time::Time +( + const word& controlDictName, + const fileName& rootPath, + const fileName& caseName, + const bool enableFunctionObjects +) +: + TimePaths(rootPath, caseName), + + objectRegistry(*this), + + runTimeModifiable_(false), + + controlDict_ + ( + IOobject + ( + controlDictName, + system(), + *this, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) + ), + + startTimeIndex_(0), + startTime_(0), + endTime_(0), + beginTime_(startTime_), + + userTime_(userTimes::userTime::New(controlDict_)), + + stopAt_(stopAtControl::endTime), + writeControl_(writeControl::timeStep), + writeInterval_(great), + purgeWrite_(0), + writeOnce_(false), + + subCycling_(false), + + sigWriteNow_(writeInfoHeader, *this), + sigStopAtWriteNow_(writeInfoHeader, *this), + + writeFormat_(IOstream::ASCII), + writeVersion_(IOstream::currentVersion), + writeCompression_(IOstream::UNCOMPRESSED), + graphFormat_("raw"), + cacheTemporaryObjects_(true), + functionObjects_(*this, enableFunctionObjects) { libs.open(controlDict_, "libs"); @@ -402,128 +498,15 @@ Foam::Time::Time } -Foam::Time::Time -( - const word& controlDictName, - const argList& args, - const word& systemName, - const word& constantName -) -: - TimePaths - ( - args.parRunControl().parRun(), - args.rootPath(), - args.globalCaseName(), - args.caseName(), - systemName, - constantName - ), - - objectRegistry(*this), - - runTimeModifiable_(false), - - controlDict_ - ( - IOobject - ( - controlDictName, - system(), - *this, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ) - ), - - startTimeIndex_(0), - startTime_(0), - endTime_(0), - beginTime_(startTime_), - - userTime_(userTimes::userTime::New(controlDict_)), - - stopAt_(stopAtControl::endTime), - writeControl_(writeControl::timeStep), - writeInterval_(great), - purgeWrite_(0), - writeOnce_(false), - - subCycling_(false), - - sigWriteNow_(writeInfoHeader, *this), - sigStopAtWriteNow_(writeInfoHeader, *this), - - writeFormat_(IOstream::ASCII), - writeVersion_(IOstream::currentVersion), - writeCompression_(IOstream::UNCOMPRESSED), - graphFormat_("raw"), - cacheTemporaryObjects_(true), - - functionObjects_ - ( - *this, - argList::validOptions.found("withFunctionObjects") - ? args.optionFound("withFunctionObjects") - : !args.optionFound("noFunctionObjects") - ) -{ - libs.open(controlDict_, "libs"); - - // Explicitly set read flags on objectRegistry so anything constructed - // from it reads as well (e.g. fvSolution). - readOpt() = IOobject::MUST_READ_IF_MODIFIED; - - if (args.options().found("case")) - { - const wordList switchSets - ( - { - "InfoSwitches", - "OptimisationSwitches", - "DebugSwitches", - "DimensionedConstants", - "DimensionSets" - } - ); - - forAll(switchSets, i) - { - if (controlDict_.found(switchSets[i])) - { - IOWarningInFunction(controlDict_) - << switchSets[i] - << " in system/controlDict are only processed if " - << args.executable() << " is run in the " - << args.path() << " directory" << endl; - } - } - } - - setControls(); - - // Add a watch on the controlDict file after runTimeModifiable_ is set - controlDict_.addWatch(); -} - - Foam::Time::Time ( const dictionary& dict, const fileName& rootPath, const fileName& caseName, - const word& systemName, - const word& constantName, const bool enableFunctionObjects ) : - TimePaths - ( - rootPath, - caseName, - systemName, - constantName - ), + TimePaths(rootPath, caseName), objectRegistry(*this), @@ -585,18 +568,10 @@ Foam::Time::Time ( const fileName& rootPath, const fileName& caseName, - const word& systemName, - const word& constantName, const bool enableFunctionObjects ) : - TimePaths - ( - rootPath, - caseName, - systemName, - constantName - ), + TimePaths(rootPath, caseName), objectRegistry(*this), diff --git a/src/OpenFOAM/db/Time/Time.H b/src/OpenFOAM/db/Time/Time.H index de581a6d36..11ea6dcb47 100644 --- a/src/OpenFOAM/db/Time/Time.H +++ b/src/OpenFOAM/db/Time/Time.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -215,8 +215,7 @@ public: ( const word& name, const argList& args, - const word& systemName = "system", - const word& constantName = "constant" + const bool enableFunctionObjects = true ); //- Construct given name of dictionary to read, rootPath and casePath @@ -225,8 +224,6 @@ public: const word& name, const fileName& rootPath, const fileName& caseName, - const word& systemName = "system", - const word& constantName = "constant", const bool enableFunctionObjects = true ); @@ -236,8 +233,6 @@ public: const dictionary& dict, const fileName& rootPath, const fileName& caseName, - const word& systemName = "system", - const word& constantName = "constant", const bool enableFunctionObjects = true ); @@ -246,8 +241,6 @@ public: ( const fileName& rootPath, const fileName& caseName, - const word& systemName = "system", - const word& constantName = "constant", const bool enableFunctionObjects = true ); diff --git a/src/OpenFOAM/db/Time/TimePaths.C b/src/OpenFOAM/db/Time/TimePaths.C index b05bc0322b..523cc027a0 100644 --- a/src/OpenFOAM/db/Time/TimePaths.C +++ b/src/OpenFOAM/db/Time/TimePaths.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,21 +26,26 @@ License #include "TimePaths.H" #include "IOstreams.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + const word TimePaths::systemName = "system"; + const word TimePaths::constantName = "constant"; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::TimePaths::TimePaths ( const fileName& rootPath, - const fileName& caseName, - const word& systemName, - const word& constantName + const fileName& caseName ) : processorCase_(false), rootPath_(rootPath), - case_(caseName), - system_(systemName), - constant_(constantName) + case_(caseName) { // Find out from case name whether a processor directory std::string::size_type pos = caseName.find("processor"); @@ -69,17 +74,13 @@ Foam::TimePaths::TimePaths const bool processorCase, const fileName& rootPath, const fileName& globalCaseName, - const fileName& caseName, - const word& systemName, - const word& constantName + const fileName& caseName ) : processorCase_(processorCase), rootPath_(rootPath), globalCaseName_(globalCaseName), - case_(caseName), - system_(systemName), - constant_(constantName) + case_(caseName) { if (!processorCase) { diff --git a/src/OpenFOAM/db/Time/TimePaths.H b/src/OpenFOAM/db/Time/TimePaths.H index 65c4536a67..f124492025 100644 --- a/src/OpenFOAM/db/Time/TimePaths.H +++ b/src/OpenFOAM/db/Time/TimePaths.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,21 +54,22 @@ class TimePaths const fileName rootPath_; fileName globalCaseName_; const fileName case_; - const word system_; - const word constant_; - public: + // Static Data + + static const word systemName; + static const word constantName; + + // Constructors //- Construct given database name, rootPath and casePath TimePaths ( const fileName& rootPath, - const fileName& caseName, - const word& systemName, - const word& constantName + const fileName& caseName ); @@ -78,9 +79,7 @@ public: const bool processorCase, const fileName& rootPath, const fileName& globalCaseName, - const fileName& caseName, - const word& systemName, - const word& constantName + const fileName& caseName ); @@ -111,9 +110,9 @@ public: } //- Return system name - const word& system() const + static const word& system() { - return system_; + return systemName; } //- Return system name for the case @@ -121,9 +120,9 @@ public: fileName caseSystem() const; //- Return constant name - const word& constant() const + static const word& constant() { - return constant_; + return constantName; } //- Return constant name for the case diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index 488d07e3ac..d67b6804ab 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -215,25 +215,6 @@ Foam::label Foam::functionObjectList::findObjectID(const word& name) const } -void Foam::functionObjectList::on() -{ - execution_ = true; -} - - -void Foam::functionObjectList::off() -{ - // For safety, also force a read() when execution is turned back on - updated_ = execution_ = false; -} - - -bool Foam::functionObjectList::status() const -{ - return execution_; -} - - bool Foam::functionObjectList::start() { bool ok = read(); diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H index 0f7ab3fb17..4ce06aaa63 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H @@ -164,15 +164,6 @@ public: //- Read and set the function objects if their data have changed bool read(); - //- Switch the function objects on - void on(); - - //- Switch the function objects off - void off(); - - //- Return the execution status (on/off) of the function objects - bool status() const; - //- Called at the start of the time-loop bool start(); diff --git a/src/OpenFOAM/include/createTimeNoFunctionObjects.H b/src/OpenFOAM/include/createTimeNoFunctionObjects.H new file mode 100644 index 0000000000..2cae6a936e --- /dev/null +++ b/src/OpenFOAM/include/createTimeNoFunctionObjects.H @@ -0,0 +1,3 @@ +Foam::Info<< "Create time\n" << Foam::endl; + +Foam::Time runTime(Foam::Time::controlDictName, args, false); diff --git a/src/OpenFOAM/primitives/hashes/Hash/Hash.H b/src/OpenFOAM/primitives/hashes/Hash/Hash.H index e6bc0c9160..e76a7a6690 100644 --- a/src/OpenFOAM/primitives/hashes/Hash/Hash.H +++ b/src/OpenFOAM/primitives/hashes/Hash/Hash.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -220,7 +220,6 @@ public: { return Hash()(long(p)); } - }; diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/edgeMesh/edgeMeshFormat.C b/src/meshTools/edgeMesh/edgeMeshFormats/edgeMesh/edgeMeshFormat.C index 6447b8ca02..347afe2de4 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/edgeMesh/edgeMeshFormat.C +++ b/src/meshTools/edgeMesh/edgeMeshFormats/edgeMesh/edgeMeshFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,8 +59,6 @@ bool Foam::fileFormats::edgeMeshFormat::read ( ".", // rootPath, ".", // caseName, - "system", // systemName, - "constant", // constantName, false // enableFunctionObjects ); @@ -166,8 +164,6 @@ void Foam::fileFormats::edgeMeshFormat::write ( ".", // rootPath, ".", // caseName, - "system", // systemName, - "constant", // constantName, false // enableFunctionObjects ); diff --git a/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C b/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C index 679f689ac6..eb9943699b 100644 --- a/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C +++ b/src/meshTools/edgeMesh/edgeMeshFormats/vtk/VTKedgeFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,8 +105,6 @@ bool Foam::fileFormats::VTKedgeFormat::read ( "dummyRoot", "dummyCase", - "system", - "constant", false // enableFunctionObjects ); diff --git a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshFormats/extendedEdgeMeshFormat/extendedEdgeMeshFormat.C b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshFormats/extendedEdgeMeshFormat/extendedEdgeMeshFormat.C index 82d4036338..8d12f821f9 100644 --- a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshFormats/extendedEdgeMeshFormat/extendedEdgeMeshFormat.C +++ b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMeshFormats/extendedEdgeMeshFormat/extendedEdgeMeshFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,8 +57,6 @@ bool Foam::fileFormats::extendedEdgeMeshFormat::read ( ".", // rootPath, ".", // caseName, - "system", // systemName, - "constant", // constantName, false // enableFunctionObjects ); diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C index f81e49f56c..258961843b 100644 --- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,8 +90,6 @@ bool Foam::fileFormats::VTKsurfaceFormat::read ( "dummyRoot", "dummyCase", - "system", - "constant", false // enableFunctionObjects ); diff --git a/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C b/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C index 9a1c864db2..1b8724fa13 100644 --- a/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C +++ b/test/fvMeshTools/Test-fvMeshTools/Test-fvMeshTools.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,8 +49,7 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" #include "setRootCase.H" - #include "createTime.H" - runTime.functionObjects().off(); + #include "createTimeNoFunctionObjects.H" #include "createNamedMesh.H" // Read objects in time directory