diff --git a/TODO b/TODO index de142d2889..aab3581489 100644 --- a/TODO +++ b/TODO @@ -1,100 +1,23 @@ -- allocate/free tags. -Not tested. - -OK - test blockMesh with cyclics -unitTestCases/singleCyclic/ - -OK - test cyclics sequential running. -unitTestCases/singleCyclic/ - -OK - test decomposePar -tested channel395 - -OK - FaceCellWave - unitTestCases/twoCavityCyclicForWallDistance/ - -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 +- check + new fvMesh + new fvMeshSubset +for consistency with createMesh.H + + + +- Check the following: + +doc/changes/inotify.txt + + + + + + + + + + -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 77af096bf8..0d80908542 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 20fd654cef..ba1d5dcd80 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 3359f2896c..616afe1a88 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 54a0bc45ec..07731be3d6 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 385b9e53f0..32b525859e 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 74a18ab6f5..233383ab1c 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 9f4435b251..acc5cb7868 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 da0a3a94a2..58b0626fb4 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 687d83ea94..84cf9b9756 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 95bda05606..9a6274bb1a 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 ab51afe283..f0bcf7597f 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 ab51afe283..f0bcf7597f 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 435bcb7745..5a63169d12 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 1fc57fc5fd..4e19adaae4 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 3b8c82c8e5..2be7ce63ff 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 1fc57fc5fd..4e19adaae4 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 1502e2033a..c30f65b445 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 d8dad7d800..82f3655f46 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 1502e2033a..c30f65b445 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 b94745d9df..3f43981907 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 64522273b8..04c86c4edb 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 a3712c19aa..22d4008921 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 04e05c032d..fb5a004932 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 6cdbbe2bde..dc0da4d2a3 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 89eaaabd48..f85e8f5440 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 e99a990013..90a6664989 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 87c93c9195..abaee647c7 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 6a7d6b9a80..02093c3938 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 d609c18614..d8a8bf8d06 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 ab51afe283..f0bcf7597f 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 179ac149ba..0ad057e229 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 ab51afe283..f0bcf7597f 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 8048acd648..909d0351f7 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 ab51afe283..f0bcf7597f 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 ab51afe283..f0bcf7597f 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 9367838a52..57bb7e88d5 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 1ae6219fd6..015cfbb837 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 d3fbb9307a..3740f10563 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 bffffd6aae..27da4ad0c0 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 c8e05c4209..75d19c6779 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 8a12690581..308a1089fb 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 611ce8fa16..57096ebd0c 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 3acbf758d0..c1b319cbc9 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 91bd5f3da2..9f256bd689 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 a4c3082fb5..12e10a607b 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 ea64f13026..57714aa787 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 583701322b..456f0d478d 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 a98d803bf3..19abc81611 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 9b305731db..8b2339233c 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 33486ec301..05a7e5c57c 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 57629b5980..d0f668c8c9 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 72744a9f8d..246380a029 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 c2f3640f2d..3ef371188e 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 0b09b7859d..21c9f5867a 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 7cd57e792d..befadc88e2 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 561cef9bfd..103d963be5 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 8f79846050..f5ad8412f7 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 85a92405dd..d722c432e3 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 85a92405dd..d722c432e3 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 3f8086bb80..a0baebaae7 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 1d0ce53e73..9d28de4109 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 e93112a431..7ced14726d 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 43652bbbea..7f80d01e5d 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 f5b79e7de1..96a092fb22 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 6116514701..138898842b 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 ba3170d281..f890c84546 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 495e07f290..19a80bac5f 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 733cef024b..9790aec1e1 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 6f1c9957e4..54fd6e0dee 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 b50db4a76c..5130f14da3 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 6575c31dd3..2cc5c26b1a 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 c3a2003d40..5df7310f8e 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 d469054ca3..35f6544f4d 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 ecf12f8b13..491ada9a43 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 b19e03ab19..60b547dfd2 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 a73b46621e..1cd6f06b03 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 a7483a210c..d11d2ae5ba 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 e18963c3d1..536eed7fb4 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 61c126e492..d7ede226bf 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 8985861582..ccc1ec2948 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 ddb1f663ad..d750108654 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 8c9cb58717..7d71845adb 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 1e4bdd4292..cef26f6c35 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 53bd1a2488..391eee5237 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 1fc57fc5fd..4e19adaae4 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 a94f474d11..8e26d3f33a 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 60063b9d22..bcf5625a07 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 69a201e558..e917feaa70 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 d779a6427d..edd7d7e752 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 596273a9bd..11975d3717 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 cce68316c0..ce0c4a8a69 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 0cdf0cbe77..202ebad86d 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 72dae9f838..0eabfe6d3c 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 6e329a271f..abefc1a0b2 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 b3cbd8c8bc..6676403d53 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 9c5b70c968..8f9e755d45 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 dda71c3565..3995031b53 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 c9c02d199b..7a0c9baae3 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 2103aa242d..f7f0246c98 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 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, state_, iter) diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index b9a0a25893..77617b64fc 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 32ce285bfd..4bb0a7c6c3 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 fc85d5fa26..1f296fb7da 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 3b16672ea4..4af4f27073 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C @@ -32,9 +32,21 @@ Foam::IOField::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::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::IOField(const IOobject& io, const Field& f) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOField::IOField(const IOobject&, const Field&)") + << "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::IOField(const IOobject& io, const Xfer >& f) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "IOField::IOField(const IOobject&, const Xfer >&)" + ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + Field::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 39e0554b04..3e9b785607 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C @@ -32,9 +32,20 @@ Foam::IOList::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::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::IOList(const IOobject& io, const List& list) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOList::IOList(const IOobject&, const List&)") + << "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::IOList(const IOobject& io, const Xfer >& list) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "IOList::IOList(const IOobject&, const Xfer >&)" + ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + List::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 54f3646b10..67d95333c4 100644 --- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C +++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C @@ -34,7 +34,10 @@ Foam::IOMap::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::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::IOMap(const IOobject& io, const Map& 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::IOMap(const IOobject& io, const Xfer >& 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 ad3ef2e4cd..565c77e0fb 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C @@ -35,7 +35,10 @@ Foam::IOPtrList::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::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::IOPtrList(const IOobject& io, const PtrList& 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::IOPtrList(const IOobject& io, const Xfer >& 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 136c6bbd18..c5a3778958 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 0afa8d69b3..90772004e9 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 7596fee0c9..1021ba012e 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 11031875df..dd6d1e98ed 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()) + // Time handling is special since controlDict_ is the one dictionary + // that is not registered to any database. + + if (controlDict_.readIfModified()) { - anyModified = controlDict_.modified() || objectRegistry::modified(); - bool anyModifiedOnThisProc = anyModified; - reduce(anyModified, andOp()); - - if (anyModifiedOnThisProc && !anyModified) - { - WarningIn("Time::readModifiedObjects()") - << "Delaying reading objects due to inconsistent " - "file time-stamps between processors" - << endl; - } + 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 e588aeef4c..b41a6bb944 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 b4e35c43a0..daef2de16f 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 30ce98564d..6309714e1a 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, *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, *this, iter) { if (objectRegistry::debug) { diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.H b/src/OpenFOAM/db/objectRegistry/objectRegistry.H index 10165b3e97..512c1858ed 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 22244ff8ac..bdbd9468ce 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 f3c2cc83f8..59e075420f 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 b092d0150d..47127ce868 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 42b43a51e5..0082c936c6 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)) + if (modified()) { - readFile = true; - } - - if (Pstream::parRun()) - { - bool readFileOnThisProc = readFile; - reduce(readFile, andOp()); - - if (readFileOnThisProc && !readFile) - { - WarningIn("regIOobject::readIfModified()") - << "Delaying reading " << name() - << " of class " << headerClassName() - << " due to inconsistent " - "file time-stamps between processors" - << endl; - } - } - - if (readFile) - { - 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 1f2c174fb4..8c03003e82 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 b4960c341d..9b6ad293f0 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -111,12 +111,16 @@ Foam::GeometricField::readField(Istream& is) template class PatchField, class GeoMesh> bool Foam::GeometricField::readIfPresent() { - if (this->readOpt() == IOobject::MUST_READ) + if + ( + this->readOpt() == IOobject::MUST_READ + || this->readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) { WarningIn ( "GeometricField::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 5aa40ae572..71359e5dab 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 9becd91b60..ff70e0b93a 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 f23a05879f..3a1ff00b32 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 fe1c6de03e..babb31b6e8 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::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& zones = *this; // Read zones diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index 9a4c920dfa..a37db88c69 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -39,7 +39,7 @@ Foam::autoPtr 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 cd937135fd..18e4a32d78 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 5ecd3efdb9..5e992af101 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 420304ecf7..88b7e521c0 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 efc29c2afc..a225c4430e 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::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 744fceb2d5..9450b2c717 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&, 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 1f7de13aba..dcb9534417 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& modifiers = *this; // Read modifiers diff --git a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C index 4fe2165606..d8637404cb 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 b827036fd3..d34b881cc9 100644 --- a/src/engine/engineMesh/engineMesh/engineMeshNew.C +++ b/src/engine/engineMesh/engineMesh/engineMeshNew.C @@ -44,7 +44,7 @@ Foam::autoPtr 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 822f8224a8..2f9ec62313 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 5ceb48af51..cf7bdc8ff8 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 626718c932..e753196cde 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 5c2eb2ea76..20d358235b 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::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 6f5af3bfab..b4351f34c7 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 e77b6c77a0..37b09def99 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 977fdb89a0..e1613e584d 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 24a65c1685..0744ac3fd4 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -45,7 +45,7 @@ void Foam::Cloud::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 4f98523b07..6ff9319f9a 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 0d9e84533d..ef819f62d3 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::DsmcCloud cloudName + "Properties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -830,7 +830,7 @@ Foam::DsmcCloud::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 7fc3cf8636..10fccde371 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::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 9b44324461..c56ff29618 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::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 ebe1781e6f..b257b7eece 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 55f24f100f..5fef0b1d0d 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 a54ef7f153..f9d8dd683c 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 753b760b14..625116d525 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 70bfa897a9..a046f05050 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 96ce8b6cbe..b934db15ef 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 0a387c669f..70de4a799c 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 ed552af24b..00669101c8 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 64c1a29ed1..00870ee652 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 fb9e79164b..b4530e5b6e 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 a47a8b83cc..f27a3f8f49 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 0d6338ebb0..e355d79490 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 91094607b4..5cc6a1260d 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -374,7 +374,7 @@ Foam::MeshedSurface::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 430b1d2006..c5619801dc 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 090b1091ae..1846f57971 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 6eeb1398fe..5dfb27e1a0 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 78ac50b30f..57347f9132 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 eed0b677d3..91c6be60fc 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 e6f2d195f0..93b88ad4c4 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::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 b5f8c88073..78423b0234 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::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 5d8e0285e9..7aa4c2613e 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 38d88071f1..59addc69aa 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::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 95a6100de5..89439028c9 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::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 f3e7e6ccc1..ca85cac0da 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -40,7 +40,7 @@ Foam::autoPtr 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 4737759882..90f6c8e54d 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::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 fd17fe5fd9..d82e1ffe3e 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 1437b9195d..861708ebec 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 7065df6d07..aa1d03316d 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::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::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 5fb31430e7..20117977aa 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::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 4e4aecb6c7..9edb9111c2 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::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::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 3a186ec5ee..df17d001f0 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::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::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 3607d3458b..0520bb7289 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::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::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 44d22a1115..88ce5782ad 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 636e440b31..f82895bf3b 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 6a050e1c70..e4049f988a 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 7de4dcce20..b319e1807a 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 c9a0c8e20d..e45e8206a9 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 dc044c2d17..849ab59c14 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 e95f9def5c..bf1f726c32 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::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 755318a1d8..64594ff010 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::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 89eaaabd48..f85e8f5440 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 19f31068bf..da27aa55ec 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -81,7 +81,7 @@ autoPtr 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 574e387f1c..1246bdc801 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::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 87d50dedd7..27e465720f 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::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 79e9ab8383..d211671ff4 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 1aeea66fd3..79e94c0741 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -77,7 +77,7 @@ autoPtr turbulenceModel::New "turbulenceProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false )