From c51a2b0f63840d3c3fd3a0fa9cdf8cefe544a355 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 2 Jun 2010 09:48:07 +0100 Subject: [PATCH] ENH: have MUST_READ_IF_MODIFIED on IOdictionary construction --- TODO | 91 ++----------------- .../DNS/dnsFoam/readTransportProperties.H | 2 +- .../DNS/dnsFoam/readTurbulenceProperties.H | 2 +- .../basic/laplacianFoam/createFields.H | 2 +- .../basic/scalarTransportFoam/createFields.H | 2 +- .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C | 2 +- .../solvers/combustion/PDRFoam/createFields.H | 2 +- .../PDRFoam/readCombustionProperties.H | 2 +- .../XiFoam/readCombustionProperties.H | 2 +- .../readCombustionProperties.H | 2 +- .../combustion/fireFoam/createFields.H | 2 +- .../reactingFoam/readChemistryProperties.H | 2 +- .../rhoReactingFoam/readChemistryProperties.H | 2 +- .../readThermophysicalProperties.H | 2 +- .../readThermodynamicProperties.H | 2 +- .../readThermodynamicProperties.H | 2 +- .../readThermodynamicProperties.H | 2 +- .../sonicDyMFoam/readTransportProperties.H | 2 +- .../readThermodynamicProperties.H | 2 +- .../sonicLiquidFoam/readTransportProperties.H | 2 +- .../readmdEquilibrationDict.H | 2 +- .../electrostaticFoam/createFields.H | 2 +- .../magneticFoam/createFields.H | 2 +- .../electromagnetics/mhdFoam/createFields.H | 2 +- .../financial/financialFoam/createFields.H | 2 +- .../regionProperties/regionProperties.C | 2 +- .../boundaryFoam/createFields.H | 2 +- .../channelFoam/readTransportProperties.H | 2 +- .../incompressible/icoFoam/createFields.H | 2 +- .../readGravitationalAcceleration.H | 2 +- .../readChemistryProperties.H | 2 +- .../createFields.H | 2 +- .../readChemistryProperties.H | 2 +- .../reactingParcelFilmFoam/createFields.H | 2 +- .../readChemistryProperties.H | 2 +- .../readChemistryProperties.H | 2 +- .../multiphase/bubbleFoam/createFields.H | 2 +- .../bubbleFoam/createRASTurbulence.H | 2 +- .../readThermodynamicProperties.H | 2 +- .../phaseChangeTwoPhaseMixtureNew.C | 2 +- .../multiphase/settlingFoam/createFields.H | 4 +- .../twoPhaseEulerFoam/createFields.H | 4 +- .../kineticTheoryModel/kineticTheoryModel.C | 2 +- .../twoPhaseEulerFoam/readPPProperties.H | 2 +- .../readMechanicalProperties.H | 2 +- .../readThermalProperties.H | 2 +- applications/test/LduMatrix/createFields.H | 2 +- applications/test/dataEntry/testDataEntry.C | 2 +- .../fvSolutionCombine/fvSolutionCombine.C | 2 +- .../estimateScalarError/estimateScalarError.C | 2 +- .../icoErrorEstimate/icoErrorEstimate.C | 2 +- .../icoMomentError/icoMomentError.C | 2 +- .../momentScalarError/momentScalarError.C | 2 +- .../advanced/autoRefineMesh/autoRefineMesh.C | 4 +- .../combinePatchFaces/combinePatchFaces.C | 2 +- .../mesh/advanced/modifyMesh/modifyMesh.C | 2 +- .../mesh/advanced/selectCells/edgeStats.C | 2 +- .../mesh/advanced/selectCells/selectCells.C | 2 +- .../conversion/foamToStarMesh/getTimeIndex.H | 2 +- .../conversion/foamToSurface/getTimeIndex.H | 2 +- .../mesh/generation/blockMesh/blockMeshApp.C | 4 +- .../mesh/generation/extrudeMesh/extrudeMesh.C | 2 +- .../generation/snappyHexMesh/snappyHexMesh.C | 4 +- .../manipulation/createPatch/createPatch.C | 2 +- .../manipulation/mirrorMesh/mirrorFvMesh.C | 2 +- .../manipulation/mirrorMesh/readMirrorDict.H | 2 +- .../mesh/manipulation/refineMesh/refineMesh.C | 2 +- .../manipulation/renumberMesh/renumberMesh.C | 2 +- .../mesh/manipulation/stitchMesh/stitchMesh.C | 2 +- .../mesh/manipulation/topoSet/topoSet.C | 4 +- .../decomposePar/decomposePar.C | 2 +- .../decomposePar/domainDecomposition.C | 2 +- .../redistributeMeshPar/redistributeMeshPar.C | 2 +- .../foamDataToFluent/foamDataToFluent.C | 2 +- .../foamToEnsightParts/getTimeIndex.H | 2 +- .../foamToGMV/readConversionProperties.H | 2 +- .../PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C | 2 +- .../vtkPV3blockMesh/vtkPV3blockMesh.C | 2 +- .../fieldview9Reader/readerDatabase.C | 2 +- .../lagrangian/particleTracks/createFields.H | 2 +- .../execFlowFunctionObjects.C | 14 +-- .../miscellaneous/pdfPlot/createFields.H | 2 +- .../miscellaneous/postChannel/postChannel.C | 2 +- .../postChannel/readTransportProperties.H | 2 +- .../postProcessing/velocityField/Mach/Mach.C | 2 +- .../Mach/readThermodynamicProperties.H | 2 +- .../postProcessing/velocityField/Pe/Pe.C | 8 +- .../preProcessing/boxTurb/readBoxTurbDict.H | 2 +- .../changeDictionary/changeDictionary.C | 4 +- .../dsmcInitialise/dsmcInitialise.C | 2 +- .../preProcessing/engineSwirl/createFields.H | 2 +- .../foamUpgradeCyclics/foamUpgradeCyclics.C | 2 +- .../foamUpgradeFvSolution.C | 2 +- .../preProcessing/mapFields/mapFields.C | 10 +- .../preProcessing/mdInitialise/mdInitialise.C | 2 +- .../preProcessing/setFields/setFields.C | 2 +- .../wallFunctionTable/wallFunctionTableApp.C | 2 +- .../surfaceMeshExport/surfaceMeshExport.C | 2 +- .../equilibriumCO/equilibriumCO.C | 2 +- src/OSspecific/POSIX/fileMonitor.C | 35 ++++++- src/OpenFOAM/db/IOobject/IOobject.C | 6 +- src/OpenFOAM/db/IOobject/IOobject.H | 12 +++ src/OpenFOAM/db/IOobject/IOobjectReadHeader.C | 4 +- src/OpenFOAM/db/IOobjects/IOField/IOField.C | 58 +++++++++++- src/OpenFOAM/db/IOobjects/IOList/IOList.C | 56 +++++++++++- src/OpenFOAM/db/IOobjects/IOMap/IOMap.C | 20 +++- .../db/IOobjects/IOPtrList/IOPtrList.C | 20 +++- .../db/IOobjects/IOdictionary/IOdictionary.C | 34 ++++++- src/OpenFOAM/db/Time/Time.C | 47 +++++++++- src/OpenFOAM/db/Time/Time.H | 32 ++++++- src/OpenFOAM/db/Time/TimeIO.C | 44 +++++---- src/OpenFOAM/db/Time/findInstance.C | 8 +- .../IOOutputFilter/IOOutputFilter.H | 2 +- .../db/objectRegistry/objectRegistry.C | 4 +- .../db/objectRegistry/objectRegistry.H | 1 - src/OpenFOAM/db/regIOobject/regIOobject.C | 34 ++++++- src/OpenFOAM/db/regIOobject/regIOobject.H | 15 ++- src/OpenFOAM/db/regIOobject/regIOobjectI.H | 12 +++ src/OpenFOAM/db/regIOobject/regIOobjectRead.C | 71 +++++++-------- .../db/regIOobject/regIOobjectWrite.C | 4 +- .../GeometricField/GeometricField.C | 8 +- src/OpenFOAM/matrices/solution/solution.C | 2 +- src/OpenFOAM/matrices/tolerances/tolerances.C | 2 +- .../polyBoundaryMesh/polyBoundaryMesh.C | 21 ++++- .../meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C | 15 +++ .../dynamicFvMesh/dynamicFvMeshNew.C | 2 +- .../dynamicInkJetFvMesh/dynamicInkJetFvMesh.C | 5 +- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 4 +- .../solidBodyMotionFvMesh.C | 5 +- src/dynamicMesh/motionSolver/motionSolver.C | 4 +- .../polyTopoChange/refinementHistory.C | 38 ++++++++ .../polyTopoChanger/polyTopoChanger.C | 10 ++ .../featureEdgeMesh/featureEdgeMesh.C | 20 ++++ .../engineMesh/engineMesh/engineMeshNew.C | 2 +- src/engine/engineTime/engineTime.C | 2 +- .../cfdTools/general/MRF/MRFZones.C | 2 +- .../general/SRF/SRFModel/SRFModel/SRFModel.C | 2 +- .../SRF/SRFModel/SRFModel/SRFModelNew.C | 2 +- .../pressureGradientExplicitSource.C | 2 +- .../finiteVolume/fvSchemes/fvSchemes.C | 2 +- .../displacementInterpolationFvMotionSolver.C | 2 +- src/lagrangian/basic/Cloud/CloudIO.C | 2 +- src/lagrangian/dieselSpray/spray/spray.C | 4 +- .../clouds/Templates/DsmcCloud/DsmcCloud.C | 4 +- .../Templates/KinematicCloud/KinematicCloud.C | 2 +- .../InjectionModel/InjectionModel.C | 2 +- .../mdTools/createAutoCorrelationFunctions.H | 2 +- .../molecule/moleculeCloud/moleculeCloud.C | 2 +- .../potential/potential/potential.C | 8 +- .../solidParticle/solidParticleCloud.C | 2 +- .../distributedTriSurfaceMesh.C | 2 +- .../cellSources/fieldToCell/fieldToCell.C | 3 +- src/meshTools/sets/topoSets/cellZoneSet.C | 1 + src/meshTools/sets/topoSets/faceZoneSet.C | 1 + src/meshTools/sets/topoSets/pointZoneSet.C | 3 +- src/meshTools/sets/topoSets/topoSet.C | 2 + .../fieldAverage/fieldAverage/fieldAverage.C | 2 +- src/sampling/include/buildPatch.H | 2 +- src/surfMesh/MeshedSurface/MeshedSurface.C | 2 +- .../surfZone/surfZone/surfZoneIOList.C | 6 +- .../kinematicSingleLayer.C | 2 +- .../surfaceFilmModel/surfaceFilmModel.C | 4 +- .../surfaceFilmModel/surfaceFilmModelNew.C | 2 +- .../basic/basicThermo/basicThermo.C | 2 +- .../basicPsiThermo/basicPsiThermoNew.C | 2 +- .../basicRhoThermo/basicRhoThermoNew.C | 2 +- .../basicChemistryModel/basicChemistryModel.C | 2 +- .../psiChemistryModel/psiChemistryModelNew.C | 2 +- .../rhoChemistryModel/rhoChemistryModelNew.C | 2 +- .../laminarFlameSpeed/laminarFlameSpeedNew.C | 2 +- .../interpolationLookUpTable.C | 2 +- .../radiationModel/radiationModel.C | 4 +- .../radiationModel/radiationModelNew.C | 2 +- .../hCombustionThermo/hCombustionThermoNew.C | 4 +- .../hhuCombustionThermoNew.C | 2 +- .../hsCombustionThermoNew.C | 4 +- .../hReactionThermo/hReactionThermoNew.C | 4 +- .../hsReactionThermo/hsReactionThermoNew.C | 4 +- .../linearValveFvMesh/linearValveFvMesh.C | 5 +- .../linearValveLayersFvMesh.C | 5 +- .../mixerFvMesh/mixerFvMesh.C | 5 +- .../movingConeTopoFvMesh.C | 5 +- .../transportModel/transportModel.C | 2 +- .../surfacePatch/surfacePatchIOList.C | 20 +++- .../compressible/LES/LESModel/LESModel.C | 4 +- .../compressible/RAS/RASModel/RASModel.C | 4 +- .../regionProperties.C | 2 +- .../turbulenceModel/turbulenceModel.C | 2 +- .../incompressible/LES/LESModel/LESModel.C | 4 +- .../incompressible/RAS/RASModel/RASModel.C | 4 +- ...UTabulatedWallFunctionFvPatchScalarField.C | 2 +- .../turbulenceModel/turbulenceModel.C | 2 +- 192 files changed, 766 insertions(+), 398 deletions(-) diff --git a/TODO b/TODO index de142d2889f..aab3581489b 100644 --- a/TODO +++ b/TODO @@ -1,100 +1,23 @@ -- allocate/free tags. -Not tested. +- check + new fvMesh + new fvMeshSubset +for consistency with createMesh.H -OK - test blockMesh with cyclics -unitTestCases/singleCyclic/ -OK - test cyclics sequential running. -unitTestCases/singleCyclic/ -OK - test decomposePar -tested channel395 +- Check the following: -OK - FaceCellWave - unitTestCases/twoCavityCyclicForWallDistance/ +doc/changes/inotify.txt + -OK - non-parallel finite volume : channelFoam - unitTestCases/channel395-splitCyclic vs. channel395-dev -OK - parallel finite volume with processorCyclic: channelFoam - unitTestCases/channel395-splitCyclic vs. channel395-dev -OK - preProcessing/foamUpgradeCyclics -OK - gamg - sequential. -Tested on channel395-splitCyclic with GAMG. -OK - gamg parallel. -Tested on channel395-splitCyclic with GAMG. -- initTransfer in GAMGprocessorInterfaces using nonblocking+tags -untested. -OK - cyclic baffles. -Tested on t-junction-with-fan -OK. - jumpCyclics/fanFvPatchField. All usages of jump() now need to account -for being owner() or not. -Tested on t-junction-with-fan. -OK - regionSplit -tested on singleCyclic -OK - pointFields on cyclics. volPointInterpolation. -tested on channel395-splitCyclic -OK - fvMeshSubset -tested on singleCyclic -OK - pointEdgeWave (maybe test through inversePointDistanceDiffusivity?) -tested on twoCavityCyclicForWallDistance -OK - scotchDecomp -tested with testCalcCSR on twoCavityCyclicForWallDistance - -NOT WORKING - fvMeshDistribute to split cyclic patches into ones - with different separation. -tested on singleCyclic - -OK - test createPatch pointSync -note: only works if face-centre position of 0th faces is ok since uses -this for separation. Should in fact make cyclic planar using patch centre and -normal? -test on twoCavityCyclicForWallDistance with point (0 1 0) set to (0 1.001 0) - -NO PROBLEM - renumberMesh -It doesn't do renumbering through cyclics. - -OK - rotational cyclics. -Tested on movingCone-with-cyclics - -OK - LUscalarMatrix::convert still expects interfaces to be cyclic -tested on channel395 with 'directSolveCoarsest true;' - -OK - grep for size()/2 - -- all tutorials with cyclics: - OK - incompressible/DNS/dnsFoam/boxTurb16 - OK - incompressible/channelFoam/channel395 - slight differences due to divergence. combustion/XiFoam/les/pitzDaily3D - OK - no cyclics. combustion/fireFoam/les/smallPoolFire2D - discreteMethods/dsmcFoam/freeSpacePeriodic - discreteMethods/dsmcFoam/wedge15Ma5 - discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon - OK - incompressible/boundaryFoam/boundaryLaunderSharma - OK - incompressible/boundaryFoam/boundaryWallFunctions - OK - incompressible/boundaryFoam/boundaryWallFunctionsProfile - OK - needs createBaffles. incompressible/pimpleFoam/t-junction-with-fan - OK - incompressible/simpleSRFFoam/mixer - OK - needs createBaffles. lagrangian/porousExplicitSourceReactingParcelFoam/filter - needs special coupledbcs. lagrangian/reactingParcelFilmFoam/multipleBoxes - - -OK - createBaffles - -- have foamUpgradeCyclics split 'value' field -- activeBaffleVelocity -- kivaToFoam/readKivaGrid.H sorts cyclics (but in incorrect order?) -- isoSurface.C -- referredCellList.C -- work out scheduled communication? -OK - add neighbourPatch checking to 16x. diff --git a/applications/solvers/DNS/dnsFoam/readTransportProperties.H b/applications/solvers/DNS/dnsFoam/readTransportProperties.H index 77af096bf8a..0d809085427 100644 --- a/applications/solvers/DNS/dnsFoam/readTransportProperties.H +++ b/applications/solvers/DNS/dnsFoam/readTransportProperties.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H b/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H index 20fd654ceff..ba1d5dcd802 100644 --- a/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H +++ b/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H @@ -7,7 +7,7 @@ "turbulenceProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/basic/laplacianFoam/createFields.H b/applications/solvers/basic/laplacianFoam/createFields.H index 3359f2896c2..616afe1a885 100644 --- a/applications/solvers/basic/laplacianFoam/createFields.H +++ b/applications/solvers/basic/laplacianFoam/createFields.H @@ -23,7 +23,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/basic/scalarTransportFoam/createFields.H b/applications/solvers/basic/scalarTransportFoam/createFields.H index 54a0bc45eca..07731be3d6e 100644 --- a/applications/solvers/basic/scalarTransportFoam/createFields.H +++ b/applications/solvers/basic/scalarTransportFoam/createFields.H @@ -39,7 +39,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index 385b9e53f0f..32b525859e7 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -62,7 +62,7 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq "combustionProperties", Su.mesh().time().constant(), Su.mesh(), - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ), thermo diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index 74a18ab6f5a..233383ab1cc 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -110,7 +110,7 @@ "PDRProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/PDRFoam/readCombustionProperties.H b/applications/solvers/combustion/PDRFoam/readCombustionProperties.H index 9f4435b2519..acc5cb78686 100644 --- a/applications/solvers/combustion/PDRFoam/readCombustionProperties.H +++ b/applications/solvers/combustion/PDRFoam/readCombustionProperties.H @@ -7,7 +7,7 @@ "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/XiFoam/readCombustionProperties.H b/applications/solvers/combustion/XiFoam/readCombustionProperties.H index da0a3a94a24..58b0626fb41 100644 --- a/applications/solvers/combustion/XiFoam/readCombustionProperties.H +++ b/applications/solvers/combustion/XiFoam/readCombustionProperties.H @@ -7,7 +7,7 @@ "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H b/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H index 687d83ea946..84cf9b9756a 100644 --- a/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H +++ b/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H @@ -7,7 +7,7 @@ IOdictionary combustionProperties "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 95bda056065..9a6274bb1a7 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -65,7 +65,7 @@ IOdictionary combustionProperties "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/reactingFoam/readChemistryProperties.H b/applications/solvers/combustion/reactingFoam/readChemistryProperties.H index ab51afe2836..f0bcf7597fc 100644 --- a/applications/solvers/combustion/reactingFoam/readChemistryProperties.H +++ b/applications/solvers/combustion/reactingFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H b/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H index ab51afe2836..f0bcf7597fc 100644 --- a/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H +++ b/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H b/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H index 435bcb7745e..5a63169d123 100644 --- a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H +++ b/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H @@ -9,7 +9,7 @@ IOdictionary thermophysicalProperties "thermophysicalProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/rhoSonicFoam/readThermodynamicProperties.H b/applications/solvers/compressible/rhoSonicFoam/readThermodynamicProperties.H index 1fc57fc5fdc..4e19adaae48 100644 --- a/applications/solvers/compressible/rhoSonicFoam/readThermodynamicProperties.H +++ b/applications/solvers/compressible/rhoSonicFoam/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/rhopSonicFoam/readThermodynamicProperties.H b/applications/solvers/compressible/rhopSonicFoam/readThermodynamicProperties.H index 3b8c82c8e59..2be7ce63ffd 100644 --- a/applications/solvers/compressible/rhopSonicFoam/readThermodynamicProperties.H +++ b/applications/solvers/compressible/rhopSonicFoam/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H b/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H index 1fc57fc5fdc..4e19adaae48 100644 --- a/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H +++ b/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H b/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H index 1502e2033a0..c30f65b4458 100644 --- a/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H +++ b/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H b/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H index d8dad7d8003..82f3655f465 100644 --- a/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H +++ b/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H b/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H index 1502e2033a0..c30f65b4458 100644 --- a/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H +++ b/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H index b94745d9df2..3f43981907d 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H +++ b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H @@ -7,7 +7,7 @@ IOdictionary mdEquilibrationDict "mdEquilibrationDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/electromagnetics/electrostaticFoam/createFields.H b/applications/solvers/electromagnetics/electrostaticFoam/createFields.H index 64522273b81..04c86c4edb5 100644 --- a/applications/solvers/electromagnetics/electrostaticFoam/createFields.H +++ b/applications/solvers/electromagnetics/electrostaticFoam/createFields.H @@ -7,7 +7,7 @@ "physicalProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/electromagnetics/magneticFoam/createFields.H b/applications/solvers/electromagnetics/magneticFoam/createFields.H index a3712c19aa1..22d40089213 100644 --- a/applications/solvers/electromagnetics/magneticFoam/createFields.H +++ b/applications/solvers/electromagnetics/magneticFoam/createFields.H @@ -21,7 +21,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/electromagnetics/mhdFoam/createFields.H b/applications/solvers/electromagnetics/mhdFoam/createFields.H index 04e05c032d0..fb5a0049322 100644 --- a/applications/solvers/electromagnetics/mhdFoam/createFields.H +++ b/applications/solvers/electromagnetics/mhdFoam/createFields.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/financial/financialFoam/createFields.H b/applications/solvers/financial/financialFoam/createFields.H index 6cdbbe2bde3..dc0da4d2a3e 100644 --- a/applications/solvers/financial/financialFoam/createFields.H +++ b/applications/solvers/financial/financialFoam/createFields.H @@ -7,7 +7,7 @@ "financialProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.C index 89eaaabd480..f85e8f5440a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/regionProperties/regionProperties.C @@ -36,7 +36,7 @@ Foam::regionProperties::regionProperties(const Time& runTime) "regionProperties", runTime.time().constant(), runTime.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index e99a9900131..90a66649892 100644 --- a/applications/solvers/incompressible/boundaryFoam/createFields.H +++ b/applications/solvers/incompressible/boundaryFoam/createFields.H @@ -44,7 +44,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/incompressible/channelFoam/readTransportProperties.H b/applications/solvers/incompressible/channelFoam/readTransportProperties.H index 87c93c91958..abaee647c75 100644 --- a/applications/solvers/incompressible/channelFoam/readTransportProperties.H +++ b/applications/solvers/incompressible/channelFoam/readTransportProperties.H @@ -6,7 +6,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/incompressible/icoFoam/createFields.H b/applications/solvers/incompressible/icoFoam/createFields.H index 6a7d6b9a80a..02093c39386 100644 --- a/applications/solvers/incompressible/icoFoam/createFields.H +++ b/applications/solvers/incompressible/icoFoam/createFields.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/incompressible/shallowWaterFoam/readGravitationalAcceleration.H b/applications/solvers/incompressible/shallowWaterFoam/readGravitationalAcceleration.H index d609c186144..d8a8bf8d062 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/readGravitationalAcceleration.H +++ b/applications/solvers/incompressible/shallowWaterFoam/readGravitationalAcceleration.H @@ -7,7 +7,7 @@ IOdictionary gravitationalProperties "gravitationalProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/readChemistryProperties.H b/applications/solvers/lagrangian/coalChemistryFoam/readChemistryProperties.H index ab51afe2836..f0bcf7597fc 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/readChemistryProperties.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/createFields.H b/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/createFields.H index 179ac149bad..0ad057e2299 100644 --- a/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/createFields.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readChemistryProperties.H index ab51afe2836..f0bcf7597fc 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readChemistryProperties.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 8048acd6484..909d0351f70 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -97,7 +97,7 @@ "additionalControls", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H index ab51afe2836..f0bcf7597fc 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H b/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H index ab51afe2836..f0bcf7597fc 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/multiphase/bubbleFoam/createFields.H b/applications/solvers/multiphase/bubbleFoam/createFields.H index 9367838a52b..57bb7e88d50 100644 --- a/applications/solvers/multiphase/bubbleFoam/createFields.H +++ b/applications/solvers/multiphase/bubbleFoam/createFields.H @@ -91,7 +91,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H b/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H index 1ae6219fd6f..015cfbb8374 100644 --- a/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H +++ b/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H @@ -5,7 +5,7 @@ "RASProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H b/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H index d3fbb9307aa..3740f105633 100644 --- a/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H +++ b/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C index bffffd6aae8..27da4ad0c02 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C @@ -46,7 +46,7 @@ Foam::phaseChangeTwoPhaseMixture::New "transportProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index c8e05c4209c..75d19c67797 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -50,7 +50,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -184,7 +184,7 @@ "RASProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H index 8a126905810..308a1089fb9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -153,7 +153,7 @@ "interfacialProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 611ce8fa167..57096ebd0c7 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -56,7 +56,7 @@ Foam::kineticTheoryModel::kineticTheoryModel "kineticTheoryProperties", Ua_.time().constant(), Ua_.mesh(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/readPPProperties.H b/applications/solvers/multiphase/twoPhaseEulerFoam/readPPProperties.H index 3acbf758d04..c1b319cbc96 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/readPPProperties.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/readPPProperties.H @@ -5,7 +5,7 @@ "ppProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H index 91bd5f3da20..9f256bd6891 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readMechanicalProperties.H @@ -7,7 +7,7 @@ "mechanicalProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H index a4c3082fb5a..12e10a607b4 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H @@ -7,7 +7,7 @@ "thermalProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/test/LduMatrix/createFields.H b/applications/test/LduMatrix/createFields.H index ea64f13026b..57714aa7871 100644 --- a/applications/test/LduMatrix/createFields.H +++ b/applications/test/LduMatrix/createFields.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/test/dataEntry/testDataEntry.C b/applications/test/dataEntry/testDataEntry.C index 583701322b0..456f0d478d5 100644 --- a/applications/test/dataEntry/testDataEntry.C +++ b/applications/test/dataEntry/testDataEntry.C @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) "dataEntryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/test/fvSolutionCombine/fvSolutionCombine.C b/applications/test/fvSolutionCombine/fvSolutionCombine.C index a98d803bf37..19abc81611f 100644 --- a/applications/test/fvSolutionCombine/fvSolutionCombine.C +++ b/applications/test/fvSolutionCombine/fvSolutionCombine.C @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) dictName, "system", runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C b/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C index 9b305731db1..8b2339233ca 100644 --- a/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C +++ b/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C b/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C index 33486ec3017..05a7e5c57cd 100644 --- a/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C +++ b/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C b/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C index 57629b59807..d0f668c8c9b 100644 --- a/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C +++ b/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C b/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C index 72744a9f8d5..246380a029f 100644 --- a/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C +++ b/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C index c2f3640f2d1..3ef371188ec 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C @@ -639,7 +639,7 @@ int main(int argc, char *argv[]) "motionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ); @@ -669,7 +669,7 @@ int main(int argc, char *argv[]) "autoRefineMeshDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index 0b09b7859d7..21c9f5867a2 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -74,7 +74,7 @@ void checkSnapMesh "snapMeshDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index 7cd57e792d5..befadc88e2d 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -346,7 +346,7 @@ int main(int argc, char *argv[]) "modifyMeshDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/advanced/selectCells/edgeStats.C b/applications/utilities/mesh/advanced/selectCells/edgeStats.C index 561cef9bfdf..103d963be5a 100644 --- a/applications/utilities/mesh/advanced/selectCells/edgeStats.C +++ b/applications/utilities/mesh/advanced/selectCells/edgeStats.C @@ -78,7 +78,7 @@ Foam::edgeStats::edgeStats(const polyMesh& mesh) "motionProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ); diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index 8f798460504..f5ad8412f79 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.C @@ -346,7 +346,7 @@ int main(int argc, char *argv[]) "selectCellsDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/conversion/foamToStarMesh/getTimeIndex.H b/applications/utilities/mesh/conversion/foamToStarMesh/getTimeIndex.H index 85a92405dda..d722c432e3b 100644 --- a/applications/utilities/mesh/conversion/foamToStarMesh/getTimeIndex.H +++ b/applications/utilities/mesh/conversion/foamToStarMesh/getTimeIndex.H @@ -29,7 +29,7 @@ runTime.timeName(), "uniform", runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/mesh/conversion/foamToSurface/getTimeIndex.H b/applications/utilities/mesh/conversion/foamToSurface/getTimeIndex.H index 85a92405dda..d722c432e3b 100644 --- a/applications/utilities/mesh/conversion/foamToSurface/getTimeIndex.H +++ b/applications/utilities/mesh/conversion/foamToSurface/getTimeIndex.H @@ -29,7 +29,7 @@ runTime.timeName(), "uniform", runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C index 3f8086bb803..a0baebaae71 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C @@ -121,7 +121,7 @@ int main(int argc, char *argv[]) : dictPath ), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -137,7 +137,7 @@ int main(int argc, char *argv[]) runTime.constant(), polyMeshDir, runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index 1d0ce53e738..9d28de41093 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -218,7 +218,7 @@ int main(int argc, char *argv[]) runTimeExtruded.constant(), regionDir, runTimeExtruded, - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ); diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index e93112a4313..7ced14726d9 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) "decomposeParDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -157,7 +157,7 @@ int main(int argc, char *argv[]) "snappyHexMeshDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 43652bbbeae..7f80d01e5d9 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -532,7 +532,7 @@ int main(int argc, char *argv[]) : word::null ), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C index f5b79e7de14..96a092fb227 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C @@ -39,7 +39,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) "mirrorMeshDict", time().system(), *this, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/readMirrorDict.H b/applications/utilities/mesh/manipulation/mirrorMesh/readMirrorDict.H index 6116514701e..138898842bf 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/readMirrorDict.H +++ b/applications/utilities/mesh/manipulation/mirrorMesh/readMirrorDict.H @@ -7,7 +7,7 @@ "mirrorMeshDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index ba3170d2810..f890c845466 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -334,7 +334,7 @@ int main(int argc, char *argv[]) "refineMeshDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 495e07f2901..19a80bac5f0 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -483,7 +483,7 @@ int main(int argc, char *argv[]) "decomposeParDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 733cef024b8..9790aec1e14 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -298,7 +298,7 @@ int main(int argc, char *argv[]) args.options()["toleranceDict"], runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSet.C b/applications/utilities/mesh/manipulation/topoSet/topoSet.C index 6f1c9957e4d..54fd6e0deea 100644 --- a/applications/utilities/mesh/manipulation/topoSet/topoSet.C +++ b/applications/utilities/mesh/manipulation/topoSet/topoSet.C @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) ( dictPath, mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) : IOobject @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) dictName, runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ) diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index b50db4a76cc..5130f14da31 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -163,7 +163,7 @@ int main(int argc, char *argv[]) runTime.time().system(), regionDir, // use region if non-standard runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 6575c31dd3e..2cc5c26b1a4 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -94,7 +94,7 @@ Foam::domainDecomposition::domainDecomposition(const IOobject& io) "decomposeParDict", time().system(), *this, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C index c3a2003d40b..5df7310f8ea 100644 --- a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C +++ b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C @@ -581,7 +581,7 @@ int main(int argc, char *argv[]) "decomposeParDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C index d469054ca31..35f6544f4d1 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) "foamDataToFluentDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/getTimeIndex.H b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/getTimeIndex.H index ecf12f8b137..491ada9a43d 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/getTimeIndex.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsightParts/getTimeIndex.H @@ -26,7 +26,7 @@ if (io.headerOk()) { - io.readOpt() = IOobject::MUST_READ; + io.readOpt() = IOobject::MUST_READ_IF_MODIFIED; IOdictionary timeObject(io); timeObject.lookup("index") >> timeIndex; diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H index b19e03ab198..60b547dfd2c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H +++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H @@ -5,7 +5,7 @@ IOdictionary conversionProperties "conversionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C index a73b46621ed..1cd6f06b030 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C @@ -444,7 +444,7 @@ void Foam::vtkPV3Foam::updateFoamMesh() meshRegion_, dbPtr_().timeName(), dbPtr_(), - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C index a7483a210c0..d11d2ae5bab 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C @@ -315,7 +315,7 @@ void Foam::vtkPV3blockMesh::updateFoamMesh() dbPtr_().constant(), polyMesh::meshSubDir, dbPtr_(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.C b/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.C index e18963c3d13..536eed7fb49 100644 --- a/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.C +++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.C @@ -260,7 +260,7 @@ void Foam::readerDatabase::loadMesh() meshPtr_ = new fvMeshSubset ( *runTimePtr_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::AUTO_WRITE ); diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H index 61c126e492a..d7ede226bf7 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H @@ -5,7 +5,7 @@ IOdictionary propsDict "particleTrackProperties", runTime.constant(), mesh, - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ); diff --git a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C index 89858615820..ccc1ec29484 100644 --- a/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C +++ b/applications/utilities/postProcessing/miscellaneous/execFlowFunctionObjects/execFlowFunctionObjects.C @@ -62,7 +62,7 @@ namespace Foam args["dict"], runTime.system(), runTime, - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ); @@ -130,7 +130,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "RASProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); @@ -140,7 +140,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "LESProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); @@ -184,7 +184,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -214,7 +214,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "RASProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); @@ -224,7 +224,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "LESProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); @@ -266,7 +266,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H b/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H index ddb1f663ad7..d7501086542 100644 --- a/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H +++ b/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H @@ -5,7 +5,7 @@ "pdfDict", runTime.constant(), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C b/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C index 8c9cb587172..7d71845adb8 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/postChannel.C @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) "postChannelDict", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/readTransportProperties.H b/applications/utilities/postProcessing/miscellaneous/postChannel/readTransportProperties.H index 1e4bdd42928..cef26f6c352 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/readTransportProperties.H +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/readTransportProperties.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/velocityField/Mach/Mach.C b/applications/utilities/postProcessing/velocityField/Mach/Mach.C index 53bd1a24880..391eee52374 100644 --- a/applications/utilities/postProcessing/velocityField/Mach/Mach.C +++ b/applications/utilities/postProcessing/velocityField/Mach/Mach.C @@ -98,7 +98,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/velocityField/Mach/readThermodynamicProperties.H b/applications/utilities/postProcessing/velocityField/Mach/readThermodynamicProperties.H index 1fc57fc5fdc..4e19adaae48 100644 --- a/applications/utilities/postProcessing/velocityField/Mach/readThermodynamicProperties.H +++ b/applications/utilities/postProcessing/velocityField/Mach/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/postProcessing/velocityField/Pe/Pe.C b/applications/utilities/postProcessing/velocityField/Pe/Pe.C index a94f474d110..8e26d3f33aa 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Pe.C +++ b/applications/utilities/postProcessing/velocityField/Pe/Pe.C @@ -81,7 +81,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "RASProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ); @@ -90,7 +90,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "LESProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ); @@ -174,7 +174,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -299,7 +299,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/preProcessing/boxTurb/readBoxTurbDict.H b/applications/utilities/preProcessing/boxTurb/readBoxTurbDict.H index 60063b9d224..bcf5625a07c 100644 --- a/applications/utilities/preProcessing/boxTurb/readBoxTurbDict.H +++ b/applications/utilities/preProcessing/boxTurb/readBoxTurbDict.H @@ -7,7 +7,7 @@ "boxTurbDict", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C index 69a201e5587..e917feaa708 100644 --- a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C +++ b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C @@ -292,7 +292,7 @@ int main(int argc, char *argv[]) "changeDictionaryDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -405,7 +405,7 @@ int main(int argc, char *argv[]) fieldName, instance, mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C b/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C index d779a6427d3..edd7d7e7521 100644 --- a/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C +++ b/applications/utilities/preProcessing/dsmcInitialise/dsmcInitialise.C @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) "dsmcInitialiseDict", mesh.time().system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/preProcessing/engineSwirl/createFields.H b/applications/utilities/preProcessing/engineSwirl/createFields.H index 596273a9bdc..11975d3717f 100644 --- a/applications/utilities/preProcessing/engineSwirl/createFields.H +++ b/applications/utilities/preProcessing/engineSwirl/createFields.H @@ -7,7 +7,7 @@ IOdictionary engineGeometry "engineGeometry", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C index cce68316c0c..ce0c4a8a691 100644 --- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C +++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C @@ -279,7 +279,7 @@ void rewriteField fieldName, runTime.timeName(), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C index 0cdf0cbe775..202ebad86d7 100644 --- a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C +++ b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) "fvSolution", runTime.system(), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index 72dae9f8389..0eabfe6d3cb 100644 --- a/applications/utilities/preProcessing/mapFields/mapFields.C +++ b/applications/utilities/preProcessing/mapFields/mapFields.C @@ -291,7 +291,7 @@ int main(int argc, char *argv[]) "mapFieldsDict", runTimeTarget.system(), runTimeTarget, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -310,7 +310,7 @@ int main(int argc, char *argv[]) "decomposeParDict", runTimeSource.system(), runTimeSource, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -375,7 +375,7 @@ int main(int argc, char *argv[]) "decomposeParDict", runTimeTarget.system(), runTimeTarget, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -446,7 +446,7 @@ int main(int argc, char *argv[]) "decomposeParDict", runTimeSource.system(), runTimeSource, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -464,7 +464,7 @@ int main(int argc, char *argv[]) "decomposeParDict", runTimeTarget.system(), runTimeTarget, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/preProcessing/mdInitialise/mdInitialise.C b/applications/utilities/preProcessing/mdInitialise/mdInitialise.C index 6e329a271f7..abefc1a0b2b 100644 --- a/applications/utilities/preProcessing/mdInitialise/mdInitialise.C +++ b/applications/utilities/preProcessing/mdInitialise/mdInitialise.C @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) "mdInitialiseDict", runTime.system(), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C index b3cbd8c8bcc..6676403d53e 100644 --- a/applications/utilities/preProcessing/setFields/setFields.C +++ b/applications/utilities/preProcessing/setFields/setFields.C @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) "setFieldsDict", runTime.system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/preProcessing/wallFunctionTable/wallFunctionTableApp.C b/applications/utilities/preProcessing/wallFunctionTable/wallFunctionTableApp.C index 9c5b70c9680..8f9e755d45a 100644 --- a/applications/utilities/preProcessing/wallFunctionTable/wallFunctionTableApp.C +++ b/applications/utilities/preProcessing/wallFunctionTable/wallFunctionTableApp.C @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) "wallFunctionDict", runTime.constant(), mesh, - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ); diff --git a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C index dda71c3565a..3995031b536 100644 --- a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C +++ b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C @@ -241,7 +241,7 @@ int main(int argc, char *argv[]) importName, runTime.constant(), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C index c9c02d199b4..7a0c9baae37 100644 --- a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C +++ b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) "BurcatCpData", runTime.constant(), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C index 2103aa242d8..f7f0246c986 100644 --- a/src/OSspecific/POSIX/fileMonitor.C +++ b/src/OSspecific/POSIX/fileMonitor.C @@ -30,6 +30,7 @@ Class #include "IOstreams.H" #include "Pstream.H" #include "PackedList.H" +#include "PstreamReduceOps.H" #ifdef FOAM_USE_STAT # include "OSspecific.H" @@ -57,12 +58,14 @@ const Foam::NamedEnum<Foam::fileMonitor::fileState, 3> namespace Foam { - class fileStateEqOp + // Reduction operator for PackedList of fileState + class reduceFileStates { public: - void operator()(unsigned int& x, const unsigned int& y) const + unsigned int operator()(const unsigned int x, const unsigned int y) + const { - // x,y are list of 2bits representing fileState + // x,y are sets of 2bits representing fileState unsigned int mask = 3u; unsigned int shift = 0; @@ -82,7 +85,17 @@ namespace Foam shift += 2; mask <<= 2; } - x = result; + return result; + } + }; + + // Combine operator for PackedList of fileState + class combineReduceFileStates + { + public: + void operator()(unsigned int& x, const unsigned int y) const + { + x = reduceFileStates()(x, y); } }; } @@ -323,7 +336,19 @@ void Foam::fileMonitor::updateStates(const bool syncPar) const // Save local state for warning message below PackedList<2> thisProcStats(stats); - Pstream::listCombineGather(stats.storage(), fileStateEqOp()); + if (stats.storage().size() == 1) + { + // Optimisation valid for most cases. + reduce(stats.storage()[0], reduceFileStates()); + } + else + { + Pstream::listCombineGather + ( + stats.storage(), + combineReduceFileStates() + ); + } i = 0; forAllIter(Map<fileState>, state_, iter) diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index b9a0a258935..77617b64fc5 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.C +++ b/src/OpenFOAM/db/IOobject/IOobject.C @@ -316,8 +316,12 @@ Foam::fileName Foam::IOobject::filePath() const Foam::Istream* Foam::IOobject::objectStream() { - fileName fName = filePath(); + return objectStream(filePath()); +} + +Foam::Istream* Foam::IOobject::objectStream(const fileName& fName) +{ if (fName.size()) { IFstream* isPtr = new IFstream(fName); diff --git a/src/OpenFOAM/db/IOobject/IOobject.H b/src/OpenFOAM/db/IOobject/IOobject.H index 32ce285bfd8..4bb0a7c6c34 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.H +++ b/src/OpenFOAM/db/IOobject/IOobject.H @@ -39,9 +39,16 @@ Description @param MUST_READ Object must be read from Istream on construction. \n Error if Istream does not exist or can't be read. + Does not check timestamp or re-read. + @param MUST_READ_IF_MODIFIED + Object must be read from Istream on construction. \n + Error if Istream does not exist or can't be read. If object is + registered its timestamp will be checked every timestep and possibly + re-read. @param READ_IF_PRESENT Read object from Istream if Istream exists, otherwise don't. \n Error only if Istream exists but can't be read. + Does not check timestamp or re-read. @param NO_READ Don't read @@ -100,6 +107,7 @@ public: enum readOption { MUST_READ, + MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ }; @@ -154,6 +162,10 @@ protected: // The results is NULL if the stream construction failed Istream* objectStream(); + //- Construct and return an IFstream for the object given the + // exact file. The results is NULL if the stream construction failed + Istream* objectStream(const fileName&); + //- Set the object state to bad void setBad(const string&); diff --git a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C index fc85d5fa263..1f296fb7da7 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C +++ b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C @@ -39,7 +39,7 @@ bool Foam::IOobject::readHeader(Istream& is) // Check Istream not already bad if (!is.good()) { - if (rOpt_ == MUST_READ) + if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED) { FatalIOErrorIn("IOobject::readHeader(Istream&)", is) << " stream not open for reading essential object from file " @@ -102,7 +102,7 @@ bool Foam::IOobject::readHeader(Istream& is) } else { - if (rOpt_ == MUST_READ) + if (rOpt_ == MUST_READ || rOpt_ == MUST_READ_IF_MODIFIED) { FatalIOErrorIn("IOobject::readHeader(Istream&)", is) << " stream failure while reading header" diff --git a/src/OpenFOAM/db/IOobjects/IOField/IOField.C b/src/OpenFOAM/db/IOobjects/IOField/IOField.C index 3b16672ea4a..4af4f270732 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C @@ -32,9 +32,21 @@ Foam::IOField<Type>::IOField(const IOobject& io) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOField::IOField(const IOobject&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -49,9 +61,21 @@ Foam::IOField<Type>::IOField(const IOobject& io, const label size) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOField::IOField(const IOobject&, const label)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -70,9 +94,21 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOField::IOField(const IOobject&, const Field<Type>&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -91,11 +127,25 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Xfer<Field<Type> >& f) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "IOField::IOField(const IOobject&, const Xfer<Field<Type> >&)" + ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + Field<Type>::transfer(f()); if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.C b/src/OpenFOAM/db/IOobjects/IOList/IOList.C index 39e0554b042..3e9b7856076 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C @@ -32,9 +32,20 @@ Foam::IOList<T>::IOList(const IOobject& io) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOList::IOList(const IOobject&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -49,9 +60,20 @@ Foam::IOList<T>::IOList(const IOobject& io, const label size) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOList::IOList(const IOobject&, const label)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -70,9 +92,21 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOList::IOList(const IOobject&, const List<T>&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -91,11 +125,25 @@ Foam::IOList<T>::IOList(const IOobject& io, const Xfer<List<T> >& list) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "IOList::IOList(const IOobject&, const Xfer<List<T> >&)" + ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + List<T>::transfer(list()); if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C index 54f3646b104..67d95333c46 100644 --- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C +++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C @@ -34,7 +34,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -50,7 +53,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const label size) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -71,7 +77,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const Map<T>& map) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -94,7 +103,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const Xfer<Map<T> >& map) if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C index ad3ef2e4cd8..565c77e0fb7 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C @@ -35,7 +35,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const INew& inewt) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -52,7 +55,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -84,7 +90,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const PtrList<T>& list) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -107,7 +116,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const Xfer<PtrList<T> >& list) if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C index 136c6bbd18f..c5a37789582 100644 --- a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C +++ b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C @@ -43,9 +43,24 @@ Foam::IOdictionary::IOdictionary(const IOobject& io) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ) + { + WarningIn("IOdictionary::IOdictionary(const IOobject&)") + //FatalErrorIn("IOdictionary::IOdictionary(const IOobject&)") + << "Dictionary constructed with IOobject::MUST_READ" + " instead of IOobject::MUST_READ_IF_MODIFIED." << nl + << "Use MUST_READ_IF_MODIFIED if you need automatic rereading." + << endl; + //<< abort(FatalError); + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -61,9 +76,24 @@ Foam::IOdictionary::IOdictionary(const IOobject& io, const dictionary& dict) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ) + { + WarningIn + ( + "IOdictionary::IOdictionary(const IOobject& const dictionary&)" + ) << "Dictionary constructed with IOobject::MUST_READ" + " instead of IOobject::MUST_READ_IF_MODIFIED." << nl + << "Use MUST_READ_IF_MODIFIED if you need automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 0afa8d69b34..90772004e97 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -217,7 +217,7 @@ Foam::Time::Time controlDictName, system(), *this, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -242,6 +242,12 @@ Foam::Time::Time readLibs_(controlDict_, "libs"), functionObjects_(*this) { + // Time objects not registered so do like objectRegistry::checkIn ourselves. + if (runTimeModifiable_) + { + controlDict_.watchIndex() = addWatch(controlDict_.filePath()); + } + setControls(); } @@ -298,6 +304,13 @@ Foam::Time::Time readLibs_(controlDict_, "libs"), functionObjects_(*this) { + + // Time objects not registered so do like objectRegistry::checkIn ourselves. + if (runTimeModifiable_) + { + controlDict_.watchIndex() = addWatch(controlDict_.filePath()); + } + setControls(); } @@ -365,6 +378,38 @@ Foam::Time::~Time() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +Foam::label Foam::Time::addWatch(const fileName& fName) const +{ + return monitor_.addWatch(fName); +} + + +bool Foam::Time::removeWatch(const label watchIndex) const +{ + return monitor_.removeWatch(watchIndex); +} + +const Foam::fileName& Foam::Time::getFile(const label watchIndex) const +{ + return monitor_.getFile(watchIndex); +} + + +Foam::fileMonitor::fileState Foam::Time::getState +( + const label watchFd +) const +{ + return monitor_.getState(watchFd); +} + + +void Foam::Time::setUnmodified(const label watchFd) const +{ + monitor_.setUnmodified(watchFd); +} + + Foam::word Foam::Time::timeName(const scalar t) { std::ostringstream buf; diff --git a/src/OpenFOAM/db/Time/Time.H b/src/OpenFOAM/db/Time/Time.H index 7596fee0c9b..1021ba012e4 100644 --- a/src/OpenFOAM/db/Time/Time.H +++ b/src/OpenFOAM/db/Time/Time.H @@ -51,6 +51,7 @@ SourceFiles #include "typeInfo.H" #include "dlLibraryTable.H" #include "functionObjectList.H" +#include "fileMonitor.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -71,6 +72,9 @@ class Time { // Private data + //- file-change monitor for all registered files + mutable fileMonitor monitor_; + //- The controlDict IOdictionary controlDict_; @@ -275,11 +279,35 @@ public: return graphFormat_; } + //- Supports re-reading + const Switch& runTimeModifiable() const + { + return runTimeModifiable_; + } + //- Read control dictionary, update controls and time virtual bool read(); - //- Read the objects that have been modified - void readModifiedObjects(); + // Automatic rereading + + //- Read the objects that have been modified + void readModifiedObjects(); + + //- Add watching of a file. Returns handle + label addWatch(const fileName&) const; + + //- Remove watch on a file (using handle) + bool removeWatch(const label) const; + + //- Get name of file being watched (using handle) + const fileName& getFile(const label) const; + + //- Get current state of file (using handle) + fileMonitor::fileState getState(const label) const; + + //- Set current state of file (using handle) to unmodified + void setUnmodified(const label) const; + //- Return the location of "dir" containing the file "name". // (eg, used in reading mesh data) diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index 11031875dfb..dd6d1e98ed6 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -180,6 +180,11 @@ void Foam::Time::readDict() controlDict_.readIfPresent("graphFormat", graphFormat_); controlDict_.readIfPresent("runTimeModifiable", runTimeModifiable_); + + if (!runTimeModifiable_ && controlDict_.watchIndex() != -1) + { + removeWatch(controlDict_.watchIndex()); + } } @@ -201,35 +206,28 @@ void Foam::Time::readModifiedObjects() { if (runTimeModifiable_) { - // For parallel runs check if any object's file has been modified - // and only call readIfModified on each object if this is the case - // to avoid unnecessary reductions in readIfModified for each object + // Get state of all monitored objects (=registered objects with a + // valid filePath). + // Note: requires same ordering in objectRegistries on different + // processors! + monitor_.updateStates(Pstream::parRun()); - bool anyModified = true; +//Pout<< "Time : runTimeModifiable_ and watchIndex:" +// << controlDict_.watchIndex() << endl; - if (Pstream::parRun()) - { - anyModified = controlDict_.modified() || objectRegistry::modified(); - bool anyModifiedOnThisProc = anyModified; - reduce(anyModified, andOp<bool>()); + // Time handling is special since controlDict_ is the one dictionary + // that is not registered to any database. - if (anyModifiedOnThisProc && !anyModified) - { - WarningIn("Time::readModifiedObjects()") - << "Delaying reading objects due to inconsistent " - "file time-stamps between processors" - << endl; - } + if (controlDict_.readIfModified()) + { + readDict(); + functionObjects_.read(); } - if (anyModified) - { - if (controlDict_.readIfModified()) - { - readDict(); - functionObjects_.read(); - } + bool registryModified = objectRegistry::modified(); + if (registryModified) + { objectRegistry::readModifiedObjects(); } } diff --git a/src/OpenFOAM/db/Time/findInstance.C b/src/OpenFOAM/db/Time/findInstance.C index e588aeef4ca..b41a6bb9441 100644 --- a/src/OpenFOAM/db/Time/findInstance.C +++ b/src/OpenFOAM/db/Time/findInstance.C @@ -126,7 +126,11 @@ Foam::word Foam::Time::findInstance << endl; } - if (rOpt == IOobject::MUST_READ) + if + ( + rOpt == IOobject::MUST_READ + || rOpt == IOobject::MUST_READ_IF_MODIFIED + ) { FatalErrorIn ( @@ -174,7 +178,7 @@ Foam::word Foam::Time::findInstance return constant(); } - if (rOpt == IOobject::MUST_READ) + if (rOpt == IOobject::MUST_READ || rOpt == IOobject::MUST_READ_IF_MODIFIED) { FatalErrorIn ( diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H index b4e35c43a03..daef2de16f4 100644 --- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H +++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H @@ -90,7 +90,7 @@ public: const word& outputFilterName, const objectRegistry&, const fileName& dictName = OutputFilter::typeName() + "Dict", - const IOobject::readOption rOpt = IOobject::MUST_READ, + const IOobject::readOption rOpt = IOobject::MUST_READ_IF_MODIFIED, const bool loadFromFile = false ); diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.C b/src/OpenFOAM/db/objectRegistry/objectRegistry.C index 30ce98564d6..6309714e1ae 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.C +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.C @@ -273,7 +273,7 @@ void Foam::objectRegistry::rename(const word& newName) bool Foam::objectRegistry::modified() const { - for (const_iterator iter = cbegin(); iter != cend(); ++iter) + forAllConstIter(HashTable<regIOobject*>, *this, iter) { if (iter()->modified()) { @@ -317,7 +317,7 @@ bool Foam::objectRegistry::writeObject { bool ok = true; - for (const_iterator iter = cbegin(); iter != cend(); ++iter) + forAllConstIter(HashTable<regIOobject*>, *this, iter) { if (objectRegistry::debug) { diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.H b/src/OpenFOAM/db/objectRegistry/objectRegistry.H index 10165b3e977..512c1858ed7 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.H +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.H @@ -173,7 +173,6 @@ public: //- Remove an regIOobject from registry bool checkOut(regIOobject&) const; - // Reading //- Return true if any of the object's files have been modified diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index 22244ff8ace..bdbd9468ce9 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.C @@ -45,7 +45,7 @@ Foam::regIOobject::regIOobject(const IOobject& io, const bool isTime) IOobject(io), registered_(false), ownedByRegistry_(false), - lastModified_(0), + watchIndex_(-1), eventNo_ // Do not get event for top level Time database ( isTime @@ -68,7 +68,7 @@ Foam::regIOobject::regIOobject(const regIOobject& rio) IOobject(rio), registered_(false), ownedByRegistry_(false), - lastModified_(rio.lastModified_), + watchIndex_(rio.watchIndex_), eventNo_(db().getEvent()), isPtr_(NULL) { @@ -83,7 +83,7 @@ Foam::regIOobject::regIOobject(const regIOobject& rio, bool registerCopy) IOobject(rio), registered_(false), ownedByRegistry_(false), - lastModified_(rio.lastModified_), + watchIndex_(-1), eventNo_(db().getEvent()), isPtr_(NULL) { @@ -133,6 +133,28 @@ bool Foam::regIOobject::checkIn() // any mapping registered_ = db().checkIn(*this); + if + ( + registered_ + && readOpt() == MUST_READ_IF_MODIFIED + && time().runTimeModifiable() + ) + { + if (watchIndex_ != -1) + { + FatalErrorIn("regIOobject::checkIn()") + << "Object " << objectPath() + << " already watched with index " << watchIndex_ + << abort(FatalError); + } + + fileName f = filePath(); + if (f != fileName::null) + { + watchIndex_ = time().addWatch(f); + } + } + // check-in on defaultRegion is allowed to fail, since subsetted meshes // are created with the same name as their originating mesh if (!registered_ && debug && name() != polyMesh::defaultRegion) @@ -165,6 +187,12 @@ bool Foam::regIOobject::checkOut() if (registered_) { registered_ = false; + + if (watchIndex_ != -1) + { + time().removeWatch(watchIndex_); + watchIndex_ = -1; + } return db().checkOut(*this); } diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.H b/src/OpenFOAM/db/regIOobject/regIOobject.H index f3c2cc83f8b..59e075420fe 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.H +++ b/src/OpenFOAM/db/regIOobject/regIOobject.H @@ -67,8 +67,8 @@ private: //- Is this object owned by the registry bool ownedByRegistry_; - //- Time of last modification - mutable time_t lastModified_; + //- Modification watch index + mutable label watchIndex_; //- eventNo of last update label eventNo_; @@ -209,10 +209,17 @@ public: //- Read object virtual bool read(); - //- Return true if the object's file has been modified + //- Return file-monitoring handle + inline label watchIndex() const; + + //- Return file-monitoring handle + inline label& watchIndex(); + + //- Return true if the object's file (or files for objectRegistry) + // have been modified. (modified state is cached by Time) virtual bool modified() const; - //- Read object if modified + //- Read object if modified (as set by call to modified) virtual bool readIfModified(); diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectI.H b/src/OpenFOAM/db/regIOobject/regIOobjectI.H index b092d0150d1..47127ce8683 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectI.H +++ b/src/OpenFOAM/db/regIOobject/regIOobjectI.H @@ -90,4 +90,16 @@ inline Foam::label& Foam::regIOobject::eventNo() } +inline Foam::label Foam::regIOobject::watchIndex() const +{ + return watchIndex_; +} + + +inline Foam::label& Foam::regIOobject::watchIndex() +{ + return watchIndex_; +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C index 42b43a51e58..0082c936c64 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -26,7 +26,7 @@ License #include "regIOobject.H" #include "IFstream.H" #include "Time.H" -#include "PstreamReduceOps.H" +//#include "PstreamReduceOps.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -52,14 +52,26 @@ Foam::Istream& Foam::regIOobject::readStream() // Construct object stream and read header if not already constructed if (!isPtr_) { - if (!(isPtr_ = objectStream())) + + fileName objPath; + if (watchIndex_ != -1) + { + // File is being watched. Read exact file that is being watched. + objPath = time().getFile(watchIndex_); + } + else + { + objPath = filePath(); + } + + if (!(isPtr_ = objectStream(objPath))) { FatalIOError ( "regIOobject::readStream()", __FILE__, __LINE__, - objectPath(), + objPath, 0 ) << "cannot open file" << exit(FatalIOError); @@ -72,9 +84,10 @@ Foam::Istream& Foam::regIOobject::readStream() } } - if (!lastModified_) + // Mark as uptodate if read succesfully + if (watchIndex_ != -1) { - lastModified_ = lastModified(filePath()); + time().setUnmodified(watchIndex_); } return *isPtr_; @@ -151,49 +164,27 @@ bool Foam::regIOobject::read() bool Foam::regIOobject::modified() const { - return - ( - lastModified_ - && lastModified(filePath()) > (lastModified_ + fileModificationSkew) - ); + if (watchIndex_ != -1) + { + return time().getState(watchIndex_) != fileMonitor::UNMODIFIED; + } + else + { + return false; + } } bool Foam::regIOobject::readIfModified() { - if (lastModified_) + if (watchIndex_ != -1) { - time_t newTimeStamp = lastModified(filePath()); - - bool readFile = false; - - if (newTimeStamp > (lastModified_ + fileModificationSkew)) - { - readFile = true; - } - - if (Pstream::parRun()) - { - bool readFileOnThisProc = readFile; - reduce(readFile, andOp<bool>()); - - if (readFileOnThisProc && !readFile) - { - WarningIn("regIOobject::readIfModified()") - << "Delaying reading " << name() - << " of class " << headerClassName() - << " due to inconsistent " - "file time-stamps between processors" - << endl; - } - } - - if (readFile) + if (modified()) { - lastModified_ = newTimeStamp; + const fileName& fName = time().getFile(watchIndex_); Info<< "regIOobject::readIfModified() : " << nl - << " Reading object " << name() - << " from file " << filePath() << endl; + << " Re-reading object " << name() + << " from file " << fName << endl; return read(); } else diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C b/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C index 1f2c174fb44..8c03003e82a 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C @@ -114,9 +114,9 @@ bool Foam::regIOobject::writeObject // Only update the lastModified_ time if this object is re-readable, // i.e. lastModified_ is already set - if (lastModified_) + if (watchIndex_ != -1) { - lastModified_ = lastModified(objectPath()); + time().setUnmodified(watchIndex_); } return osGood; diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index b4960c341d2..9b6ad293f01 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -111,12 +111,16 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::readField(Istream& is) template<class Type, template<class> class PatchField, class GeoMesh> bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent() { - if (this->readOpt() == IOobject::MUST_READ) + if + ( + this->readOpt() == IOobject::MUST_READ + || this->readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) { WarningIn ( "GeometricField<Type, PatchField, GeoMesh>::readIfPresent()" - ) << "read option IOobject::MUST_READ " + ) << "read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED" << "suggests that a read constructor for field " << this->name() << " would be more appropriate." << endl; } diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index 5aa40ae572e..71359e5dabc 100644 --- a/src/OpenFOAM/matrices/solution/solution.C +++ b/src/OpenFOAM/matrices/solution/solution.C @@ -54,7 +54,7 @@ Foam::solution::solution(const objectRegistry& obr, const fileName& dictName) dictName, obr.time().system(), obr, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/OpenFOAM/matrices/tolerances/tolerances.C b/src/OpenFOAM/matrices/tolerances/tolerances.C index 9becd91b604..ff70e0b93ae 100644 --- a/src/OpenFOAM/matrices/tolerances/tolerances.C +++ b/src/OpenFOAM/matrices/tolerances/tolerances.C @@ -36,7 +36,7 @@ Foam::tolerances::tolerances(const Time& t, const fileName& dictName) dictName, t.system(), t, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index f23a05879f6..3a1ff00b32c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -62,8 +62,27 @@ Foam::polyBoundaryMesh::polyBoundaryMesh regIOobject(io), mesh_(mesh) { - if (readOpt() == IOobject::MUST_READ) + if + ( + readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "polyBoundaryMesh::polyBoundaryMesh\n" + "(\n" + " const IOobject&,\n" + " const polyMesh&\n" + ")" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + + polyPatchList& patches = *this; // Read polyPatchList diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index fe1c6de03ec..babb31b6e85 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -86,9 +86,24 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh if ( readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED || (readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "ZoneMesh::ZoneMesh\n" + "(\n" + " const IOobject&,\n" + " const MeshType&\n" + ")" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + PtrList<ZoneType>& zones = *this; // Read zones diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index 9a4c920dfa0..a37db88c690 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -39,7 +39,7 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) "dynamicMeshDict", io.time().constant(), io.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C index cd937135fd5..18e4a32d78c 100644 --- a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C +++ b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C @@ -51,8 +51,9 @@ Foam::dynamicInkJetFvMesh::dynamicInkJetFvMesh(const IOobject& io) "dynamicMeshDict", io.time().constant(), *this, - IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false ) ).subDict(typeName + "Coeffs") ), diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 5ecd3efdb9f..5e992af1017 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -179,7 +179,7 @@ void Foam::dynamicRefineFvMesh::readDict() "dynamicMeshDict", time().constant(), *this, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -1016,7 +1016,7 @@ bool Foam::dynamicRefineFvMesh::update() "dynamicMeshDict", time().constant(), *this, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C index 420304ecf76..88b7e521c05 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C @@ -51,8 +51,9 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io) "dynamicMeshDict", io.time().constant(), *this, - IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false ) ).subDict(typeName + "Coeffs") ), diff --git a/src/dynamicMesh/motionSolver/motionSolver.C b/src/dynamicMesh/motionSolver/motionSolver.C index efc29c2afc9..a225c4430ee 100644 --- a/src/dynamicMesh/motionSolver/motionSolver.C +++ b/src/dynamicMesh/motionSolver/motionSolver.C @@ -47,7 +47,7 @@ Foam::motionSolver::motionSolver(const polyMesh& mesh) "dynamicMeshDict", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -67,7 +67,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh) "dynamicMeshDict", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C index 744fceb2d5e..9450b2c7170 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C @@ -331,9 +331,21 @@ Foam::refinementHistory::refinementHistory(const IOobject& io) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "refinementHistory::refinementHistory(const IOobject&)" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -365,9 +377,22 @@ Foam::refinementHistory::refinementHistory freeSplitCells_(0), visibleCells_(visibleCells) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "refinementHistory::refinementHistory" + "(const IOobject&, const List<splitCell8>&, const labelList&)" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -399,9 +424,22 @@ Foam::refinementHistory::refinementHistory regIOobject(io), freeSplitCells_(0) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "refinementHistory::refinementHistory" + "(const IOobject&, const label)" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C index 1f7de13abaf..dcb95344175 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C @@ -43,9 +43,19 @@ void Foam::polyTopoChanger::readModifiers() if ( readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED || (readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("polyTopoChanger::readModifiers()") + << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + + PtrList<polyMeshModifier>& modifiers = *this; // Read modifiers diff --git a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C index 4fe21656066..d8637404cb9 100644 --- a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C +++ b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C @@ -40,9 +40,19 @@ Foam::featureEdgeMesh::featureEdgeMesh(const IOobject& io) if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("featureEdgeMesh::featureEdgeMesh(const IOobject&)") + << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + + readStream(typeName) >> *this; close(); } @@ -82,9 +92,19 @@ Foam::featureEdgeMesh::featureEdgeMesh if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("featureEdgeMesh::featureEdgeMesh(const IOobject&)") + << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + + readStream(typeName) >> *this; close(); } diff --git a/src/engine/engineMesh/engineMesh/engineMeshNew.C b/src/engine/engineMesh/engineMesh/engineMeshNew.C index b827036fd37..d34b881cc9c 100644 --- a/src/engine/engineMesh/engineMesh/engineMeshNew.C +++ b/src/engine/engineMesh/engineMesh/engineMeshNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New "engineGeometry", io.time().constant(), io.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/engine/engineTime/engineTime.C b/src/engine/engineTime/engineTime.C index 822f8224a8f..2f9ec62313d 100644 --- a/src/engine/engineTime/engineTime.C +++ b/src/engine/engineTime/engineTime.C @@ -72,7 +72,7 @@ Foam::engineTime::engineTime "engineGeometry", constant(), *this, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZones.C b/src/finiteVolume/cfdTools/general/MRF/MRFZones.C index 5ceb48af51e..cf7bdc8ff80 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZones.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZones.C @@ -45,7 +45,7 @@ Foam::MRFZones::MRFZones(const fvMesh& mesh) "MRFZones", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ), MRFZone::iNew(mesh) diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C index 626718c9321..e753196cdea 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModel.C @@ -53,7 +53,7 @@ Foam::SRF::SRFModel::SRFModel "SRFProperties", Urel.time().constant(), Urel.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C index 5c2eb2ea762..20d358235b1 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New "SRFProperties", Urel.time().constant(), Urel.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C b/src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C index 6f5af3bfab9..b4351f34c70 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C @@ -70,7 +70,7 @@ Foam::pressureGradientExplicitSource::pressureGradientExplicitSource sourceName + "Properties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C index e77b6c77a01..37b09def99f 100644 --- a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C +++ b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C @@ -64,7 +64,7 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr) "fvSchemes", obr.time().system(), obr, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C index 977fdb89a0b..e1613e584d9 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C @@ -70,7 +70,7 @@ displacementInterpolationFvMotionSolver "dynamicMeshDict", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index 24a65c1685e..0744ac3fd47 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -45,7 +45,7 @@ void Foam::Cloud<ParticleType>::readCloudUniformProperties() time().timeName(), "uniform"/cloud::prefix/name(), db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); diff --git a/src/lagrangian/dieselSpray/spray/spray.C b/src/lagrangian/dieselSpray/spray/spray.C index 4f98523b078..6ff9319f9a5 100644 --- a/src/lagrangian/dieselSpray/spray/spray.C +++ b/src/lagrangian/dieselSpray/spray/spray.C @@ -83,7 +83,7 @@ Foam::spray::spray "sprayProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -98,7 +98,7 @@ Foam::spray::spray "injectorProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ), injector::iNew(U.time()) diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index 0d9e84533d6..ef819f62d39 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -608,7 +608,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud cloudName + "Properties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -830,7 +830,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud cloudName + "Properties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 7fc3cf86363..10fccde371c 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -181,7 +181,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud cloudName + "Properties", rho.mesh().time().constant(), rho.mesh(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 9b44324461b..c56ff296183 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -40,7 +40,7 @@ void Foam::InjectionModel<CloudType>::readProps() owner_.db().time().timeName(), "uniform"/cloud::prefix/owner_.name(), owner_.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createAutoCorrelationFunctions.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createAutoCorrelationFunctions.H index ebe1781e6fd..b257b7eece9 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/createAutoCorrelationFunctions.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/createAutoCorrelationFunctions.H @@ -32,7 +32,7 @@ IOdictionary mdTransportProperitesDict "mdTransportProperitesDict", mesh.time().system(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index 55f24f100f8..5fef0b1d0d4 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -56,7 +56,7 @@ void Foam::moleculeCloud::buildConstProps() "moleculeProperties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.C b/src/lagrangian/molecularDynamics/potential/potential/potential.C index a54ef7f153d..f9d8dd683c4 100644 --- a/src/lagrangian/molecularDynamics/potential/potential/potential.C +++ b/src/lagrangian/molecularDynamics/potential/potential/potential.C @@ -104,7 +104,7 @@ void Foam::potential::potential::readPotentialDict() "idList", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -120,7 +120,7 @@ void Foam::potential::potential::readPotentialDict() "moleculeProperties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -151,7 +151,7 @@ void Foam::potential::potential::readPotentialDict() "potentialDict", mesh_.time().system(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -260,7 +260,7 @@ void Foam::potential::potential::readMdInitialiseDict "moleculeProperties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/lagrangian/solidParticle/solidParticleCloud.C b/src/lagrangian/solidParticle/solidParticleCloud.C index 753b760b14b..625116d525c 100644 --- a/src/lagrangian/solidParticle/solidParticleCloud.C +++ b/src/lagrangian/solidParticle/solidParticleCloud.C @@ -54,7 +54,7 @@ Foam::solidParticleCloud::solidParticleCloud "particleProperties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C b/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C index 70bfa897a93..a046f05050e 100644 --- a/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C +++ b/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C @@ -838,7 +838,7 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs "decomposeParDict", searchableSurface::time().system(), searchableSurface::time(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C index 96ce8b6cbe4..b934db15efc 100644 --- a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C +++ b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C @@ -189,7 +189,8 @@ void Foam::fieldToCell::applyToSet mesh().time().timeName(), mesh(), IOobject::MUST_READ, - IOobject::AUTO_WRITE + IOobject::AUTO_WRITE, + false ); if (!fieldObject.headerOk()) diff --git a/src/meshTools/sets/topoSets/cellZoneSet.C b/src/meshTools/sets/topoSets/cellZoneSet.C index 0a387c669ff..70de4a799c6 100644 --- a/src/meshTools/sets/topoSets/cellZoneSet.C +++ b/src/meshTools/sets/topoSets/cellZoneSet.C @@ -80,6 +80,7 @@ cellZoneSet::cellZoneSet if ( (r == IOobject::MUST_READ) + || (r == IOobject::MUST_READ_IF_MODIFIED) || (r == IOobject::READ_IF_PRESENT && zoneID != -1) ) { diff --git a/src/meshTools/sets/topoSets/faceZoneSet.C b/src/meshTools/sets/topoSets/faceZoneSet.C index ed552af24b2..00669101c8a 100644 --- a/src/meshTools/sets/topoSets/faceZoneSet.C +++ b/src/meshTools/sets/topoSets/faceZoneSet.C @@ -82,6 +82,7 @@ faceZoneSet::faceZoneSet if ( (r == IOobject::MUST_READ) + || (r == IOobject::MUST_READ_IF_MODIFIED) || (r == IOobject::READ_IF_PRESENT && zoneID != -1) ) { diff --git a/src/meshTools/sets/topoSets/pointZoneSet.C b/src/meshTools/sets/topoSets/pointZoneSet.C index 64c1a29ed1e..00870ee652b 100644 --- a/src/meshTools/sets/topoSets/pointZoneSet.C +++ b/src/meshTools/sets/topoSets/pointZoneSet.C @@ -81,7 +81,8 @@ pointZoneSet::pointZoneSet if ( - (r == IOobject::MUST_READ) + r == IOobject::MUST_READ + || r == IOobject::MUST_READ_IF_MODIFIED || (r == IOobject::READ_IF_PRESENT && zoneID != -1) ) { diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index fb9e79164ba..b4530e5b6ec 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.C @@ -309,6 +309,7 @@ Foam::topoSet::topoSet(const IOobject& obj, const word& wantedType) if ( readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED || ( readOpt() == IOobject::READ_IF_PRESENT && headerOk() @@ -356,6 +357,7 @@ Foam::topoSet::topoSet if ( readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED || ( readOpt() == IOobject::READ_IF_PRESENT && headerOk() diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C index a47a8b83cc0..f27a3f8f490 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C @@ -258,7 +258,7 @@ void Foam::fieldAverage::readAveragingProperties() obr_.time().timeName(), "uniform", obr_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); diff --git a/src/sampling/include/buildPatch.H b/src/sampling/include/buildPatch.H index 0d6338ebb03..e355d794905 100644 --- a/src/sampling/include/buildPatch.H +++ b/src/sampling/include/buildPatch.H @@ -6,7 +6,7 @@ IOdictionary planeToPatchDict "planeToPatchDict", runTime.system(), runTime, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index 91094607b49..5cc6a1260d8 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -374,7 +374,7 @@ Foam::MeshedSurface<Face>::MeshedSurface "dummyName", t.timeName(), t, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ), diff --git a/src/surfMesh/surfZone/surfZone/surfZoneIOList.C b/src/surfMesh/surfZone/surfZone/surfZoneIOList.C index 430b1d20068..c5619801dc6 100644 --- a/src/surfMesh/surfZone/surfZone/surfZoneIOList.C +++ b/src/surfMesh/surfZone/surfZone/surfZoneIOList.C @@ -45,7 +45,11 @@ Foam::surfZoneIOList::surfZoneIOList "(const IOobject& io)"; - if (readOpt() == IOobject::MUST_READ) + if + ( + readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) { surfZoneList& zones = *this; diff --git a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C index 090b1091aee..1846f579714 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C @@ -587,7 +587,7 @@ Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer filmRegionName_, time_.timeName(), time_, - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ), nHat_ diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C index 6eeb1398fe0..5dfb27e1a0f 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C +++ b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C @@ -74,7 +74,7 @@ Foam::surfaceFilmModels::surfaceFilmModel::surfaceFilmModel "surfaceFilmProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -101,7 +101,7 @@ Foam::surfaceFilmModels::surfaceFilmModel::surfaceFilmModel "surfaceFilmProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C index 78ac50b30f2..57347f91325 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C +++ b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C @@ -46,7 +46,7 @@ Foam::surfaceFilmModels::surfaceFilmModel::New "surfaceFilmProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index eed0b677d3a..91c6be60fc7 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -153,7 +153,7 @@ Foam::basicThermo::basicThermo(const fvMesh& mesh) "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C index e6f2d195f03..93b88ad4c47 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C +++ b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C index b5f8c88073c..78423b0234a 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::basicRhoThermo> Foam::basicRhoThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C index 5d8e0285e9d..7aa4c2613e3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C @@ -45,7 +45,7 @@ Foam::basicChemistryModel::basicChemistryModel(const fvMesh& mesh) "chemistryProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C index 38d88071f1f..59addc69aab 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::psiChemistryModel> Foam::psiChemistryModel::New "chemistryProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C index 95a6100de51..89439028c93 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::rhoChemistryModel> Foam::rhoChemistryModel::New "chemistryProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index f3e7e6ccc1a..ca85cac0da7 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -40,7 +40,7 @@ Foam::autoPtr<Foam::laminarFlameSpeed> Foam::laminarFlameSpeed::New "combustionProperties", ct.T().time().constant(), ct.T().db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C index 47377598827..90f6c8e54de 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C @@ -203,7 +203,7 @@ void Foam::interpolationLookUpTable<Type>::readTable fileName_, instance, mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C index fd17fe5fd97..d82e1ffe3e6 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C @@ -51,7 +51,7 @@ Foam::radiation::radiationModel::radiationModel(const volScalarField& T) "radiationProperties", T.time().constant(), T.mesh(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -79,7 +79,7 @@ Foam::radiation::radiationModel::radiationModel "radiationProperties", T.time().constant(), T.mesh(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C index 1437b9195d5..861708ebecb 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C @@ -44,7 +44,7 @@ Foam::radiation::radiationModel::New "radiationProperties", T.time().constant(), T.mesh(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C index 7065df6d07a..aa1d03316d2 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C index 5fb31430e72..20117977aaa 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hhuCombustionThermo> Foam::hhuCombustionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C index 4e4aecb6c78..9edb9111c29 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C index 3a186ec5ee9..df17d001f0a 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C index 3607d3458b6..0520bb72892 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hsReactionThermo> Foam::hsReactionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hsReactionThermo> Foam::hsReactionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C b/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C index 44d22a11153..88ce5782ad3 100644 --- a/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C +++ b/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C @@ -272,8 +272,9 @@ Foam::linearValveFvMesh::linearValveFvMesh(const IOobject& io) "dynamicMeshDict", time().constant(), *this, - IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false ) ).subDict(typeName + "Coeffs") ), diff --git a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C index 636e440b31e..f82895bf3bd 100644 --- a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C +++ b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C @@ -347,8 +347,9 @@ Foam::linearValveLayersFvMesh::linearValveLayersFvMesh(const IOobject& io) "dynamicMeshDict", time().constant(), *this, - IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false ) ).subDict(typeName + "Coeffs") ) diff --git a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C index 6a050e1c701..e4049f988ab 100644 --- a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C +++ b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C @@ -289,8 +289,9 @@ Foam::mixerFvMesh::mixerFvMesh "dynamicMeshDict", time().constant(), *this, - IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false ) ).subDict(typeName + "Coeffs") ), diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C index 7de4dcce20f..b319e1807ae 100644 --- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C +++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C @@ -257,8 +257,9 @@ Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(const IOobject& io) "dynamicMeshDict", time().constant(), *this, - IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false ) ).subDict(typeName + "Coeffs") ), diff --git a/src/transportModels/incompressible/transportModel/transportModel.C b/src/transportModels/incompressible/transportModel/transportModel.C index c9a0c8e20d8..e45e8206a92 100644 --- a/src/transportModels/incompressible/transportModel/transportModel.C +++ b/src/transportModels/incompressible/transportModel/transportModel.C @@ -43,7 +43,7 @@ Foam::transportModel::transportModel "transportProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ) diff --git a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C index dc044c2d17a..849ab59c14d 100644 --- a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C +++ b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C @@ -46,8 +46,26 @@ Foam::surfacePatchIOList::surfacePatchIOList "(const IOobject& io)"; - if (readOpt() == IOobject::MUST_READ) + if + ( + readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "surfacePatchIOList::surfacePatchIOList\n" + "(\n" + " const IOobject&\n" + ")" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + + surfacePatchList& patches = *this; // read polyPatchList diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index e95f9def5c5..bf1f726c32c 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -70,7 +70,7 @@ LESModel::LESModel "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -111,7 +111,7 @@ autoPtr<LESModel> LESModel::New "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 755318a1d8c..64594ff010e 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -71,7 +71,7 @@ RASModel::RASModel "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -117,7 +117,7 @@ autoPtr<RASModel> RASModel::New "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C index 89eaaabd480..f85e8f5440a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C @@ -36,7 +36,7 @@ Foam::regionProperties::regionProperties(const Time& runTime) "regionProperties", runTime.time().constant(), runTime.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 19f31068bf6..da27aa55ec9 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -81,7 +81,7 @@ autoPtr<turbulenceModel> turbulenceModel::New "turbulenceProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 574e387f1c4..1246bdc801b 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -69,7 +69,7 @@ LESModel::LESModel "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -108,7 +108,7 @@ autoPtr<LESModel> LESModel::New "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 87d50dedd7f..27e465720fa 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -70,7 +70,7 @@ RASModel::RASModel "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -115,7 +115,7 @@ autoPtr<RASModel> RASModel::New "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C index 79e9ab8383b..d211671ff46 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C @@ -138,7 +138,7 @@ nutUTabulatedWallFunctionFvPatchScalarField uPlusTableName_, patch().boundaryMesh().mesh().time().constant(), patch().boundaryMesh().mesh(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ), diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index 1aeea66fd31..79e94c07415 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -77,7 +77,7 @@ autoPtr<turbulenceModel> turbulenceModel::New "turbulenceProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) -- GitLab