diff --git a/TODO b/TODO new file mode 100644 index 0000000000000000000000000000000000000000..aab3581489b42f7039305521c1c0ded91d800a2f --- /dev/null +++ b/TODO @@ -0,0 +1,23 @@ +- check + new fvMesh + new fvMeshSubset +for consistency with createMesh.H + + + +- Check the following: + +doc/changes/inotify.txt + + + + + + + + + + + + + diff --git a/applications/solvers/DNS/dnsFoam/readTransportProperties.H b/applications/solvers/DNS/dnsFoam/readTransportProperties.H index 77af096bf8a46b50328d45d758e1ec14c91301c7..0d80908542768ce4ee95f96875bc48bfc24558e4 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 20fd654ceffcfecacbf4a8dbcdb99e907eeaa02f..ba1d5dcd8029e4de63ae5ea49dc226bec906800b 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 3359f2896c252cef7c7bc79f185856afda6c0132..616afe1a885d3324aec5389b820e90edfd105db6 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 54a0bc45eca17a2e5b3c686c34c73c98789aa9aa..07731be3d6e07f2f23744f180e18eefd4aa573eb 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 385b9e53f0f41c8fa856f99e4268c1d44eb4ff92..32b525859e78865421435bb6a16e03554d1370bc 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 74a18ab6f5affe39d56ff90d41f084cd6e09e4f3..233383ab1cc9c1e524a0ac82d8f87a3709c9d616 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 9f4435b2519e27142055e9257f898391adb3a635..acc5cb78686f04cd910f5762aa77d3e678db8ff2 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 da0a3a94a2481a75efae0aeda45783bd865d0b3e..58b0626fb415105c78eb5cfc8d05ba0670956cc7 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 687d83ea9460c0710244607376d37d6e476746a6..84cf9b9756a8ca420c58fdfeb5f64b3fcf6f0843 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 95bda056065ba96ea419070c6a751a3c6d1ad101..9a6274bb1a7a6c4ab0ccb48cc7a0d570109ab7ae 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 ab51afe28361cdf65bc74af68961a6732535d6b3..f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc 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 ab51afe28361cdf65bc74af68961a6732535d6b3..f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc 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 435bcb7745e8c32b89a1c2991f6b0fd9192a42a5..5a63169d123480ab6bcc647672701934cd5cd608 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 1fc57fc5fdc6ef0a6d8d232922fa06f124314a3a..4e19adaae48e5d432cde086746bd2472899eab33 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 3b8c82c8e5976907c6d6143caf91401e2d247c87..2be7ce63ffd7945674765e568f17eaf95785f69a 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 1fc57fc5fdc6ef0a6d8d232922fa06f124314a3a..4e19adaae48e5d432cde086746bd2472899eab33 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 1502e2033a05c54d882dd06ea42731938527d1a8..c30f65b445886d784d88d0f421f99865fcd423cc 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 d8dad7d80036abcccef5cde70fcdbbe6c9e5ffdc..82f3655f4650f7cc4e4ae6f5627d6aebdd806c81 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 1502e2033a05c54d882dd06ea42731938527d1a8..c30f65b445886d784d88d0f421f99865fcd423cc 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 b94745d9df20114094e7b75fdff62d15042164eb..3f43981907d797f26b14afc96465c32e390e8ec6 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 64522273b81124124f141993ea46a4810f493410..04c86c4edb5655fdea66b7f96ff89e392f353380 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 a3712c19aa1d7baaa5c2a03572b22938d30d6cbc..22d40089213178d452b55a42c2b3ecd503afa61d 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 04e05c032d088f68a1d151fbff6e57448785b426..fb5a00493222b712387c1e8253f05925b264309b 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 6cdbbe2bde3c24d5d5a49f631a0fbd36db924cf9..dc0da4d2a3ed8656c291a702e4a50113cfdc5082 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 89eaaabd480e979ba7b368e9755a872c70dbe9b2..f85e8f5440ac4581d2f9df3f361f5828e2a6cbb3 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 e99a99001312286bfd50196189bc5863bd3b232d..90a66649892b06729d588dc3ca0edc63b818aa0f 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 87c93c9195880f243c7ac035020345c283fd2450..abaee647c753d14e25258899dcfbcba9acce273f 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 6a7d6b9a80a6407871d5539d410e736177a1b770..02093c39386f9282418fa2cea1ff4a13099009ed 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 d609c186144ddcf804ec00e7ac2b1707735e0c32..d8a8bf8d0629529a7adc7e6e8c3f3eedbf0c76e0 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 ab51afe28361cdf65bc74af68961a6732535d6b3..f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc 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 179ac149badfef1c97ec876a581d746f4195ce69..0ad057e229970748c7d4e3b330643b700fb2dfe2 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 ab51afe28361cdf65bc74af68961a6732535d6b3..f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc 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 8048acd6484c127f2797f533f42e3d2a60a93586..909d0351f7010d177cfa2990a647724585d2dccb 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 ab51afe28361cdf65bc74af68961a6732535d6b3..f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc 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 ab51afe28361cdf65bc74af68961a6732535d6b3..f0bcf7597fcf71f1e9b8ee2dbc879200a85fa2cc 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 9367838a52bcfa3d43337c70396d7c865e4c2504..57bb7e88d50b7ffc42fc61633acd01eed6e67d75 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 1ae6219fd6f9a112fda06c05a63081200a19217f..015cfbb8374c5acb001a46c0232031b6bed6aef9 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 d3fbb9307aa853f5123b03f25290b208bc0cee7c..3740f1056330f92ca9f6b16a615c996f9676b60c 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 bffffd6aae8f75e220ba05c39735c26d8ecfb132..27da4ad0c02b9400c3fdd605e8c7964023aef938 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 c8e05c4209ca9d5494d5b8c01d8bbf77c109c192..75d19c67797d63d3a4d5a2c25263b68ecb83b68a 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 8a1269058106f9edd37a2a4124c68f6410c95021..308a1089fb944e309bf2c4ce153290bb2458913b 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 611ce8fa167caaf2a1eb9f57a985528c1688e6c2..57096ebd0c74100fac28ea906fe17b4ec4504ac2 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 3acbf758d04105e7d3ec4f6aad60035c7398d082..c1b319cbc96c9613a5d379b020b564204d55207e 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 91bd5f3da20abfb3da45716dfaf01aadc86cea5b..9f256bd6891346da0be3844abc2882fb2079bb46 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 a4c3082fb5a71d758afa43660945f6edc1e9759d..12e10a607b4dc4effa5e04a0f1b59697df48e7d7 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 ea64f13026b379739aa4d88f7f3f317c99c04f1d..57714aa787144ff08e6d273d8efba6fb2d451f99 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 583701322b08f0f885d0b669bdbfeb3de609da63..456f0d478d5155a407acf1604f415cc43e50a75e 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 a98d803bf37a82105798bb0e37c89291e688d91b..19abc81611fbdc5537900c49c2b32c3fcd83cbcb 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 9b305731db1bc553970847b26157bae5b7fde558..8b2339233ca079d9447b2cf14fb16f2db9d1eeca 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 33486ec3017350fc6ab008d10fdbfebb70e2190d..05a7e5c57cd48b56be8e503652dcad64bf07242a 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 57629b598071af0bb21eb02f0472fcaf9c0cf0be..d0f668c8c9b96f02cfd766805e5c5d4b8e439b98 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 72744a9f8d5c9413da5e8509f77fd715942cce48..246380a029f178c9bb313acdcecff41c9d677b77 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 c2f3640f2d14a44ddf5a4c300e774e34f81b7b52..3ef371188ec587ae08786b635f8e8390d138c917 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 0b09b7859d730cb90cbb079deaef88d690eee64b..21c9f5867a2f1ac273fd646b70590e86cadf6a84 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 7cd57e792d5d47a4c4f774a53b1fac4a7e86d951..befadc88e2d22e062614618b9b99e9f6418a162b 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 561cef9bfdf198d66d054532ab3488d7b951710a..103d963be5a67ad02d9ed459f85e30d0c4f0a193 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 8f79846050462adf87eef46794ce980c6c5ccb70..f5ad8412f7900167cfde4e07f4eebfd107ab3fba 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 85a92405dda760fbbfc5931102afe41aa602b2e6..d722c432e3b4aa5a45e7c11c1e5bfcd7c6d4f7a8 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 85a92405dda760fbbfc5931102afe41aa602b2e6..d722c432e3b4aa5a45e7c11c1e5bfcd7c6d4f7a8 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 3f8086bb8038dd03236912dec6721cd43e19c73b..a0baebaae710f6e487bd78766da9a324f9833848 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 1d0ce53e738dbca14b26132551ef01904b74d590..9d28de41093fcfb309484a84ea1854c667239711 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 e93112a4313c8b32224ec8e4430d0bef365c3650..7ced14726d9a901280d58cdf90e24c84550b4668 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 43652bbbeaeac27c05de5134a3dc84811e6558ad..7f80d01e5d96cc4bb2e60c78219af6be6209fc31 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 f5b79e7de14fd43036079129b475179bbfdda276..96a092fb2277d7a3d11e233e7cfb7cea68bb41dd 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 6116514701ec01f592c2a7b6995adc6768fcd32a..138898842bf2e8b6fd3e38b960272a14f16b3aa3 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 ba3170d281051a4505272fa2539d079f773fdf9a..f890c845466467ee53a7f8e41fa3a74c212e2528 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 495e07f2901be7a3aa329a2b83021b7a3cf2cfea..19a80bac5f0585be8b69fdde2210184f35181594 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 733cef024b8bd8a44f9d3ab80e8b56a6e58b9a7d..9790aec1e147754e1ac85c65c3b02c6989f6c614 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 6f1c9957e4d1f4b3926a65a05a3a02b2565f94e6..54fd6e0deeafc15ccbbb61e18ecc76d21a16f4e5 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 a3f678686126036a14e743bc9948e77a43cd623a..2009375040dadefa4263cc642b063a73c30530e6 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -169,7 +169,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 6575c31dd3eb4a3095051b00b3ce4ec23e59170e..2cc5c26b1a405e8f6e952cd17f88cef66c260141 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 c3a2003d40bc1864654e4d07a560ffd932ec9e41..5df7310f8ea3fffc7cdebf5db99747300e7c60d4 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 d469054ca311380efba1d5ef8e96c09245715124..35f6544f4d15e9f7b504df9bf8c040f10fa4a007 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 ecf12f8b1373f9debc0759b99c4e0625004c9284..491ada9a43d9c628d295b70555ccec2c2dee0d84 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 b19e03ab1981b4ecb5f615411c306fcb8d081ff3..60b547dfd2c904eedf5221271c33953c3ecd8c16 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/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C index a7483a210c0e735b6c37edb56842588c1c789786..d11d2ae5babdebf68b2a1f26903d0653eda63629 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/lagrangian/particleTracks/createFields.H b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H index 61c126e492a51ed4773ad6009bba9d04ce0a4884..d7ede226bf7d4ea71bb583ba82fb2c0c5f15098a 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 898586158204c66e50f3a6e837fc9a63c0495af6..ccc1ec294843ff4417c88cebae9ecbbed7695779 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 ddb1f663ad79da9a30b417ab6ff79315850e05ba..d7501086542d522d83f95746554f7cae71e2971d 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 8c9cb5871722cc42a325fdc82fac6a57d6734c56..7d71845adb898ddd9411ea085f77e6642a5aaec7 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 1e4bdd42928b859ca367e3420a7905e0bc0aa303..cef26f6c352803ff9d068a26566607c25868c1be 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 53bd1a24880b96271ab57b24ab7a92ff00da2e8b..391eee52374032b54be2335e1c7da5636a12b09c 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 1fc57fc5fdc6ef0a6d8d232922fa06f124314a3a..4e19adaae48e5d432cde086746bd2472899eab33 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 a94f474d110e90a2f7c38fc8b09e8a09064f50e6..8e26d3f33aac0b6809bec9d9008947a721a94a73 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 60063b9d2248ed9501c1c9f678e9cf232a7d60ca..bcf5625a07c1d38d41d2140735288b79c8e14af9 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 69a201e5587301b0e97712e0f7e0ca020851b690..e917feaa708a98ac31a5e1a98c606fa2760fe67a 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 d779a6427d3d864fec5486755e63fae1d3c6387f..edd7d7e752138e81ac606f287dfc0124f4adb7d4 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 596273a9bdc520c357e1d0dd2822a428ea0c88c6..11975d3717f15819ae506f9866f1bdf7e77b2405 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 f499ab5030ad431cd2fb96746f8c15fc0279ca3b..e615ebe210d49ea877f98a26eeb8f77c8cacc75a 100644 --- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C +++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C @@ -278,7 +278,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 0cdf0cbe7755184df383ded8e15fdfddf5b92a9f..202ebad86d7655cc94826dded54dc40961abf7dc 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 72dae9f8389fd6829333772e078bd63225d97def..0eabfe6d3cb5b4535ff3e17c0836524010a84460 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 6e329a271f7ab1f7f3f968737b3e7cab1b6a95bd..abefc1a0b2bb6fc8d24e5826bf347a48acc9c261 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 b3cbd8c8bcca2ae2f5834421198e8f73c74193f4..6676403d53e5e472bf7413b42a879a9ae64cfbc7 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 9c5b70c96808601fa4bc5e922378ba1982fa4047..8f9e755d45a96ebd0e796c9e143757a075291f8b 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 dda71c3565a0c6f4535efb67deea12da35429944..3995031b536018caeb6e3a1e6c4e9e73eb281c32 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 c9c02d199b4c5e5685a3cddba0ceb31234f471ca..7a0c9baae3784a94640d574e1ebe36ddfe5c9c44 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/doc/changes/inotify.txt b/doc/changes/inotify.txt new file mode 100644 index 0000000000000000000000000000000000000000..146dc55a05a0bd4a35a5398a88856552d0030b8d --- /dev/null +++ b/doc/changes/inotify.txt @@ -0,0 +1,53 @@ +2010-05-28 +Cleanup of automatic regIOobject rereading. + +- all files (usually only IOdictionary) that need to be monitored +should be registered using MUST_READ_IF_MODIFIED. The MUST_READ should +be used for objects that do not need to be re-read (e.g. fields). +In the old system it would actually monitor e.g. 0/U and constant/polyMesh +files. +I've temporarily added a warning in IOdictionary if constructed with MUST_READ. +Same for IOList,IOField,IOMap if constructed with MUST_READ_IF_MODIFIED +(or is rereading supported?). Please let me know if something does not work or +you see the warning + "Dictionary constructed with IOobject::MUST_READ instead of IOobject::MUST_READ_IF_MODIFIED." << nl + + +- any monitored and modified file will get reloaded from the exact path +that was monitored. In the old system it would/could do a re-search through all +times. + + +- all reductions to synchronise status on different processors are done with +a single reduction instead of one reduction per registered object. This could +be quite a gain on large numbers of processors. + + +- all file monitoring is done by an instance of 'fileMonitor' in the Time +class. The fileMonitor class can be found in OSspecific. Default is +to use the (linux-specific) 'inotify' system calls. +If compiled with -DFOAM_USE_STAT it will revert to the current 'stat' system +calls. + + +- inotify does not need timestamps. There is no need for fileModificationSkew +to allow for time differences. (there can still temporarily be a difference +in modified status between different processors due to nfs lagging) + + +- fileMonitor stores two hashtables per file so there is a small overhead +adding and removing files from monitoring. + + +- if runTimeModifiable is false at start of run no files will get monitored, +however if runTimeModified gets set to false during the run the files +will still get monitored (though never reloaded). This is only a hypothetical +problem in that the kernel still stores events for the monitored files. However +inotify is very efficient - e.g. it gets used to track changes on file systems +for desktop search engines. + + +- in the old system one could call modified() on any object and get +and uptodate state. In the new system it will return the state from +the last runTime++ (which if it triggered any re-reads will have reset the +state anyway). diff --git a/src/OSspecific/POSIX/Make/files b/src/OSspecific/POSIX/Make/files index f6e7c2d55eda6f5ffbcc1f0de59451051b45d424..788a08105ae3f40dca14cb2ed15e7ec8af77b363 100644 --- a/src/OSspecific/POSIX/Make/files +++ b/src/OSspecific/POSIX/Make/files @@ -9,6 +9,12 @@ POSIX.C cpuTime/cpuTime.C clockTime/clockTime.C +/* + * Note: fileMonitor assumes inotify by default. Compile with -DFOAM_USE_STAT + * to use stat (=timestamps) instead of inotify + */ +fileMonitor.C + #ifdef SunOS64 dummyPrintStack.C #else diff --git a/src/OSspecific/POSIX/Make/options b/src/OSspecific/POSIX/Make/options index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b7e9d7211b0d99053035f413a747854a47144187 100644 --- a/src/OSspecific/POSIX/Make/options +++ b/src/OSspecific/POSIX/Make/options @@ -0,0 +1,3 @@ +#ifdef SunOS64 +EXE_INC = -DFOAM_USE_STAT +#endif diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C new file mode 100644 index 0000000000000000000000000000000000000000..f7f0246c9869314fc353c0846ebab05e1503115b --- /dev/null +++ b/src/OSspecific/POSIX/fileMonitor.C @@ -0,0 +1,397 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + fileMonitor + +\*----------------------------------------------------------------------------*/ + +#include "fileMonitor.H" +#include "IOstreams.H" +#include "Pstream.H" +#include "PackedList.H" +#include "PstreamReduceOps.H" + +#ifdef FOAM_USE_STAT +# include "OSspecific.H" +# include "regIOobject.H" // for fileModificationSkew symbol +#else +# include <sys/inotify.h> +# include <stropts.h> +# include <sys/ioctl.h> +#endif + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(Foam::fileMonitor, 0); + +template<> +const char* Foam::NamedEnum<Foam::fileMonitor::fileState, 3>::names[] = +{ + "unmodified", + "deleted", + "modified" +}; +const Foam::NamedEnum<Foam::fileMonitor::fileState, 3> + Foam::fileMonitor::fileStateNames_; + + +namespace Foam +{ + // Reduction operator for PackedList of fileState + class reduceFileStates + { + public: + unsigned int operator()(const unsigned int x, const unsigned int y) + const + { + // x,y are sets of 2bits representing fileState + + unsigned int mask = 3u; + unsigned int shift = 0; + unsigned int result = 0; + + while (mask) + { + // Combine state + unsigned int xState = (x & mask) >> shift; + unsigned int yState = (y & mask) >> shift; + + // Combine and add to result. Combine is such that UNMODIFIED + // wins. + unsigned int state = min(xState, yState); + result |= (state << shift); + + shift += 2; + mask <<= 2; + } + 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); + } + }; +} + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +#ifdef FOAM_USE_STAT +void Foam::fileMonitor::checkFiles() const +{ + for + ( + HashTable<label, time_t>::iterator iter = lastModified_.begin(); + iter != lastModified_.end(); + ++iter + ) + { + label watchFd = iter.key(); + const fileName& fName = watchFile_[watchFd]; + time_t newTime = lastModified(fName); + + if (newTime == 0) + { + state_.set(watchFd, DELETED); + } + else + { + time_t oldTime = iter(); + if (newTime > (oldTime + regIOobject::fileModificationSkew)) + { + iter() = newTime; + state_.set(watchFd, MODIFIED); + } + else + { + state_.set(watchFd, UNMODIFIED); + } + } + } +} +#else +void Foam::fileMonitor::checkFiles() const +{ + while (true) + { + struct timeval zeroTimeout = {0, 0}; + + int ready = select + ( + inotifyFd_+1, // num filedescriptors in watchSet_ + &watchSet_, // watchSet_ with only inotifyFd + NULL, + NULL, + &zeroTimeout + ); + + if (ready < 0) + { + FatalErrorIn("fileMonitor::updateStates()") + << "Problem in issuing select." + << abort(FatalError); + } + else if (FD_ISSET(inotifyFd_, &watchSet_)) + { + struct inotify_event inotifyEvent; + + // Read first event + ssize_t nBytes = read + ( + inotifyFd_, + &inotifyEvent, + sizeof(inotifyEvent) + ); + + if (nBytes != sizeof(inotifyEvent)) + { + FatalErrorIn("fileMonitor::updateStates(const fileName&)") + << "Read " << label(nBytes) << " ; expected " + << label(sizeof(inotifyEvent)) + << abort(FatalError); + } + + //Pout<< "mask:" << inotifyEvent.mask << endl; + //Pout<< "watchFd:" << inotifyEvent.wd << endl; + //Pout<< "watchName:" << watchFile_[inotifyEvent.wd] << endl; + + switch (inotifyEvent.mask) + { + case IN_DELETE_SELF: + { + Map<fileState>::iterator iter = + state_.find(label(inotifyEvent.wd)); + iter() = DELETED; + } + break; + + case IN_MODIFY: + case IN_CLOSE_WRITE: + { + Map<fileState>::iterator iter = + state_.find(label(inotifyEvent.wd)); + iter() = MODIFIED; + } + break; + } + } + else + { + // No data. Reset watchSet_ + FD_SET(inotifyFd_, &watchSet_); + return; + } + } +} +#endif + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Null constructor +#ifdef FOAM_USE_STAT + +Foam::fileMonitor::fileMonitor() +: + state_(20), + watchFile_(20), + lastModified_(20) +{} + +#else + +Foam::fileMonitor::fileMonitor() +: + state_(20), + watchFile_(20), + inotifyFd_(inotify_init()) +{ + //- Add notify descriptor to select set + FD_ZERO(&watchSet_); + FD_SET(inotifyFd_, &watchSet_); +} + +#endif + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::fileMonitor::~fileMonitor() +{ + // Remove any remaining files + List<label> watchFds(state_.toc()); + forAll(watchFds, i) + { + removeWatch(watchFds[i]); + } +} + + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::label Foam::fileMonitor::addWatch(const fileName& fName) +{ +#ifdef FOAM_USE_STAT + label watchFd = lastModified_.size(); + lastModified_.insert(watchFd, lastModified(fName)); +#else + label watchFd = inotify_add_watch + ( + inotifyFd_, + fName.c_str(), + //IN_ALL_EVENTS + IN_CLOSE_WRITE | IN_DELETE_SELF | IN_MODIFY + ); +#endif + + if (debug) + { + Pout<< "fileMonitor : added watch " << watchFd << " on file " + << fName << endl; + } + + if (watchFd < 0) + { + WarningIn("fileMonitor::addWatch(const fileName&)") + << "could not add watch for file " << fName << endl; + } + else + { + state_.insert(watchFd, UNMODIFIED); + watchFile_.insert(watchFd, fName); + } + return watchFd; +} + + +bool Foam::fileMonitor::removeWatch(const label watchFd) +{ + if (debug) + { + Pout<< "fileMonitor : removing watch " << watchFd << " on file " + << watchFile_[watchFd] << endl; + } + + state_.erase(watchFd); + watchFile_.erase(watchFd); +#ifdef FOAM_USE_STAT + return lastModified_.erase(watchFd); +#else + return inotify_rm_watch(inotifyFd_, int(watchFd)) == 0; +#endif +} + + +const Foam::fileName& Foam::fileMonitor::getFile(const label watchFd) const +{ + return watchFile_[watchFd]; +} + + +Foam::fileMonitor::fileState Foam::fileMonitor::getState(const label watchFd) +const +{ + return state_[watchFd]; +} + + +void Foam::fileMonitor::updateStates(const bool syncPar) const +{ + checkFiles(); + + if (syncPar) + { + PackedList<2> stats(state_.size()); + label i = 0; + forAllConstIter(Map<fileState>, state_, iter) + { + stats[i++] = (unsigned int)(iter()); + } + // Save local state for warning message below + PackedList<2> thisProcStats(stats); + + if (stats.storage().size() == 1) + { + // Optimisation valid for most cases. + reduce(stats.storage()[0], reduceFileStates()); + } + else + { + Pstream::listCombineGather + ( + stats.storage(), + combineReduceFileStates() + ); + } + + i = 0; + forAllIter(Map<fileState>, state_, iter) + { + if (thisProcStats[i] != UNMODIFIED) + { + if (stats[i] == UNMODIFIED) + { + WarningIn("fileMonitor::updateStates(const bool) const") + << "Delaying reading " << watchFile_[iter.key()] + << " due to inconsistent " + "file time-stamps between processors" + << endl; + } + else + { + unsigned int stat = stats[i]; + iter() = fileState(stat); + } + } + i++; + } + } +} + + +void Foam::fileMonitor::setUnmodified(const label watchFd) +{ +#ifdef FOAM_USE_STAT + lastModified_[watchFd] = lastModified(watchFile_[watchFd]); +#endif + + Map<fileState>::iterator iter = state_.find(watchFd); + + if (iter == state_.end()) + { + FatalErrorIn("fileMonitor::setUnmodified(const label)") + << "Illegal watchFd " << watchFd + << abort(FatalError); + } + + iter() = UNMODIFIED; +} + + +// ************************************************************************* // diff --git a/src/OSspecific/POSIX/fileMonitor.H b/src/OSspecific/POSIX/fileMonitor.H new file mode 100644 index 0000000000000000000000000000000000000000..b9922eb3e2a45a69f9dba7963ddda640206dd4f3 --- /dev/null +++ b/src/OSspecific/POSIX/fileMonitor.H @@ -0,0 +1,159 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + fileMonitor + +Description + Checking for changes to files. + +!!!!!!!NOTE: + Default is to use inotify (Linux specific, since 2.6.13) + + Compile with FOAM_USE_STAT to use the stat function call. + + + - works fine except for if file gets deleted and recreated + it stops monitoring the file! + (does work though if the file gets moved) + +SourceFiles + fileMonitor.C + +\*---------------------------------------------------------------------------*/ + +#ifndef fileMonitor_H +#define fileMonitor_H + +#include <sys/types.h> +#include "Map.H" +#include "NamedEnum.H" +#include "labelList.H" +#include "className.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class fileMonitor; + +/*---------------------------------------------------------------------------*\ + Class fileMonitor Declaration +\*---------------------------------------------------------------------------*/ + +class fileMonitor +{ + +public: + + // Public data types + + //- Enumeration defining the file state. + enum fileState + { + UNMODIFIED = 0, + DELETED = 1, + MODIFIED = 2 + }; + + static const NamedEnum<fileState, 3> fileStateNames_; + +private: + // Private data + + //- State for all watchFds + mutable Map<fileState> state_; + + //- From watch descriptor to filename + HashTable<fileName, label> watchFile_; + +#ifdef FOAM_USE_STAT + + //- From watch descriptor to modified time + mutable HashTable<label, time_t> lastModified_; +#else + //- File descriptor for the inotify instance + int inotifyFd_; + + //- Pre-allocated structure containing file descriptors + mutable fd_set watchSet_; + +#endif + //- Update state_ from any events. + void checkFiles() const; + + //- Disallow default bitwise copy construct + fileMonitor(const fileMonitor&); + + //- Disallow default bitwise assignment + void operator=(const fileMonitor&); + + +public: + + // Declare name of the class and its debug switch + ClassName("fileMonitor"); + + // Constructors + + //- Construct null + fileMonitor(); + + + // Destructor + + ~fileMonitor(); + + + // Member Functions + + //- Add file to watch. Returns watch descriptor + label addWatch(const fileName&); + + //- Remove file to watch. Return true if successful + bool removeWatch(const label watchFd); + + //- Get name of file being watched + const fileName& getFile(const label watchFd) const; + + //- Check state using handle + fileState getState(const label watchFd) const; + + //- Check state of all files. Updates state_. + void updateStates(const bool syncPar) const; + + //- Reset state (e.g. after having read it) using handle + void setUnmodified(const label watchFd); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index b9a0a258935872db02edeca98b1a403d93208667..77617b64fc5f09671e0683ca7af6b2d8958837de 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 32ce285bfd811d95ac48b3f52b9590f0df21057b..4bb0a7c6c34dbf25ee15495fb6b3b4f3ca4d816d 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 fc85d5fa263ea0e16d00f8a2e246b74510f4710f..1f296fb7da748fa43c00b4ded1d45f192a941b63 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 3b16672ea4a36a09b358a7eeaef960fb26d871df..4af4f2707325439300e93e88318cacd4eafe4c47 100644 --- a/src/OpenFOAM/db/IOobjects/IOField/IOField.C +++ b/src/OpenFOAM/db/IOobjects/IOField/IOField.C @@ -32,9 +32,21 @@ Foam::IOField<Type>::IOField(const IOobject& io) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOField::IOField(const IOobject&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -49,9 +61,21 @@ Foam::IOField<Type>::IOField(const IOobject& io, const label size) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOField::IOField(const IOobject&, const label)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -70,9 +94,21 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Field<Type>& f) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOField::IOField(const IOobject&, const Field<Type>&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -91,11 +127,25 @@ Foam::IOField<Type>::IOField(const IOobject& io, const Xfer<Field<Type> >& f) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "IOField::IOField(const IOobject&, const Xfer<Field<Type> >&)" + ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + Field<Type>::transfer(f()); if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOList/IOList.C b/src/OpenFOAM/db/IOobjects/IOList/IOList.C index 39e0554b042e0c37b9d57d6691e4898f2a02c3d9..3e9b785607611ef0b7cb3ef3c438291a0ba5f113 100644 --- a/src/OpenFOAM/db/IOobjects/IOList/IOList.C +++ b/src/OpenFOAM/db/IOobjects/IOList/IOList.C @@ -32,9 +32,20 @@ Foam::IOList<T>::IOList(const IOobject& io) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOList::IOList(const IOobject&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -49,9 +60,20 @@ Foam::IOList<T>::IOList(const IOobject& io, const label size) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOList::IOList(const IOobject&, const label)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -70,9 +92,21 @@ Foam::IOList<T>::IOList(const IOobject& io, const List<T>& list) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("IOList::IOList(const IOobject&, const List<T>&)") + << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -91,11 +125,25 @@ Foam::IOList<T>::IOList(const IOobject& io, const Xfer<List<T> >& list) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "IOList::IOList(const IOobject&, const Xfer<List<T> >&)" + ) << "IOField constructed with IOobject::MUST_READ_IF_MODIFIED" + " but IOField does not support automatic rereading." + << endl; + } + List<T>::transfer(list()); if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C index 54f3646b10444132a451cd13a927f3c710706082..67d95333c461a59744732eb2503b8cee3fb086dc 100644 --- a/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C +++ b/src/OpenFOAM/db/IOobjects/IOMap/IOMap.C @@ -34,7 +34,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -50,7 +53,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const label size) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -71,7 +77,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const Map<T>& map) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -94,7 +103,10 @@ Foam::IOMap<T>::IOMap(const IOobject& io, const Xfer<Map<T> >& map) if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C index ad3ef2e4cd8f27684d07026cf30c1510caccbbd2..565c77e0fb7d145be4a1de2b5f02da1ac3bcdc94 100644 --- a/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C +++ b/src/OpenFOAM/db/IOobjects/IOPtrList/IOPtrList.C @@ -35,7 +35,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const INew& inewt) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -52,7 +55,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -84,7 +90,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const PtrList<T>& list) { if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -107,7 +116,10 @@ Foam::IOPtrList<T>::IOPtrList(const IOobject& io, const Xfer<PtrList<T> >& list) if ( - io.readOpt() == IOobject::MUST_READ + ( + io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C b/src/OpenFOAM/db/IOobjects/IOdictionary/IOdictionary.C index 136c6bbd18f7b6bc6eb6756e114e9cd96e66be4e..c5a377895824d8267af75eca90ea707cd4ba2104 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 0afa8d69b34d9b66c5b6c16add13ef60312902ca..90772004e979d4fe419228bbaafb27512ca2b323 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 7596fee0c9bee183effc5dedabc18855be1f6ff0..1021ba012e4a00cc51935a7c0255221d3369cc98 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 11031875dfbc35a0dcf9cdb03cf21fc199ee651d..dd6d1e98ed62e40f598dc78a53634f2dee122c36 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -180,6 +180,11 @@ void Foam::Time::readDict() controlDict_.readIfPresent("graphFormat", graphFormat_); controlDict_.readIfPresent("runTimeModifiable", runTimeModifiable_); + + if (!runTimeModifiable_ && controlDict_.watchIndex() != -1) + { + removeWatch(controlDict_.watchIndex()); + } } @@ -201,35 +206,28 @@ void Foam::Time::readModifiedObjects() { if (runTimeModifiable_) { - // For parallel runs check if any object's file has been modified - // and only call readIfModified on each object if this is the case - // to avoid unnecessary reductions in readIfModified for each object + // Get state of all monitored objects (=registered objects with a + // valid filePath). + // Note: requires same ordering in objectRegistries on different + // processors! + monitor_.updateStates(Pstream::parRun()); - bool anyModified = true; +//Pout<< "Time : runTimeModifiable_ and watchIndex:" +// << controlDict_.watchIndex() << endl; - if (Pstream::parRun()) - { - anyModified = controlDict_.modified() || objectRegistry::modified(); - bool anyModifiedOnThisProc = anyModified; - reduce(anyModified, andOp<bool>()); + // Time handling is special since controlDict_ is the one dictionary + // that is not registered to any database. - if (anyModifiedOnThisProc && !anyModified) - { - WarningIn("Time::readModifiedObjects()") - << "Delaying reading objects due to inconsistent " - "file time-stamps between processors" - << endl; - } + if (controlDict_.readIfModified()) + { + readDict(); + functionObjects_.read(); } - if (anyModified) - { - if (controlDict_.readIfModified()) - { - readDict(); - functionObjects_.read(); - } + bool registryModified = objectRegistry::modified(); + if (registryModified) + { objectRegistry::readModifiedObjects(); } } diff --git a/src/OpenFOAM/db/Time/findInstance.C b/src/OpenFOAM/db/Time/findInstance.C index e588aeef4ca26d99b5a5f90201a43c7c398d6fc5..b41a6bb9441711626709d7c88b388e8d1c7c07c1 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 b4e35c43a03fba1739a17f5caedbcad8e861c3d6..daef2de16f45f9034f54bf056e8877bf0719a56e 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 30ce98564d6210ed28beffeaea0e099d00663e74..6309714e1aed5c17b95b4bd9c8a90186033f0cd0 100644 --- a/src/OpenFOAM/db/objectRegistry/objectRegistry.C +++ b/src/OpenFOAM/db/objectRegistry/objectRegistry.C @@ -273,7 +273,7 @@ void Foam::objectRegistry::rename(const word& newName) bool Foam::objectRegistry::modified() const { - for (const_iterator iter = cbegin(); iter != cend(); ++iter) + forAllConstIter(HashTable<regIOobject*>, *this, iter) { if (iter()->modified()) { @@ -317,7 +317,7 @@ bool Foam::objectRegistry::writeObject { bool ok = true; - for (const_iterator iter = cbegin(); iter != cend(); ++iter) + forAllConstIter(HashTable<regIOobject*>, *this, iter) { if (objectRegistry::debug) { diff --git a/src/OpenFOAM/db/objectRegistry/objectRegistry.H b/src/OpenFOAM/db/objectRegistry/objectRegistry.H index 10165b3e97742918742d0e3d0629bf4677b65773..512c1858ed75d77a49642326a7907795fb7061e6 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 22244ff8ace94e81b7cc7abc1618ab6f88c23c81..bdbd9468ce912de8f8f1214852ac6c00d0f2dd3b 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 f3c2cc83f8bc72915e4abf609e3710d6d1796520..59e075420fe7a5a8c2c152359f0f28e2681cef76 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 b092d0150d13e81b884ccaebf4310f0bd9778941..47127ce86830e23d2d6b4deff5e7f277ed0fb10f 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 42b43a51e580a6ee2ae29083b91f4059ef63c695..0082c936c6499f76947d3b6f88ff3731035a3871 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -26,7 +26,7 @@ License #include "regIOobject.H" #include "IFstream.H" #include "Time.H" -#include "PstreamReduceOps.H" +//#include "PstreamReduceOps.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -52,14 +52,26 @@ Foam::Istream& Foam::regIOobject::readStream() // Construct object stream and read header if not already constructed if (!isPtr_) { - if (!(isPtr_ = objectStream())) + + fileName objPath; + if (watchIndex_ != -1) + { + // File is being watched. Read exact file that is being watched. + objPath = time().getFile(watchIndex_); + } + else + { + objPath = filePath(); + } + + if (!(isPtr_ = objectStream(objPath))) { FatalIOError ( "regIOobject::readStream()", __FILE__, __LINE__, - objectPath(), + objPath, 0 ) << "cannot open file" << exit(FatalIOError); @@ -72,9 +84,10 @@ Foam::Istream& Foam::regIOobject::readStream() } } - if (!lastModified_) + // Mark as uptodate if read succesfully + if (watchIndex_ != -1) { - lastModified_ = lastModified(filePath()); + time().setUnmodified(watchIndex_); } return *isPtr_; @@ -151,49 +164,27 @@ bool Foam::regIOobject::read() bool Foam::regIOobject::modified() const { - return - ( - lastModified_ - && lastModified(filePath()) > (lastModified_ + fileModificationSkew) - ); + if (watchIndex_ != -1) + { + return time().getState(watchIndex_) != fileMonitor::UNMODIFIED; + } + else + { + return false; + } } bool Foam::regIOobject::readIfModified() { - if (lastModified_) + if (watchIndex_ != -1) { - time_t newTimeStamp = lastModified(filePath()); - - bool readFile = false; - - if (newTimeStamp > (lastModified_ + fileModificationSkew)) - { - readFile = true; - } - - if (Pstream::parRun()) - { - bool readFileOnThisProc = readFile; - reduce(readFile, andOp<bool>()); - - if (readFileOnThisProc && !readFile) - { - WarningIn("regIOobject::readIfModified()") - << "Delaying reading " << name() - << " of class " << headerClassName() - << " due to inconsistent " - "file time-stamps between processors" - << endl; - } - } - - if (readFile) + if (modified()) { - lastModified_ = newTimeStamp; + const fileName& fName = time().getFile(watchIndex_); Info<< "regIOobject::readIfModified() : " << nl - << " Reading object " << name() - << " from file " << filePath() << endl; + << " Re-reading object " << name() + << " from file " << fName << endl; return read(); } else diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C b/src/OpenFOAM/db/regIOobject/regIOobjectWrite.C index 1f2c174fb44409f3e8b0fa4ba41ca1d30462bc84..8c03003e82a514218d4952477eea10ff24b5b1d7 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 f420291fd6bcc08adb2285b125fade918f5bb0ac..286d1721bee3062df7e7379ea389f6c3db502188 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -112,12 +112,16 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::readField(Istream& is) template<class Type, template<class> class PatchField, class GeoMesh> bool Foam::GeometricField<Type, PatchField, GeoMesh>::readIfPresent() { - if (this->readOpt() == IOobject::MUST_READ) + if + ( + this->readOpt() == IOobject::MUST_READ + || this->readOpt() == IOobject::MUST_READ_IF_MODIFIED + ) { WarningIn ( "GeometricField<Type, PatchField, GeoMesh>::readIfPresent()" - ) << "read option IOobject::MUST_READ " + ) << "read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED" << "suggests that a read constructor for field " << this->name() << " would be more appropriate." << endl; } diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index 5aa40ae572e19d245c9fe683fe625ccbda38a4fa..71359e5dabcae48f3a3b635b1df7cbfbfdb81a91 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 9becd91b604b5c4ff02148cbc8a14d8490cffa81..ff70e0b93ae748ec6ec51835c823d4cd4f303f3d 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 f23a05879f63f1b6a85096743241b4e9aeb94142..3a1ff00b32c9c199dc077f00e524df8817c22ec3 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 fe1c6de03ec9a9ca370ce1ec67093e48930e7f88..babb31b6e85c8900ac78b1f95b6c534a7818afea 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -86,9 +86,24 @@ Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh if ( readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED || (readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "ZoneMesh::ZoneMesh\n" + "(\n" + " const IOobject&,\n" + " const MeshType&\n" + ")" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + PtrList<ZoneType>& zones = *this; // Read zones diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index 9a4c920dfa012355c33a21843d6d4dffdf47db8e..a37db88c6903478b6822d21c3fab7bea1868c689 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -39,7 +39,7 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) "dynamicMeshDict", io.time().constant(), io.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C b/src/dynamicFvMesh/dynamicInkJetFvMesh/dynamicInkJetFvMesh.C index cd937135fd50a4f2b9657969d7675be52a17450c..18e4a32d78caf84ea5de411c1d9a58bc29f5433f 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 5ecd3efdb9f28220ca7aa12b46ea7a021982ddf4..5e992af1017943cad053731cd2017cf1c88af8cd 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 420304ecf7609f729340dbf26a1bd14a5c2943b7..88b7e521c050f47ee57f27eddafd9d5f068f691b 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 efc29c2afc90e2ebcb248a16f0102977f769588e..a225c4430ee8feb02ef907c77da1e836b938f97f 100644 --- a/src/dynamicMesh/motionSolver/motionSolver.C +++ b/src/dynamicMesh/motionSolver/motionSolver.C @@ -47,7 +47,7 @@ Foam::motionSolver::motionSolver(const polyMesh& mesh) "dynamicMeshDict", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -67,7 +67,7 @@ Foam::autoPtr<Foam::motionSolver> Foam::motionSolver::New(const polyMesh& mesh) "dynamicMeshDict", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C index 744fceb2d5ec8663fd187b303e429e3e6ce566bc..9450b2c71702228e8ef7defca3fbfdf835ec7288 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C @@ -331,9 +331,21 @@ Foam::refinementHistory::refinementHistory(const IOobject& io) : regIOobject(io) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "refinementHistory::refinementHistory(const IOobject&)" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -365,9 +377,22 @@ Foam::refinementHistory::refinementHistory freeSplitCells_(0), visibleCells_(visibleCells) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "refinementHistory::refinementHistory" + "(const IOobject&, const List<splitCell8>&, const labelList&)" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { @@ -399,9 +424,22 @@ Foam::refinementHistory::refinementHistory regIOobject(io), freeSplitCells_(0) { + // Temporary warning + if (io.readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn + ( + "refinementHistory::refinementHistory" + "(const IOobject&, const label)" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + if ( io.readOpt() == IOobject::MUST_READ + || io.readOpt() == IOobject::MUST_READ_IF_MODIFIED || (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C index 1f7de13abafd66bf8718b3b46279da7287a211c1..dcb95344175805302e3c5258a7b3fa8ff59f4e50 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C @@ -43,9 +43,19 @@ void Foam::polyTopoChanger::readModifiers() if ( readOpt() == IOobject::MUST_READ + || readOpt() == IOobject::MUST_READ_IF_MODIFIED || (readOpt() == IOobject::READ_IF_PRESENT && headerOk()) ) { + if (readOpt() == IOobject::MUST_READ_IF_MODIFIED) + { + WarningIn("polyTopoChanger::readModifiers()") + << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " does not support automatic rereading." + << endl; + } + + PtrList<polyMeshModifier>& modifiers = *this; // Read modifiers diff --git a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C index 4fe2165606668c92f269da0fdc081f5fd6e24d8e..d8637404cb95683e9b9eb404bc3914674df2a456 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 b827036fd37267708f4b8a3eac643c81ad25b334..d34b881cc9cab85096bbe0db72368ed200ec5b07 100644 --- a/src/engine/engineMesh/engineMesh/engineMeshNew.C +++ b/src/engine/engineMesh/engineMesh/engineMeshNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::engineMesh> Foam::engineMesh::New "engineGeometry", io.time().constant(), io.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/engine/engineTime/engineTime.C b/src/engine/engineTime/engineTime.C index 822f8224a8f62c03af4016ba592e6f2b6247ae67..2f9ec62313d4f7c4af463b27802d00dd07333b7e 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 5ceb48af51eb548b165edd3dc59d6434912f1fba..cf7bdc8ff8021107019ff8cfbe17781c019b3f4f 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 626718c932117bd1b39eba2930a873f60f1c62e0..e753196cdea285b46ea4c3c2c17b670e8108f213 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 5c2eb2ea7625aec12a48fbaddfe6f126b970e5f6..20d358235b154b1eb456e6da7ce9b3e1154613bf 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::SRF::SRFModel> Foam::SRF::SRFModel::New "SRFProperties", Urel.time().constant(), Urel.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C b/src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C index 6f5af3bfab99e4a836fe0c201546ceccc2664963..b4351f34c700d4ad04eed3b40e4c4edfcd32dbb5 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 e77b6c77a01d9eb5407bb237c2d0e139f06c8cd2..37b09def99f5970e364a10e7b02fd65684baf90d 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 977fdb89a0b422ff261b4964251ebe35f7ee7649..e1613e584d9f5e91ca075ef447844e1d5a9ed160 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 9b4bf0d6185863e7fcd32a6d73568d36c8b67968..388fba1c5747f63437260c73d55ca220882cdfeb 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -45,7 +45,7 @@ void Foam::Cloud<ParticleType>::readCloudUniformProperties() time().timeName(), "uniform"/cloud::prefix/name(), db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); diff --git a/src/lagrangian/dieselSpray/spray/spray.C b/src/lagrangian/dieselSpray/spray/spray.C index 4f98523b078a0bb8ae7e44b882edea49fb961f56..6ff9319f9a55f5eb013fe9a3a0ba7c15f9484be8 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 455ee7936da04b5c796a2ee456ab54e88003a748..e748f72077fb7bdaec4f178441bdf082c6cdbc29 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -611,7 +611,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud cloudName + "Properties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -833,7 +833,7 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud cloudName + "Properties", mesh_.time().constant(), mesh_, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 7fc3cf863634c4167d4fc3dc88fd087f5ba1ad4c..10fccde371cc711a59e4d67d21dbf88991c8f062 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -181,7 +181,7 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud cloudName + "Properties", rho.mesh().time().constant(), rho.mesh(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 9b44324461ba87abce6e45c553f9f52fab06b71d..c56ff296183545103ce726d421955a1ed4853ee6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -40,7 +40,7 @@ void Foam::InjectionModel<CloudType>::readProps() owner_.db().time().timeName(), "uniform"/cloud::prefix/owner_.name(), owner_.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ); diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createAutoCorrelationFunctions.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createAutoCorrelationFunctions.H index ebe1781e6fda4b685bcf840ed4bf50db5d4515b6..b257b7eece99e7330cc4b5301b5f776c671b298c 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 55f24f100f8851d9c24afe094b1e5db231714624..5fef0b1d0d4edcf10d6293d6344c89ce3960f9d2 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 a54ef7f153d0a285460028187223c95864f552ab..f9d8dd683c483295a720229a8da30c8f25be2929 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 753b760b14be1f54bcbed37d15c09d332091775b..625116d525c68db7793f76bdc0aa0c480ac0a743 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 70bfa897a933e9bc3833d6f12abff473e524a7aa..a046f05050e1b04207bcb501c7c8fb4e3e751186 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 96ce8b6cbe42726a8c41ffd45bc32da13b5b58a2..b934db15efc5c4ad515d619053ff144b4687c667 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 0a387c669ff885477df44ceeabc6385d3527abab..70de4a799c6921ef0bd3574d19f3778ae97e213f 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 ed552af24b20315f71b40823734e7b5ec8f7146a..00669101c8a667009a0c6e9de6f64d4282f5896d 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 64c1a29ed1ea2853982994d231bef44ab539b738..00870ee652bfc2fc7be4e74b590af24bc05abaee 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 fb9e79164ba1174adec08528469c3080841917e8..b4530e5b6ecd82873335c43decf9eb8a9752ce14 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 a47a8b83cc0a7994551e0937fc1724e1ff31d909..f27a3f8f4903da5e80af134001adccb569d0e806 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/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C index 7f20d750473c8f3cd7748b9881cfac4466566582..51f08c461e0114947d017dd504c66161cac06d44 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C @@ -32,11 +32,11 @@ License defineTypeNameAndDebug(Foam::fieldValues::cellSource, 0); template<> -const char* NamedEnum<fieldValues::cellSource::sourceType, 2>:: +const char* Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 2>:: names[] = {"cellZone", "all"}; -const NamedEnum<fieldValues::cellSource::sourceType, 2> - fieldValues::cellSource::sourceTypeNames_; +const Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 2> + Foam::fieldValues::cellSource::sourceTypeNames_; template<> const char* Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 7>:: diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H index 44f836428a98c9156c3b96504d43413138d70daf..c3a033f64420afdb874e9d35a0d2aee7eda29356 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H +++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H @@ -94,7 +94,7 @@ public: }; //- Source type names - static const NamedEnum<sourceType, 1> sourceTypeNames_; + static const NamedEnum<sourceType, 2> sourceTypeNames_; //- Operation type enumeration diff --git a/src/sampling/include/buildPatch.H b/src/sampling/include/buildPatch.H index 0d6338ebb0321d98b6a60c5cd44f470734dba8dd..e355d794905e9934b93e7b68230e075f2233d7b2 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 91094607b49bd6bc7d855881a72b013ae853c948..5cc6a1260d83ed26b8a065be6dfe6f537cbbe68d 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -374,7 +374,7 @@ Foam::MeshedSurface<Face>::MeshedSurface "dummyName", t.timeName(), t, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ), diff --git a/src/surfMesh/surfZone/surfZone/surfZoneIOList.C b/src/surfMesh/surfZone/surfZone/surfZoneIOList.C index 430b1d200688d2a5b3e54d3941dea138fbe49b3a..c5619801dc67010675827cb88b583f14855e039f 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 090b1091aeecdc4a041333c495c6fa489008fc3a..1846f579714a82f66354b80beeb5c1ef37d5d758 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 6eeb1398fe0e9ccec110681d60381d1b51798f8c..5dfb27e1a0f00fc970c4751607c252c2426d3efe 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 78ac50b30f2d5a0ea79f848a85b0d377468c387f..57347f91325eeeb6df90ef40191d1a649e91cd33 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 eed0b677d3a3ede7689a87fd0d3de064aab85d4c..91c6be60fc7533e2c152e15ea50f3ebe9b4ff3fc 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 e6f2d195f0306e011a9e0c9e529632ff9c2142d2..93b88ad4c47270c3ee91ed80fdb745808d5501ec 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C +++ b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::basicPsiThermo> Foam::basicPsiThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C index b5f8c88073ce5c2f9169f474e4013c31c3dcf2d5..78423b0234a981ca9a41d5d2086c618bc98d4c74 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::basicRhoThermo> Foam::basicRhoThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C index 5d8e0285e9d7920daaa3480b4eb9efe4b565ecec..7aa4c2613e3454dd8f8bce7a9adf7275bbaa4f28 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 38d88071f1fb692bda43be6a0711227cc4267bc6..59addc69aab378a81bdc8bbe930901b2ce1d808e 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::psiChemistryModel> Foam::psiChemistryModel::New "chemistryProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C index 95a6100de511466e455348cfddfd94cd2820af75..89439028c939d7052915fd6daf304f95fb33b302 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C @@ -43,7 +43,7 @@ Foam::autoPtr<Foam::rhoChemistryModel> Foam::rhoChemistryModel::New "chemistryProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index f3e7e6ccc1ab190d2cd607128e13e9f14c8bb8c6..ca85cac0da72bc50d1e22a80f86ccc2bef42fda6 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -40,7 +40,7 @@ Foam::autoPtr<Foam::laminarFlameSpeed> Foam::laminarFlameSpeed::New "combustionProperties", ct.T().time().constant(), ct.T().db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C index 47377598827c3ff369d37b25f7bf65526278a056..90f6c8e54de60b76b4fe892c61bcda610bcfa997 100644 --- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C +++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/interpolationLookUpTable/interpolationLookUpTable.C @@ -203,7 +203,7 @@ void Foam::interpolationLookUpTable<Type>::readTable fileName_, instance, mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModel.C index fd17fe5fd97c00a4096868e16f6fb80707bc9aa9..d82e1ffe3e67beab2119f097978e8091332bb6a1 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 1437b9195d5c21d7e60ab47294ec0dcd35503f97..861708ebecb9a4bbd1e7beb4c08c299f7f38a873 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 7065df6d07aa1e2bb8766e0a0810a68f31839c63..aa1d03316d28f2ddd1e02b4fea81bfc31e430c3a 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hCombustionThermo> Foam::hCombustionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C index 5fb31430e725f865897d00912f0c686481a6efb8..20117977aaa5f9576889a7e7cee7f25f660fc76c 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hhuCombustionThermo> Foam::hhuCombustionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C index 4e4aecb6c78e5d2ef3f48eccb87d4dfb8f337d70..9edb9111c2930d32b289fea0c94bf2c25c31c844 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hsCombustionThermo> Foam::hsCombustionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C index 3a186ec5ee924beffb703a3b934ff94fb9b99ace..df17d001f0a1b4f624a8086ee2221d9ff8096184 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hReactionThermo> Foam::hReactionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C index 3607d3458b64505dfe838728d403b0303536ae57..0520bb7289246f68e87c96e2848f1dd2c8b6d542 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C @@ -44,7 +44,7 @@ Foam::autoPtr<Foam::hsReactionThermo> Foam::hsReactionThermo::New "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) @@ -87,7 +87,7 @@ Foam::autoPtr<Foam::hsReactionThermo> Foam::hsReactionThermo::NewType "thermophysicalProperties", mesh.time().constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C b/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C index 44d22a111534bc5e0ce9b720934326af858d55f1..88ce5782ad34aa8537383623efe63cd2fb88ccd3 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 636e440b31e8f1da04b7b698f55d51de4f8c9cf4..f82895bf3bd00201462082282893b21886df3539 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 6a050e1c701b66b84a5c961f3a3a35c233682e85..e4049f988abf002a924a9c1eca5264628027942a 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 7de4dcce20f1f38f784852f51d2ad6ac06cb353a..b319e1807ae4d0812cb2616db8878594a4b11d55 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 c9a0c8e20d8e1e404c81e8b2b24b1a5fc942f81b..e45e8206a92082f2dbe49e295dcddcc561cf0481 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 dc044c2d17a07b2bd95aca9de6b84415cf7a63dc..849ab59c14df18f9c5a3849b2ec780412eca32ef 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 e95f9def5c5aee8620ad3c6d06de04c3e5040bd8..bf1f726c32c01cc70e7e8814420beaf4d22ba737 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -70,7 +70,7 @@ LESModel::LESModel "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -111,7 +111,7 @@ autoPtr<LESModel> LESModel::New "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 755318a1d8c1d41619c3e2db19396af3f95e2bc9..64594ff010ebe4ffbe8c32ffeedc5e1f067d9984 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -71,7 +71,7 @@ RASModel::RASModel "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -117,7 +117,7 @@ autoPtr<RASModel> RASModel::New "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C index 89eaaabd480e979ba7b368e9755a872c70dbe9b2..f85e8f5440ac4581d2f9df3f361f5828e2a6cbb3 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 19f31068bf6c2938c85ed8a6dec675fd4faf70cd..da27aa55ec99cb6124d24e80a04c89543a048591 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -81,7 +81,7 @@ autoPtr<turbulenceModel> turbulenceModel::New "turbulenceProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 574e387f1c495f3dc2fe58fbc5a3c008c5643769..1246bdc801b3d167e3c004899368c928c960683c 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -69,7 +69,7 @@ LESModel::LESModel "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -108,7 +108,7 @@ autoPtr<LESModel> LESModel::New "LESProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 87d50dedd7f04d3d86940f09284065230ba80e4d..27e465720fae6118f146993f4058402c16db7453 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -70,7 +70,7 @@ RASModel::RASModel "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), @@ -115,7 +115,7 @@ autoPtr<RASModel> RASModel::New "RASProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C index 79e9ab8383b234faf8df2a9a72787eed78e7f5ba..d211671ff461b9001266dd4b995834e4492add7d 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 1aeea66fd3108af18db59f810b84cc81b9bc14b1..79e94c0741565e1ecec842b3ecfcc614a63d9e11 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -77,7 +77,7 @@ autoPtr<turbulenceModel> turbulenceModel::New "turbulenceProperties", U.time().constant(), U.db(), - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false )