mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: provide setter methods for IOobject read/write options etc.
- simplifies local toggling. - centralize fileModification static variables into IOobject. They were previously scattered between IOobject and regIOobject
This commit is contained in:
@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
else if (rhoType == "field")
|
else if (rhoType == "field")
|
||||||
{
|
{
|
||||||
rhoIO.readOpt() = IOobject::MUST_READ;
|
rhoIO.readOpt(IOobject::MUST_READ);
|
||||||
|
|
||||||
rhoPtr.reset
|
rhoPtr.reset
|
||||||
(
|
(
|
||||||
@ -102,7 +102,7 @@
|
|||||||
}
|
}
|
||||||
else if (EType == "field")
|
else if (EType == "field")
|
||||||
{
|
{
|
||||||
EHeader.readOpt() = IOobject::MUST_READ;
|
EHeader.readOpt(IOobject::MUST_READ);
|
||||||
|
|
||||||
EPtr.reset
|
EPtr.reset
|
||||||
(
|
(
|
||||||
@ -156,7 +156,7 @@
|
|||||||
}
|
}
|
||||||
else if (nuType == "field")
|
else if (nuType == "field")
|
||||||
{
|
{
|
||||||
nuIO.readOpt() = IOobject::MUST_READ;
|
nuIO.readOpt(IOobject::MUST_READ);
|
||||||
nuPtr.reset
|
nuPtr.reset
|
||||||
(
|
(
|
||||||
new volScalarField
|
new volScalarField
|
||||||
|
|||||||
@ -81,7 +81,7 @@ if (thermalStress)
|
|||||||
}
|
}
|
||||||
else if (CType == "field")
|
else if (CType == "field")
|
||||||
{
|
{
|
||||||
CIO.readOpt() = IOobject::MUST_READ;
|
CIO.readOpt(IOobject::MUST_READ);
|
||||||
|
|
||||||
CPtr.reset
|
CPtr.reset
|
||||||
(
|
(
|
||||||
@ -136,7 +136,7 @@ if (thermalStress)
|
|||||||
}
|
}
|
||||||
else if (kType == "field")
|
else if (kType == "field")
|
||||||
{
|
{
|
||||||
rhoKIO.readOpt() = IOobject::MUST_READ;
|
rhoKIO.readOpt(IOobject::MUST_READ);
|
||||||
|
|
||||||
rhoKPtr.reset
|
rhoKPtr.reset
|
||||||
(
|
(
|
||||||
@ -191,7 +191,7 @@ if (thermalStress)
|
|||||||
}
|
}
|
||||||
else if (alphaType == "field")
|
else if (alphaType == "field")
|
||||||
{
|
{
|
||||||
alphaIO.readOpt() = IOobject::MUST_READ;
|
alphaIO.readOpt(IOobject::MUST_READ);
|
||||||
|
|
||||||
alphaPtr.reset
|
alphaPtr.reset
|
||||||
(
|
(
|
||||||
|
|||||||
@ -89,7 +89,7 @@ void writeAndRead
|
|||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const label sz,
|
const label sz,
|
||||||
const word& writeType,
|
const word& writeType,
|
||||||
const IOobject::readOption readOpt,
|
const IOobject::readOption rOpt,
|
||||||
const word& readType
|
const word& readType
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -112,7 +112,7 @@ void writeAndRead
|
|||||||
|
|
||||||
// Read
|
// Read
|
||||||
IOobject readIO(io);
|
IOobject readIO(io);
|
||||||
readIO.readOpt() = readOpt;
|
readIO.readOpt(rOpt);
|
||||||
Pout<< "Reading:"
|
Pout<< "Reading:"
|
||||||
<< fileHandler().filePath(readIO.objectPath()) << endl;
|
<< fileHandler().filePath(readIO.objectPath()) << endl;
|
||||||
doRead<Type>(readIO, sz);
|
doRead<Type>(readIO, sz);
|
||||||
@ -134,7 +134,7 @@ void readIfPresent
|
|||||||
|
|
||||||
// Read
|
// Read
|
||||||
Pout<< "Reading:" << fileHandler().filePath(io.objectPath()) << endl;
|
Pout<< "Reading:" << fileHandler().filePath(io.objectPath()) << endl;
|
||||||
io.readOpt() = IOobject::READ_IF_PRESENT;
|
io.readOpt(IOobject::READ_IF_PRESENT);
|
||||||
doRead<Type>(io, sz);
|
doRead<Type>(io, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2018 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -1025,54 +1025,54 @@ int main(int argc, char *argv[])
|
|||||||
forAll(scalarFlds, i)
|
forAll(scalarFlds, i)
|
||||||
{
|
{
|
||||||
scalarFlds[i].rename(scalarNames[i]);
|
scalarFlds[i].rename(scalarNames[i]);
|
||||||
scalarFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
scalarFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(vectorFlds, i)
|
forAll(vectorFlds, i)
|
||||||
{
|
{
|
||||||
vectorFlds[i].rename(vectorNames[i]);
|
vectorFlds[i].rename(vectorNames[i]);
|
||||||
vectorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
vectorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(sphTensorFlds, i)
|
forAll(sphTensorFlds, i)
|
||||||
{
|
{
|
||||||
sphTensorFlds[i].rename(sphTensorNames[i]);
|
sphTensorFlds[i].rename(sphTensorNames[i]);
|
||||||
sphTensorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
sphTensorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(symmTensorFlds, i)
|
forAll(symmTensorFlds, i)
|
||||||
{
|
{
|
||||||
symmTensorFlds[i].rename(symmTensorNames[i]);
|
symmTensorFlds[i].rename(symmTensorNames[i]);
|
||||||
symmTensorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
symmTensorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(tensorFlds, i)
|
forAll(tensorFlds, i)
|
||||||
{
|
{
|
||||||
tensorFlds[i].rename(tensorNames[i]);
|
tensorFlds[i].rename(tensorNames[i]);
|
||||||
tensorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
tensorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Surface ones.
|
// Surface ones.
|
||||||
forAll(surfScalarFlds, i)
|
forAll(surfScalarFlds, i)
|
||||||
{
|
{
|
||||||
surfScalarFlds[i].rename(surfScalarNames[i]);
|
surfScalarFlds[i].rename(surfScalarNames[i]);
|
||||||
surfScalarFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
surfScalarFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(surfVectorFlds, i)
|
forAll(surfVectorFlds, i)
|
||||||
{
|
{
|
||||||
surfVectorFlds[i].rename(surfVectorNames[i]);
|
surfVectorFlds[i].rename(surfVectorNames[i]);
|
||||||
surfVectorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
surfVectorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(surfSphericalTensorFlds, i)
|
forAll(surfSphericalTensorFlds, i)
|
||||||
{
|
{
|
||||||
surfSphericalTensorFlds[i].rename(surfSphTensorNames[i]);
|
surfSphericalTensorFlds[i].rename(surfSphTensorNames[i]);
|
||||||
surfSphericalTensorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
surfSphericalTensorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(surfSymmTensorFlds, i)
|
forAll(surfSymmTensorFlds, i)
|
||||||
{
|
{
|
||||||
surfSymmTensorFlds[i].rename(surfSymmTensorNames[i]);
|
surfSymmTensorFlds[i].rename(surfSymmTensorNames[i]);
|
||||||
surfSymmTensorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
surfSymmTensorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
forAll(surfTensorNames, i)
|
forAll(surfTensorNames, i)
|
||||||
{
|
{
|
||||||
surfTensorFlds[i].rename(surfTensorNames[i]);
|
surfTensorFlds[i].rename(surfTensorNames[i]);
|
||||||
surfTensorFlds[i].writeOpt() = IOobject::AUTO_WRITE;
|
surfTensorFlds[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
subsetter.subMesh().write();
|
subsetter.subMesh().write();
|
||||||
|
|||||||
@ -1106,12 +1106,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Not writing inconsistent processor cell decomposition"
|
Info<< "Not writing inconsistent processor cell decomposition"
|
||||||
<< " map " << cellProcAddressing.filePath() << endl;
|
<< " map " << cellProcAddressing.filePath() << endl;
|
||||||
cellProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
cellProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cellProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
cellProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (faceProcAddressing.headerOk())
|
if (faceProcAddressing.headerOk())
|
||||||
@ -1147,12 +1147,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Not writing inconsistent processor face decomposition"
|
Info<< "Not writing inconsistent processor face decomposition"
|
||||||
<< " map " << faceProcAddressing.filePath() << endl;
|
<< " map " << faceProcAddressing.filePath() << endl;
|
||||||
faceProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
faceProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
faceProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
faceProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pointProcAddressing.headerOk())
|
if (pointProcAddressing.headerOk())
|
||||||
@ -1173,12 +1173,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Not writing inconsistent processor point decomposition"
|
Info<< "Not writing inconsistent processor point decomposition"
|
||||||
<< " map " << pointProcAddressing.filePath() << endl;
|
<< " map " << pointProcAddressing.filePath() << endl;
|
||||||
pointProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
pointProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pointProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
pointProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boundaryProcAddressing.headerOk())
|
if (boundaryProcAddressing.headerOk())
|
||||||
@ -1196,12 +1196,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Not writing inconsistent processor patch decomposition"
|
Info<< "Not writing inconsistent processor patch decomposition"
|
||||||
<< " map " << boundaryProcAddressing.filePath() << endl;
|
<< " map " << boundaryProcAddressing.filePath() << endl;
|
||||||
boundaryProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
boundaryProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
boundaryProcAddressing.writeOpt() = IOobject::NO_WRITE;
|
boundaryProcAddressing.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -134,7 +135,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
zn = pointLabels;
|
zn = pointLabels;
|
||||||
|
|
||||||
mesh.pointZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.pointZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
mesh.pointZones().instance() = mesh.facesInstance();
|
mesh.pointZones().instance() = mesh.facesInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +262,7 @@ int main(int argc, char *argv[])
|
|||||||
flipMap.shrink()
|
flipMap.shrink()
|
||||||
);
|
);
|
||||||
|
|
||||||
mesh.faceZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.faceZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
mesh.faceZones().instance() = mesh.facesInstance();
|
mesh.faceZones().instance() = mesh.facesInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +298,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
zn = cellLabels;
|
zn = cellLabels;
|
||||||
|
|
||||||
mesh.cellZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.cellZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
mesh.cellZones().instance() = mesh.facesInstance();
|
mesh.cellZones().instance() = mesh.facesInstance();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2016 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -67,7 +67,7 @@ void interpolateFields
|
|||||||
{
|
{
|
||||||
tmp<GeoField> scFld = scMesh.interpolate(flds[i]);
|
tmp<GeoField> scFld = scMesh.interpolate(flds[i]);
|
||||||
GeoField* scFldPtr = scFld.ptr();
|
GeoField* scFldPtr = scFld.ptr();
|
||||||
scFldPtr->writeOpt() = IOobject::AUTO_WRITE;
|
scFldPtr->writeOpt(IOobject::AUTO_WRITE);
|
||||||
scFldPtr->store();
|
scFldPtr->store();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -192,7 +192,7 @@ void subsetVolFields
|
|||||||
// Store on subMesh
|
// Store on subMesh
|
||||||
GeoField* subFld = tSubFld.ptr();
|
GeoField* subFld = tSubFld.ptr();
|
||||||
subFld->rename(fld.name());
|
subFld->rename(fld.name());
|
||||||
subFld->writeOpt() = IOobject::AUTO_WRITE;
|
subFld->writeOpt(IOobject::AUTO_WRITE);
|
||||||
subFld->store();
|
subFld->store();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -246,7 +246,7 @@ void subsetSurfaceFields
|
|||||||
// Store on subMesh
|
// Store on subMesh
|
||||||
GeoField* subFld = tSubFld.ptr();
|
GeoField* subFld = tSubFld.ptr();
|
||||||
subFld->rename(fld.name());
|
subFld->rename(fld.name());
|
||||||
subFld->writeOpt() = IOobject::AUTO_WRITE;
|
subFld->writeOpt(IOobject::AUTO_WRITE);
|
||||||
subFld->store();
|
subFld->store();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1886,7 +1886,7 @@ int main(int argc, char *argv[])
|
|||||||
<< zoneI << ' ' << cellZones[zoneI].name() << endl;
|
<< zoneI << ' ' << cellZones[zoneI].name() << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mesh.cellZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.cellZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -294,7 +294,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Make sure we do not use the master-only reading since we read
|
// Make sure we do not use the master-only reading since we read
|
||||||
// fields (different per processor) as dictionaries.
|
// fields (different per processor) as dictionaries.
|
||||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
IOobject::fileModificationChecking = IOobject::timeStamp;
|
||||||
|
|
||||||
|
|
||||||
fileName meshDir = polyMesh::meshSubDir;
|
fileName meshDir = polyMesh::meshSubDir;
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -570,7 +570,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
|||||||
if (pz.size())
|
if (pz.size())
|
||||||
{
|
{
|
||||||
// Force writing on all processors
|
// Force writing on all processors
|
||||||
procMesh.pointZones().writeOpt() = IOobject::AUTO_WRITE;
|
procMesh.pointZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,7 +664,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
|||||||
if (fz.size())
|
if (fz.size())
|
||||||
{
|
{
|
||||||
// Force writing on all processors
|
// Force writing on all processors
|
||||||
procMesh.faceZones().writeOpt() = IOobject::AUTO_WRITE;
|
procMesh.faceZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -728,7 +728,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
|||||||
if (cz.size())
|
if (cz.size())
|
||||||
{
|
{
|
||||||
// Force writing on all processors
|
// Force writing on all processors
|
||||||
procMesh.cellZones().writeOpt() = IOobject::AUTO_WRITE;
|
procMesh.cellZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -163,8 +163,8 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
|
|||||||
|
|
||||||
// Create dummy mesh. Only used on procs that don't have mesh.
|
// Create dummy mesh. Only used on procs that don't have mesh.
|
||||||
IOobject noReadIO(io);
|
IOobject noReadIO(io);
|
||||||
noReadIO.readOpt() = IOobject::NO_READ;
|
noReadIO.readOpt(IOobject::NO_READ);
|
||||||
noReadIO.writeOpt() = IOobject::AUTO_WRITE;
|
noReadIO.writeOpt(IOobject::AUTO_WRITE);
|
||||||
fvMesh dummyMesh(noReadIO, Zero, false);
|
fvMesh dummyMesh(noReadIO, Zero, false);
|
||||||
|
|
||||||
// Add patches
|
// Add patches
|
||||||
|
|||||||
@ -648,7 +648,7 @@ void readFields
|
|||||||
{
|
{
|
||||||
const word& name = masterNames[i];
|
const word& name = masterNames[i];
|
||||||
IOobject& io = *objects[name];
|
IOobject& io = *objects[name];
|
||||||
io.writeOpt() = IOobject::AUTO_WRITE;
|
io.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
// Load field (but not oldTime)
|
// Load field (but not oldTime)
|
||||||
readField(io, mesh, i, fields);
|
readField(io, mesh, i, fields);
|
||||||
@ -714,7 +714,7 @@ void readFields
|
|||||||
{
|
{
|
||||||
const word& name = masterNames[i];
|
const word& name = masterNames[i];
|
||||||
IOobject& io = *objects[name];
|
IOobject& io = *objects[name];
|
||||||
io.writeOpt() = IOobject::AUTO_WRITE;
|
io.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
// Load field (but not oldtime)
|
// Load field (but not oldtime)
|
||||||
readField(io, mesh, i, fields);
|
readField(io, mesh, i, fields);
|
||||||
|
|||||||
@ -26,7 +26,7 @@ label timeIndex = 0;
|
|||||||
|
|
||||||
if (io.typeHeaderOk<IOdictionary>(true, false))
|
if (io.typeHeaderOk<IOdictionary>(true, false))
|
||||||
{
|
{
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
IOdictionary timeObject(io);
|
IOdictionary timeObject(io);
|
||||||
|
|
||||||
timeObject.readEntry("index", timeIndex);
|
timeObject.readEntry("index", timeIndex);
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
{
|
{
|
||||||
Info<< "new points available" << endl;
|
Info<< "new points available" << endl;
|
||||||
// Read new points
|
// Read new points
|
||||||
io.readOpt() = IOobject::MUST_READ;
|
io.readOpt(IOobject::MUST_READ);
|
||||||
mesh.movePoints(pointIOField(io));
|
mesh.movePoints(pointIOField(io));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -507,7 +507,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Make sure we do not use the master-only reading since we read
|
// Make sure we do not use the master-only reading since we read
|
||||||
// fields (different per processor) as dictionaries.
|
// fields (different per processor) as dictionaries.
|
||||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
IOobject::fileModificationChecking = IOobject::timeStamp;
|
||||||
|
|
||||||
|
|
||||||
// Get the replacement rules from a dictionary
|
// Get the replacement rules from a dictionary
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -422,7 +422,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Make sure we do not use the master-only reading since we read
|
// Make sure we do not use the master-only reading since we read
|
||||||
// fields (different per processor) as dictionaries.
|
// fields (different per processor) as dictionaries.
|
||||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
IOobject::fileModificationChecking = IOobject::timeStamp;
|
||||||
|
|
||||||
|
|
||||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -90,7 +90,7 @@ void MapConsistentVolFields
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fieldTargetIOobject.readOpt() = IOobject::NO_READ;
|
fieldTargetIOobject.readOpt(IOobject::NO_READ);
|
||||||
|
|
||||||
// Interpolate field
|
// Interpolate field
|
||||||
fieldType fieldTarget
|
fieldType fieldTarget
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -172,7 +172,7 @@ void MapVolFields
|
|||||||
Info<< " creating new field "
|
Info<< " creating new field "
|
||||||
<< fieldName << endl;
|
<< fieldName << endl;
|
||||||
|
|
||||||
targetIO.readOpt() = IOobject::NO_READ;
|
targetIO.readOpt(IOobject::NO_READ);
|
||||||
|
|
||||||
tmp<fieldType> tfieldTarget
|
tmp<fieldType> tfieldTarget
|
||||||
(
|
(
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -261,7 +261,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Construct distributedTrisurfaceMesh from components
|
// Construct distributedTrisurfaceMesh from components
|
||||||
IOobject notReadIO(io);
|
IOobject notReadIO(io);
|
||||||
notReadIO.readOpt() = IOobject::NO_READ;
|
notReadIO.readOpt(IOobject::NO_READ);
|
||||||
surfMeshPtr.reset(new distributedTriSurfaceMesh(notReadIO, s, dict));
|
surfMeshPtr.reset(new distributedTriSurfaceMesh(notReadIO, s, dict));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
#include "PackedList.H"
|
#include "PackedList.H"
|
||||||
#include "PstreamReduceOps.H"
|
#include "PstreamReduceOps.H"
|
||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
#include "regIOobject.H" // for fileModificationSkew symbol
|
#include "IOobject.H" // for fileModificationSkew symbol
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#undef FOAM_USE_INOTIFY
|
#undef FOAM_USE_INOTIFY
|
||||||
@ -410,7 +410,7 @@ void Foam::fileMonitor::checkFiles() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (newTime > (oldTime + regIOobject::fileModificationSkew))
|
if (newTime > (oldTime + IOobject::fileModificationSkew))
|
||||||
{
|
{
|
||||||
localState_[watchFd] = MODIFIED;
|
localState_[watchFd] = MODIFIED;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
#include "PackedList.H"
|
#include "PackedList.H"
|
||||||
#include "PstreamReduceOps.H"
|
#include "PstreamReduceOps.H"
|
||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
#include "regIOobject.H" // for fileModificationSkew symbol
|
#include "IOobject.H" // for fileModificationSkew symbol
|
||||||
|
|
||||||
#ifdef FOAM_USE_INOTIFY
|
#ifdef FOAM_USE_INOTIFY
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -406,7 +406,7 @@ void Foam::fileMonitor::checkFiles() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (newTime > (oldTime + regIOobject::fileModificationSkew))
|
if (newTime > (oldTime + IOobject::fileModificationSkew))
|
||||||
{
|
{
|
||||||
localState_[watchFd] = MODIFIED;
|
localState_[watchFd] = MODIFIED;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "IOobject.H"
|
#include "IOobject.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "Istream.H"
|
#include "Istream.H"
|
||||||
|
#include "registerSwitch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -72,6 +73,29 @@ Foam::IOobject::fileCheckTypes Foam::IOobject::fileModificationChecking
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
float Foam::IOobject::fileModificationSkew
|
||||||
|
(
|
||||||
|
Foam::debug::floatOptimisationSwitch("fileModificationSkew", 30)
|
||||||
|
);
|
||||||
|
registerOptSwitch
|
||||||
|
(
|
||||||
|
"fileModificationSkew",
|
||||||
|
float,
|
||||||
|
Foam::IOobject::fileModificationSkew
|
||||||
|
);
|
||||||
|
|
||||||
|
int Foam::IOobject::maxFileModificationPolls
|
||||||
|
(
|
||||||
|
Foam::debug::optimisationSwitch("maxFileModificationPolls", 1)
|
||||||
|
);
|
||||||
|
registerOptSwitch
|
||||||
|
(
|
||||||
|
"maxFileModificationPolls",
|
||||||
|
int,
|
||||||
|
Foam::IOobject::maxFileModificationPolls
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//! \cond file-scope
|
//! \cond file-scope
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|||||||
@ -229,7 +229,7 @@ protected:
|
|||||||
//- with optional meta information.
|
//- with optional meta information.
|
||||||
static void writeHeaderContent
|
static void writeHeaderContent
|
||||||
(
|
(
|
||||||
dictionary& os,
|
dictionary& dict,
|
||||||
const IOobject& io,
|
const IOobject& io,
|
||||||
const word& objectType,
|
const word& objectType,
|
||||||
IOstreamOption streamOpt,
|
IOstreamOption streamOpt,
|
||||||
@ -246,7 +246,7 @@ public:
|
|||||||
TypeName("IOobject");
|
TypeName("IOobject");
|
||||||
|
|
||||||
|
|
||||||
// Static Data Members
|
// Static Data
|
||||||
|
|
||||||
//- Character for scoping object names (':' or '_')
|
//- Character for scoping object names (':' or '_')
|
||||||
// Change with caution.
|
// Change with caution.
|
||||||
@ -255,6 +255,12 @@ public:
|
|||||||
//- Type of file modification checking
|
//- Type of file modification checking
|
||||||
static fileCheckTypes fileModificationChecking;
|
static fileCheckTypes fileModificationChecking;
|
||||||
|
|
||||||
|
//- Time skew (seconds) for file modification checks
|
||||||
|
static float fileModificationSkew;
|
||||||
|
|
||||||
|
//- Max number of times to poll for file modification changes
|
||||||
|
static int maxFileModificationPolls;
|
||||||
|
|
||||||
|
|
||||||
// Static Functions
|
// Static Functions
|
||||||
|
|
||||||
@ -455,14 +461,14 @@ public:
|
|||||||
//- Should object created with this IOobject be registered?
|
//- Should object created with this IOobject be registered?
|
||||||
inline bool registerObject() const noexcept;
|
inline bool registerObject() const noexcept;
|
||||||
|
|
||||||
//- Should object created with this IOobject be registered?
|
//- Change registration preference, return previous value
|
||||||
inline bool& registerObject() noexcept;
|
inline bool registerObject(bool on) noexcept;
|
||||||
|
|
||||||
//- Is object same for all processors?
|
//- Is object same for all processors?
|
||||||
inline bool globalObject() const noexcept;
|
inline bool globalObject() const noexcept;
|
||||||
|
|
||||||
//- Is object same for all processors?
|
//- Change global-object status, return previous value
|
||||||
inline bool& globalObject() noexcept;
|
inline bool globalObject(bool on) noexcept;
|
||||||
|
|
||||||
//- The sizeof (label) in bytes, possibly read from the header
|
//- The sizeof (label) in bytes, possibly read from the header
|
||||||
inline unsigned labelByteSize() const noexcept;
|
inline unsigned labelByteSize() const noexcept;
|
||||||
@ -492,14 +498,14 @@ public:
|
|||||||
//- The read option
|
//- The read option
|
||||||
inline readOption readOpt() const noexcept;
|
inline readOption readOpt() const noexcept;
|
||||||
|
|
||||||
//- Non-constant access to the read option
|
//- Change the read option, return previous value
|
||||||
inline readOption& readOpt() noexcept;
|
inline readOption readOpt(readOption opt) noexcept;
|
||||||
|
|
||||||
//- The write option
|
//- The write option
|
||||||
inline writeOption writeOpt() const noexcept;
|
inline writeOption writeOpt() const noexcept;
|
||||||
|
|
||||||
//- Non-constant access to the write option
|
//- Change the write option, return previous value
|
||||||
inline writeOption& writeOpt() noexcept;
|
inline writeOption writeOpt(writeOption opt) noexcept;
|
||||||
|
|
||||||
|
|
||||||
// Path components
|
// Path components
|
||||||
@ -636,6 +642,25 @@ public:
|
|||||||
// Member Operators
|
// Member Operators
|
||||||
|
|
||||||
void operator=(const IOobject& io);
|
void operator=(const IOobject& io);
|
||||||
|
|
||||||
|
|
||||||
|
// Housekeeping
|
||||||
|
|
||||||
|
//- Access to the read option
|
||||||
|
// \deprecated(2021-03) - use readOpt(readOption)
|
||||||
|
readOption& readOpt() noexcept { return rOpt_; }
|
||||||
|
|
||||||
|
//- Access to the write option
|
||||||
|
// \deprecated(2021-03) - use writeOpt(writeOption)
|
||||||
|
writeOption& writeOpt() noexcept { return wOpt_; }
|
||||||
|
|
||||||
|
//- Access to the register object option
|
||||||
|
// \deprecated(2021-03) - use registerObject(bool)
|
||||||
|
bool& registerObject() noexcept { return registerObject_; }
|
||||||
|
|
||||||
|
//- Access to the global object option
|
||||||
|
// \deprecated(2021-03) - use globalObject(bool)
|
||||||
|
bool& globalObject() noexcept { return globalObject_; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -115,9 +115,11 @@ inline bool Foam::IOobject::registerObject() const noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool& Foam::IOobject::registerObject() noexcept
|
inline bool Foam::IOobject::registerObject(bool on) noexcept
|
||||||
{
|
{
|
||||||
return registerObject_;
|
bool old(registerObject_);
|
||||||
|
registerObject_ = on;
|
||||||
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -127,9 +129,11 @@ inline bool Foam::IOobject::globalObject() const noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool& Foam::IOobject::globalObject() noexcept
|
inline bool Foam::IOobject::globalObject(bool on) noexcept
|
||||||
{
|
{
|
||||||
return globalObject_;
|
bool old(globalObject_);
|
||||||
|
globalObject_ = on;
|
||||||
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -168,9 +172,12 @@ inline Foam::IOobject::readOption Foam::IOobject::readOpt() const noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::IOobject::readOption& Foam::IOobject::readOpt() noexcept
|
inline Foam::IOobject::readOption
|
||||||
|
Foam::IOobject::readOpt(readOption opt) noexcept
|
||||||
{
|
{
|
||||||
return rOpt_;
|
readOption old(rOpt_);
|
||||||
|
rOpt_ = opt;
|
||||||
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -180,9 +187,12 @@ inline Foam::IOobject::writeOption Foam::IOobject::writeOpt() const noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::IOobject::writeOption& Foam::IOobject::writeOpt() noexcept
|
inline Foam::IOobject::writeOption
|
||||||
|
Foam::IOobject::writeOpt(writeOption opt) noexcept
|
||||||
{
|
{
|
||||||
return wOpt_;
|
writeOption old(wOpt_);
|
||||||
|
wOpt_ = opt;
|
||||||
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -131,8 +131,8 @@ void Foam::unwatchedIOdictionary::addWatch()
|
|||||||
bool masterOnly =
|
bool masterOnly =
|
||||||
global()
|
global()
|
||||||
&& (
|
&& (
|
||||||
regIOobject::fileModificationChecking == timeStampMaster
|
IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
|| regIOobject::fileModificationChecking == inotifyMaster
|
|| IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
);
|
);
|
||||||
|
|
||||||
if (masterOnly && Pstream::parRun())
|
if (masterOnly && Pstream::parRun())
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -476,7 +476,7 @@ Foam::Time::Time
|
|||||||
|
|
||||||
// Explicitly set read flags on objectRegistry so anything constructed
|
// Explicitly set read flags on objectRegistry so anything constructed
|
||||||
// from it reads as well (e.g. fvSolution).
|
// from it reads as well (e.g. fvSolution).
|
||||||
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
|
|
||||||
setControls();
|
setControls();
|
||||||
setMonitoring();
|
setMonitoring();
|
||||||
@ -560,7 +560,7 @@ Foam::Time::Time
|
|||||||
|
|
||||||
// Explicitly set read flags on objectRegistry so anything constructed
|
// Explicitly set read flags on objectRegistry so anything constructed
|
||||||
// from it reads as well (e.g. fvSolution).
|
// from it reads as well (e.g. fvSolution).
|
||||||
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
|
|
||||||
setControls();
|
setControls();
|
||||||
|
|
||||||
@ -637,10 +637,10 @@ Foam::Time::Time
|
|||||||
|
|
||||||
// Explicitly set read flags on objectRegistry so anything constructed
|
// Explicitly set read flags on objectRegistry so anything constructed
|
||||||
// from it reads as well (e.g. fvSolution).
|
// from it reads as well (e.g. fvSolution).
|
||||||
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
|
|
||||||
// Since could not construct regIOobject with setting:
|
// Since could not construct regIOobject with setting:
|
||||||
controlDict_.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
controlDict_.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
|
|
||||||
setControls();
|
setControls();
|
||||||
setMonitoring();
|
setMonitoring();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -478,8 +478,8 @@ void Foam::Time::readModifiedObjects()
|
|||||||
fileHandler().updateStates
|
fileHandler().updateStates
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
regIOobject::fileModificationChecking == inotifyMaster
|
IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
|| regIOobject::fileModificationChecking == timeStampMaster
|
|| IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
),
|
),
|
||||||
Pstream::parRun()
|
Pstream::parRun()
|
||||||
);
|
);
|
||||||
|
|||||||
@ -113,13 +113,13 @@ public:
|
|||||||
|
|
||||||
//- True if case running with parallel distributed directories
|
//- True if case running with parallel distributed directories
|
||||||
//- (ie. not NFS mounted)
|
//- (ie. not NFS mounted)
|
||||||
inline bool distributed() const;
|
inline bool distributed() const noexcept;
|
||||||
|
|
||||||
//- Return true if this is a processor case
|
//- Return true if this is a processor case
|
||||||
inline bool processorCase() const;
|
inline bool processorCase() const noexcept;
|
||||||
|
|
||||||
//- Set processor case status. Return old one
|
//- Set processor case status. Return old one
|
||||||
inline bool processorCase(const bool isProcessorCase);
|
inline bool processorCase(const bool isProcessorCase) noexcept;
|
||||||
|
|
||||||
//- Return root path
|
//- Return root path
|
||||||
inline const fileName& rootPath() const;
|
inline const fileName& rootPath() const;
|
||||||
|
|||||||
@ -27,23 +27,23 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline bool Foam::TimePaths::distributed() const
|
inline bool Foam::TimePaths::distributed() const noexcept
|
||||||
{
|
{
|
||||||
return distributed_;
|
return distributed_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::TimePaths::processorCase() const
|
inline bool Foam::TimePaths::processorCase() const noexcept
|
||||||
{
|
{
|
||||||
return processorCase_;
|
return processorCase_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Foam::TimePaths::processorCase(const bool newProcCase)
|
inline bool Foam::TimePaths::processorCase(bool isProcessorCase) noexcept
|
||||||
{
|
{
|
||||||
const bool oldProcCase = processorCase_;
|
bool old(processorCase_);
|
||||||
processorCase_ = newProcCase;
|
processorCase_ = isProcessorCase;
|
||||||
return oldProcCase;
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -161,7 +161,7 @@ Foam::functionEntries::codeStream::getFunction
|
|||||||
{
|
{
|
||||||
const bool create =
|
const bool create =
|
||||||
Pstream::master()
|
Pstream::master()
|
||||||
|| (regIOobject::fileModificationSkew <= 0); // not NFS
|
|| (IOobject::fileModificationSkew <= 0); // not NFS
|
||||||
|
|
||||||
if (create)
|
if (create)
|
||||||
{
|
{
|
||||||
@ -205,7 +205,7 @@ Foam::functionEntries::codeStream::getFunction
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
!doingMasterOnlyReading(topDict)
|
!doingMasterOnlyReading(topDict)
|
||||||
&& regIOobject::fileModificationSkew > 0
|
&& IOobject::fileModificationSkew > 0
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//- Since the library has only been compiled on the master the
|
//- Since the library has only been compiled on the master the
|
||||||
@ -220,8 +220,8 @@ Foam::functionEntries::codeStream::getFunction
|
|||||||
for
|
for
|
||||||
(
|
(
|
||||||
label iter = 0;
|
label iter = 0;
|
||||||
iter < regIOobject::maxFileModificationPolls;
|
iter < IOobject::maxFileModificationPolls;
|
||||||
iter++
|
++iter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DebugPout
|
DebugPout
|
||||||
@ -257,10 +257,10 @@ Foam::functionEntries::codeStream::getFunction
|
|||||||
<< " not of same size (" << mySize
|
<< " not of same size (" << mySize
|
||||||
<< ") as master ("
|
<< ") as master ("
|
||||||
<< masterSize << "). Waiting for "
|
<< masterSize << "). Waiting for "
|
||||||
<< regIOobject::fileModificationSkew
|
<< IOobject::fileModificationSkew
|
||||||
<< " seconds." << endl;
|
<< " seconds." << endl;
|
||||||
|
|
||||||
Foam::sleep(regIOobject::fileModificationSkew);
|
Foam::sleep(IOobject::fileModificationSkew);
|
||||||
|
|
||||||
// Recheck local size
|
// Recheck local size
|
||||||
mySize = Foam::fileSize(libPath);
|
mySize = Foam::fileSize(libPath);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -175,7 +175,7 @@ void Foam::codedBase::createLibrary
|
|||||||
{
|
{
|
||||||
bool create =
|
bool create =
|
||||||
Pstream::master()
|
Pstream::master()
|
||||||
|| (regIOobject::fileModificationSkew <= 0); // not NFS
|
|| (IOobject::fileModificationSkew <= 0); // not NFS
|
||||||
|
|
||||||
if (create)
|
if (create)
|
||||||
{
|
{
|
||||||
@ -206,7 +206,7 @@ void Foam::codedBase::createLibrary
|
|||||||
|
|
||||||
|
|
||||||
// all processes must wait for compile to finish
|
// all processes must wait for compile to finish
|
||||||
if (regIOobject::fileModificationSkew > 0)
|
if (IOobject::fileModificationSkew > 0)
|
||||||
{
|
{
|
||||||
//- Since the library has only been compiled on the master the
|
//- Since the library has only been compiled on the master the
|
||||||
// other nodes need to pick this library up through NFS
|
// other nodes need to pick this library up through NFS
|
||||||
@ -222,8 +222,8 @@ void Foam::codedBase::createLibrary
|
|||||||
for
|
for
|
||||||
(
|
(
|
||||||
label iter = 0;
|
label iter = 0;
|
||||||
iter < regIOobject::maxFileModificationPolls;
|
iter < IOobject::maxFileModificationPolls;
|
||||||
iter++
|
++iter
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DebugPout
|
DebugPout
|
||||||
@ -259,10 +259,10 @@ void Foam::codedBase::createLibrary
|
|||||||
<< " not of same size (" << mySize
|
<< " not of same size (" << mySize
|
||||||
<< ") as master ("
|
<< ") as master ("
|
||||||
<< masterSize << "). Waiting for "
|
<< masterSize << "). Waiting for "
|
||||||
<< regIOobject::fileModificationSkew
|
<< IOobject::fileModificationSkew
|
||||||
<< " seconds." << endl;
|
<< " seconds." << endl;
|
||||||
|
|
||||||
Foam::sleep(regIOobject::fileModificationSkew);
|
Foam::sleep(IOobject::fileModificationSkew);
|
||||||
|
|
||||||
// Recheck local size
|
// Recheck local size
|
||||||
mySize = Foam::fileSize(libPath);
|
mySize = Foam::fileSize(libPath);
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -134,7 +134,7 @@ Foam::objectRegistry::objectRegistry(const IOobject& io, const label nObjects)
|
|||||||
dbDir_(parent_.dbDir()/local()/name()),
|
dbDir_(parent_.dbDir()/local()/name()),
|
||||||
event_(1)
|
event_(1)
|
||||||
{
|
{
|
||||||
writeOpt() = IOobject::AUTO_WRITE;
|
writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@ License
|
|||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "fileOperation.H"
|
#include "fileOperation.H"
|
||||||
#include "registerSwitch.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -40,29 +39,6 @@ namespace Foam
|
|||||||
defineTypeNameAndDebug(regIOobject, 0);
|
defineTypeNameAndDebug(regIOobject, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
float Foam::regIOobject::fileModificationSkew
|
|
||||||
(
|
|
||||||
Foam::debug::floatOptimisationSwitch("fileModificationSkew", 30)
|
|
||||||
);
|
|
||||||
registerOptSwitch
|
|
||||||
(
|
|
||||||
"fileModificationSkew",
|
|
||||||
float,
|
|
||||||
Foam::regIOobject::fileModificationSkew
|
|
||||||
);
|
|
||||||
|
|
||||||
int Foam::regIOobject::maxFileModificationPolls
|
|
||||||
(
|
|
||||||
Foam::debug::optimisationSwitch("maxFileModificationPolls", 1)
|
|
||||||
);
|
|
||||||
registerOptSwitch
|
|
||||||
(
|
|
||||||
"maxFileModificationPolls",
|
|
||||||
int,
|
|
||||||
Foam::regIOobject::maxFileModificationPolls
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
bool Foam::regIOobject::masterOnlyReading = false;
|
bool Foam::regIOobject::masterOnlyReading = false;
|
||||||
|
|
||||||
|
|
||||||
@ -319,8 +295,8 @@ void Foam::regIOobject::addWatch()
|
|||||||
bool masterOnly =
|
bool masterOnly =
|
||||||
global()
|
global()
|
||||||
&& (
|
&& (
|
||||||
regIOobject::fileModificationChecking == timeStampMaster
|
IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
|| regIOobject::fileModificationChecking == inotifyMaster
|
|| IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
);
|
);
|
||||||
|
|
||||||
if (masterOnly && Pstream::parRun())
|
if (masterOnly && Pstream::parRun())
|
||||||
|
|||||||
@ -131,15 +131,11 @@ public:
|
|||||||
friend class fileOperations::uncollatedFileOperation;
|
friend class fileOperations::uncollatedFileOperation;
|
||||||
|
|
||||||
|
|
||||||
// Static data
|
// Static Data
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("regIOobject");
|
TypeName("regIOobject");
|
||||||
|
|
||||||
static float fileModificationSkew;
|
|
||||||
|
|
||||||
static int maxFileModificationPolls;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
|||||||
@ -45,8 +45,8 @@ bool Foam::regIOobject::readHeaderOk
|
|||||||
bool masterOnly =
|
bool masterOnly =
|
||||||
global()
|
global()
|
||||||
&& (
|
&& (
|
||||||
regIOobject::fileModificationChecking == timeStampMaster
|
IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
|| regIOobject::fileModificationChecking == inotifyMaster
|
|| IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -227,8 +227,8 @@ bool Foam::regIOobject::read()
|
|||||||
bool masterOnly =
|
bool masterOnly =
|
||||||
global()
|
global()
|
||||||
&& (
|
&& (
|
||||||
regIOobject::fileModificationChecking == timeStampMaster
|
IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
|| regIOobject::fileModificationChecking == inotifyMaster
|
|| IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
);
|
);
|
||||||
|
|
||||||
// Note: IOstream::binary flag is for all the processor comms. (Only for
|
// Note: IOstream::binary flag is for all the processor comms. (Only for
|
||||||
|
|||||||
@ -98,8 +98,8 @@ bool Foam::regIOobject::writeObject
|
|||||||
bool masterOnly =
|
bool masterOnly =
|
||||||
isGlobal
|
isGlobal
|
||||||
&& (
|
&& (
|
||||||
regIOobject::fileModificationChecking == timeStampMaster
|
IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
|| regIOobject::fileModificationChecking == inotifyMaster
|
|| IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
);
|
);
|
||||||
|
|
||||||
bool osGood = false;
|
bool osGood = false;
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -466,7 +466,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->writeOpt() = IOobject::NO_WRITE;
|
this->writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -485,7 +485,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField
|
|||||||
DebugInFunction
|
DebugInFunction
|
||||||
<< "Constructing from tmp" << nl << this->info() << endl;
|
<< "Constructing from tmp" << nl << this->info() << endl;
|
||||||
|
|
||||||
this->writeOpt() = IOobject::NO_WRITE;
|
this->writeOpt(IOobject::NO_WRITE);
|
||||||
|
|
||||||
tgf.clear();
|
tgf.clear();
|
||||||
}
|
}
|
||||||
@ -827,7 +827,7 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::storeOldTime() const
|
|||||||
|
|
||||||
if (field0Ptr_->field0Ptr_)
|
if (field0Ptr_->field0Ptr_)
|
||||||
{
|
{
|
||||||
field0Ptr_->writeOpt() = this->writeOpt();
|
field0Ptr_->writeOpt(this->writeOpt());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -33,7 +33,7 @@ License
|
|||||||
#include "IOobject.H"
|
#include "IOobject.H"
|
||||||
#include "JobInfo.H"
|
#include "JobInfo.H"
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "regIOobject.H"
|
#include "IOobject.H"
|
||||||
#include "dynamicCode.H"
|
#include "dynamicCode.H"
|
||||||
#include "simpleObjectRegistry.H"
|
#include "simpleObjectRegistry.H"
|
||||||
#include "sigFpe.H"
|
#include "sigFpe.H"
|
||||||
@ -1540,41 +1540,35 @@ void Foam::argList::parse
|
|||||||
{
|
{
|
||||||
Info<< "fileModificationChecking : "
|
Info<< "fileModificationChecking : "
|
||||||
<< "Monitoring run-time modified files using "
|
<< "Monitoring run-time modified files using "
|
||||||
<< regIOobject::fileCheckTypesNames
|
<< IOobject::fileCheckTypesNames
|
||||||
[
|
[
|
||||||
regIOobject::fileModificationChecking
|
IOobject::fileModificationChecking
|
||||||
];
|
];
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
(
|
IOobject::fileModificationChecking == IOobject::timeStamp
|
||||||
regIOobject::fileModificationChecking
|
|| IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
== regIOobject::timeStamp
|
|
||||||
)
|
|
||||||
|| (
|
|
||||||
regIOobject::fileModificationChecking
|
|
||||||
== regIOobject::timeStampMaster
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (regIOobject::maxFileModificationPolls == 1)
|
if (IOobject::maxFileModificationPolls == 1)
|
||||||
{
|
{
|
||||||
Info<< " (fileModificationSkew "
|
Info<< " (fileModificationSkew "
|
||||||
<< regIOobject::fileModificationSkew
|
<< IOobject::fileModificationSkew
|
||||||
<< ")";
|
<< ")";
|
||||||
}
|
}
|
||||||
else if (regIOobject::maxFileModificationPolls > 1)
|
else if (IOobject::maxFileModificationPolls > 1)
|
||||||
{
|
{
|
||||||
Info<< " (fileModificationSkew "
|
Info<< " (fileModificationSkew "
|
||||||
<< regIOobject::fileModificationSkew
|
<< IOobject::fileModificationSkew
|
||||||
<< ", maxFileModificationPolls "
|
<< ", maxFileModificationPolls "
|
||||||
<< regIOobject::maxFileModificationPolls
|
<< IOobject::maxFileModificationPolls
|
||||||
<< ")";
|
<< ")";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Invalid setting for maxFileModificationPolls "
|
<< "Invalid setting for maxFileModificationPolls "
|
||||||
<< regIOobject::maxFileModificationPolls
|
<< IOobject::maxFileModificationPolls
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,25 +165,16 @@ void Foam::fileOperations::collatedFileOperation::printBanner
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if
|
// if (IOobject::fileModificationChecking == IOobject::timeStampMaster)
|
||||||
(
|
// {
|
||||||
regIOobject::fileModificationChecking
|
// WarningInFunction
|
||||||
== regIOobject::inotifyMaster
|
// << "Resetting fileModificationChecking to timeStamp" << endl;
|
||||||
)
|
// }
|
||||||
{
|
// else if (IOobject::fileModificationChecking == IOobject::inotifyMaster)
|
||||||
WarningInFunction
|
// {
|
||||||
<< "Resetting fileModificationChecking to inotify" << endl;
|
// WarningInFunction
|
||||||
}
|
// << "Resetting fileModificationChecking to inotify" << endl;
|
||||||
|
// }
|
||||||
if
|
|
||||||
(
|
|
||||||
regIOobject::fileModificationChecking
|
|
||||||
== regIOobject::timeStampMaster
|
|
||||||
)
|
|
||||||
{
|
|
||||||
WarningInFunction
|
|
||||||
<< "Resetting fileModificationChecking to timeStamp" << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -251,8 +251,8 @@ Foam::fileMonitor& Foam::fileOperation::monitor() const
|
|||||||
(
|
(
|
||||||
new fileMonitor
|
new fileMonitor
|
||||||
(
|
(
|
||||||
regIOobject::fileModificationChecking == IOobject::inotify
|
IOobject::fileModificationChecking == IOobject::inotify
|
||||||
|| regIOobject::fileModificationChecking == IOobject::inotifyMaster
|
|| IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -379,15 +379,18 @@ Foam::fileOperation::lookupAndCacheProcessorsPath
|
|||||||
|
|
||||||
const bool readDirMasterOnly
|
const bool readDirMasterOnly
|
||||||
(
|
(
|
||||||
regIOobject::fileModificationChecking == IOobject::timeStampMaster
|
Pstream::parRun() && !distributed()
|
||||||
|| regIOobject::fileModificationChecking == IOobject::inotifyMaster
|
&&
|
||||||
|
(
|
||||||
|
IOobject::fileModificationChecking == IOobject::timeStampMaster
|
||||||
|
|| IOobject::fileModificationChecking == IOobject::inotifyMaster
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// As byproduct of the above selection, we exclude masterUncollated
|
// The above selection excludes masterUncollated, which uses inotify or
|
||||||
// from using read/send, but that doesn't matter since that is what
|
// timeStamp but provides its own internals for readDir() anyhow.
|
||||||
// its own internals for readDir() do anyhow.
|
|
||||||
|
|
||||||
if (readDirMasterOnly && Pstream::parRun() && !distributed())
|
if (readDirMasterOnly)
|
||||||
{
|
{
|
||||||
// Non-distributed.
|
// Non-distributed.
|
||||||
// Read on master only and send to subProcs
|
// Read on master only and send to subProcs
|
||||||
|
|||||||
@ -746,20 +746,16 @@ masterUncollatedFileOperation
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regIOobject::fileModificationChecking == regIOobject::timeStampMaster)
|
if (IOobject::fileModificationChecking == IOobject::timeStampMaster)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "Resetting fileModificationChecking to timeStamp" << endl;
|
<< "Resetting fileModificationChecking to timeStamp" << endl;
|
||||||
}
|
}
|
||||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
IOobject::fileModificationChecking = IOobject::timeStamp;
|
||||||
}
|
}
|
||||||
else if
|
else if (IOobject::fileModificationChecking == IOobject::inotifyMaster)
|
||||||
(
|
|
||||||
regIOobject::fileModificationChecking
|
|
||||||
== regIOobject::inotifyMaster
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
@ -767,7 +763,7 @@ masterUncollatedFileOperation
|
|||||||
<< "Resetting fileModificationChecking to inotify"
|
<< "Resetting fileModificationChecking to inotify"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
regIOobject::fileModificationChecking = regIOobject::inotify;
|
IOobject::fileModificationChecking = IOobject::inotify;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -792,20 +788,16 @@ masterUncollatedFileOperation
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regIOobject::fileModificationChecking == regIOobject::timeStampMaster)
|
if (IOobject::fileModificationChecking == IOobject::timeStampMaster)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "Resetting fileModificationChecking to timeStamp" << endl;
|
<< "Resetting fileModificationChecking to timeStamp" << endl;
|
||||||
}
|
}
|
||||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
IOobject::fileModificationChecking = IOobject::timeStamp;
|
||||||
}
|
}
|
||||||
else if
|
else if (IOobject::fileModificationChecking == IOobject::inotifyMaster)
|
||||||
(
|
|
||||||
regIOobject::fileModificationChecking
|
|
||||||
== regIOobject::inotifyMaster
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
@ -813,7 +805,7 @@ masterUncollatedFileOperation
|
|||||||
<< "Resetting fileModificationChecking to inotify"
|
<< "Resetting fileModificationChecking to inotify"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
regIOobject::fileModificationChecking = regIOobject::inotify;
|
IOobject::fileModificationChecking = IOobject::inotify;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -624,11 +624,11 @@ bool Foam::fileOperations::uncollatedFileOperation::read
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set flag for e.g. codeStream
|
// Set flag for e.g. codeStream
|
||||||
const bool oldGlobal = io.globalObject();
|
const bool oldGlobal = io.globalObject(masterOnly);
|
||||||
io.globalObject() = masterOnly;
|
|
||||||
// If codeStream originates from dictionary which is
|
// If codeStream originates from dictionary which is
|
||||||
// not IOdictionary we have a problem so use global
|
// not IOdictionary we have a problem so use global
|
||||||
const bool oldFlag = regIOobject::masterOnlyReading;
|
const bool oldMasterOnly = regIOobject::masterOnlyReading;
|
||||||
regIOobject::masterOnlyReading = masterOnly;
|
regIOobject::masterOnlyReading = masterOnly;
|
||||||
|
|
||||||
// Read file
|
// Read file
|
||||||
@ -636,8 +636,8 @@ bool Foam::fileOperations::uncollatedFileOperation::read
|
|||||||
io.close();
|
io.close();
|
||||||
|
|
||||||
// Restore flags
|
// Restore flags
|
||||||
io.globalObject() = oldGlobal;
|
io.globalObject(oldGlobal);
|
||||||
regIOobject::masterOnlyReading = oldFlag;
|
regIOobject::masterOnlyReading = oldMasterOnly;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017, 2020 OpenFOAM Foundation
|
Copyright (C) 2011-2017, 2020 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -1020,7 +1020,7 @@ void Foam::polyMesh::addZones
|
|||||||
pointZones_.set(pI, pz[pI]);
|
pointZones_.set(pI, pz[pI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
pointZones_.writeOpt() = IOobject::AUTO_WRITE;
|
pointZones_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Face zones
|
// Face zones
|
||||||
@ -1034,7 +1034,7 @@ void Foam::polyMesh::addZones
|
|||||||
faceZones_.set(fI, fz[fI]);
|
faceZones_.set(fI, fz[fI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
faceZones_.writeOpt() = IOobject::AUTO_WRITE;
|
faceZones_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cell zones
|
// Cell zones
|
||||||
@ -1048,7 +1048,7 @@ void Foam::polyMesh::addZones
|
|||||||
cellZones_.set(cI, cz[cI]);
|
cellZones_.set(cI, cz[cI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cellZones_.writeOpt() = IOobject::AUTO_WRITE;
|
cellZones_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1216,13 +1216,13 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
points_.writeOpt() = IOobject::AUTO_WRITE;
|
points_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
points_.instance() = time().timeName();
|
points_.instance() = time().timeName();
|
||||||
points_.eventNo() = getEvent();
|
points_.eventNo() = getEvent();
|
||||||
|
|
||||||
if (tetBasePtIsPtr_)
|
if (tetBasePtIsPtr_)
|
||||||
{
|
{
|
||||||
tetBasePtIsPtr_->writeOpt() = IOobject::AUTO_WRITE;
|
tetBasePtIsPtr_->writeOpt(IOobject::AUTO_WRITE);
|
||||||
tetBasePtIsPtr_->instance() = time().timeName();
|
tetBasePtIsPtr_->instance() = time().timeName();
|
||||||
tetBasePtIsPtr_->eventNo() = getEvent();
|
tetBasePtIsPtr_->eventNo() = getEvent();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,33 +40,33 @@ void Foam::polyMesh::setInstance
|
|||||||
{
|
{
|
||||||
DebugInFunction << "Resetting file instance to " << inst << endl;
|
DebugInFunction << "Resetting file instance to " << inst << endl;
|
||||||
|
|
||||||
points_.writeOpt() = wOpt;
|
points_.writeOpt(wOpt);
|
||||||
points_.instance() = inst;
|
points_.instance() = inst;
|
||||||
|
|
||||||
faces_.writeOpt() = wOpt;
|
faces_.writeOpt(wOpt);
|
||||||
faces_.instance() = inst;
|
faces_.instance() = inst;
|
||||||
|
|
||||||
owner_.writeOpt() = wOpt;
|
owner_.writeOpt(wOpt);
|
||||||
owner_.instance() = inst;
|
owner_.instance() = inst;
|
||||||
|
|
||||||
neighbour_.writeOpt() = wOpt;
|
neighbour_.writeOpt(wOpt);
|
||||||
neighbour_.instance() = inst;
|
neighbour_.instance() = inst;
|
||||||
|
|
||||||
boundary_.writeOpt() = wOpt;
|
boundary_.writeOpt(wOpt);
|
||||||
boundary_.instance() = inst;
|
boundary_.instance() = inst;
|
||||||
|
|
||||||
pointZones_.writeOpt() = wOpt;
|
pointZones_.writeOpt(wOpt);
|
||||||
pointZones_.instance() = inst;
|
pointZones_.instance() = inst;
|
||||||
|
|
||||||
faceZones_.writeOpt() = wOpt;
|
faceZones_.writeOpt(wOpt);
|
||||||
faceZones_.instance() = inst;
|
faceZones_.instance() = inst;
|
||||||
|
|
||||||
cellZones_.writeOpt() = wOpt;
|
cellZones_.writeOpt(wOpt);
|
||||||
cellZones_.instance() = inst;
|
cellZones_.instance() = inst;
|
||||||
|
|
||||||
if (tetBasePtIsPtr_)
|
if (tetBasePtIsPtr_)
|
||||||
{
|
{
|
||||||
tetBasePtIsPtr_->writeOpt() = wOpt;
|
tetBasePtIsPtr_->writeOpt(wOpt);
|
||||||
tetBasePtIsPtr_->instance() = inst;
|
tetBasePtIsPtr_->instance() = inst;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -60,14 +60,14 @@ Foam::IOobject Foam::combustionModel::createIOobject
|
|||||||
|
|
||||||
if (io.typeHeaderOk<IOdictionary>(true))
|
if (io.typeHeaderOk<IOdictionary>(true))
|
||||||
{
|
{
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return io;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2558,7 +2558,7 @@ void Foam::ccm::reader::addFaceZones
|
|||||||
++nZone;
|
++nZone;
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh.faceZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.faceZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
warnDuplicates("faceZones", mesh.faceZones().names());
|
warnDuplicates("faceZones", mesh.faceZones().names());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ void Foam::meshReader::addFaceZones(polyMesh& mesh) const
|
|||||||
|
|
||||||
nZone++;
|
nZone++;
|
||||||
}
|
}
|
||||||
mesh.faceZones().writeOpt() = IOobject::AUTO_WRITE;
|
mesh.faceZones().writeOpt(IOobject::AUTO_WRITE);
|
||||||
warnDuplicates("faceZones", mesh.faceZones().names());
|
warnDuplicates("faceZones", mesh.faceZones().names());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -499,7 +499,7 @@ void Foam::cellTable::addCellZones
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
czMesh.writeOpt() = IOobject::AUTO_WRITE;
|
czMesh.writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016 OpenFOAM Foundation
|
Copyright (C) 2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -101,8 +101,8 @@ bool Foam::dynamicMotionSolverListFvMesh::init(const bool doInit)
|
|||||||
if (dEntry.isDict())
|
if (dEntry.isDict())
|
||||||
{
|
{
|
||||||
IOobject io(ioDict);
|
IOobject io(ioDict);
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
io.writeOpt() = IOobject::AUTO_WRITE;
|
io.writeOpt(IOobject::AUTO_WRITE);
|
||||||
io.rename(dEntry.dict().dictName());
|
io.rename(dEntry.dict().dictName());
|
||||||
|
|
||||||
IOdictionary IOsolverDict
|
IOdictionary IOsolverDict
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -116,7 +116,7 @@ bool Foam::dynamicMultiMotionSolverFvMesh::init(const bool doInit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IOobject io(dynDict);
|
IOobject io(dynDict);
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
|
|
||||||
motionPtr_.set
|
motionPtr_.set
|
||||||
(
|
(
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -56,9 +56,9 @@ SimplifiedDynamicFvMesh
|
|||||||
// Workaround to read fvSchemes and fvSolution after setting NO_READ
|
// Workaround to read fvSchemes and fvSolution after setting NO_READ
|
||||||
// when creating the mesh
|
// when creating the mesh
|
||||||
{
|
{
|
||||||
fvSchemes::readOpt() = IOobject::MUST_READ;
|
fvSchemes::readOpt(IOobject::MUST_READ);
|
||||||
fvSchemes::read();
|
fvSchemes::read();
|
||||||
fvSolution::readOpt() = IOobject::MUST_READ;
|
fvSolution::readOpt(IOobject::MUST_READ);
|
||||||
fvSolution::read();
|
fvSolution::read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2018 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -42,9 +42,9 @@ Foam::fvMeshSubsetProxy::zeroGradientField
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
IOobject io(df);
|
IOobject io(df);
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
io.writeOpt() = IOobject::NO_WRITE;
|
io.writeOpt(IOobject::NO_WRITE);
|
||||||
io.registerObject() = false;
|
io.registerObject(false);
|
||||||
|
|
||||||
auto tfield = tmp<GeometricField<Type, fvPatchField, volMesh>>::New
|
auto tfield = tmp<GeometricField<Type, fvPatchField, volMesh>>::New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -519,11 +519,11 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshTools::newMesh
|
|||||||
meshIO.instance() = facesInstance;
|
meshIO.instance() = facesInstance;
|
||||||
if (masterOnlyReading && !Pstream::master())
|
if (masterOnlyReading && !Pstream::master())
|
||||||
{
|
{
|
||||||
meshIO.readOpt() = IOobject::NO_READ;
|
meshIO.readOpt(IOobject::NO_READ);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meshIO.readOpt() = IOobject::READ_IF_PRESENT;
|
meshIO.readOpt(IOobject::READ_IF_PRESENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -537,9 +537,9 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshTools::newMesh
|
|||||||
// (correctly) does no longer so below code explicitly addFvPatches
|
// (correctly) does no longer so below code explicitly addFvPatches
|
||||||
// using the separately read boundary file.
|
// using the separately read boundary file.
|
||||||
|
|
||||||
const regIOobject::fileCheckTypes oldCheckType =
|
const IOobject::fileCheckTypes oldCheckType =
|
||||||
regIOobject::fileModificationChecking;
|
IOobject::fileModificationChecking;
|
||||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
IOobject::fileModificationChecking = IOobject::timeStamp;
|
||||||
|
|
||||||
|
|
||||||
//- Points
|
//- Points
|
||||||
@ -612,7 +612,7 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshTools::newMesh
|
|||||||
);
|
);
|
||||||
fvMesh& mesh = *meshPtr;
|
fvMesh& mesh = *meshPtr;
|
||||||
|
|
||||||
regIOobject::fileModificationChecking = oldCheckType;
|
IOobject::fileModificationChecking = oldCheckType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -145,7 +145,7 @@ Foam::codedPoints0MotionSolver::redirectMotionSolver() const
|
|||||||
constructDict.set("motionSolver", name_);
|
constructDict.set("motionSolver", name_);
|
||||||
|
|
||||||
IOobject io(*this);
|
IOobject io(*this);
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
|
|
||||||
redirectMotionSolverPtr_ = motionSolver::New
|
redirectMotionSolverPtr_ = motionSolver::New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -217,7 +217,7 @@ void Foam::points0MotionSolver::updateMesh(const mapPolyMesh& mpm)
|
|||||||
|
|
||||||
// points0 changed - set to write and check-in to database
|
// points0 changed - set to write and check-in to database
|
||||||
points0_.rename("points0");
|
points0_.rename("points0");
|
||||||
points0_.writeOpt() = IOobject::AUTO_WRITE;
|
points0_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
points0_.instance() = time().timeName();
|
points0_.instance() = time().timeName();
|
||||||
points0_.checkIn();
|
points0_.checkIn();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,7 +54,7 @@ Foam::IOobject Foam::motionSolver::stealRegistration
|
|||||||
// De-register if necessary
|
// De-register if necessary
|
||||||
const_cast<IOdictionary&>(dict).checkOut();
|
const_cast<IOdictionary&>(dict).checkOut();
|
||||||
}
|
}
|
||||||
io.registerObject() = true;
|
io.registerObject(true);
|
||||||
|
|
||||||
return io;
|
return io;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -1990,7 +1990,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory)
|
|||||||
{
|
{
|
||||||
if (readHistory)
|
if (readHistory)
|
||||||
{
|
{
|
||||||
history_.readOpt() = IOobject::READ_IF_PRESENT;
|
history_.readOpt(IOobject::READ_IF_PRESENT);
|
||||||
if (history_.typeHeaderOk<refinementHistory>(true))
|
if (history_.typeHeaderOk<refinementHistory>(true))
|
||||||
{
|
{
|
||||||
history_.read();
|
history_.read();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2017 OpenFOAM Foundation
|
Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -241,7 +241,7 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
|||||||
if (hasCellLevel && !cellLevelPtr_)
|
if (hasCellLevel && !cellLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io, "cellLevel");
|
IOobject rio(io, "cellLevel");
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt(IOobject::NO_READ);
|
||||||
cellLevelPtr_.reset
|
cellLevelPtr_.reset
|
||||||
(
|
(
|
||||||
new labelIOList(rio, labelList(mesh.nCells(), Zero))
|
new labelIOList(rio, labelList(mesh.nCells(), Zero))
|
||||||
@ -252,7 +252,7 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
|||||||
if (hasPointLevel && !pointLevelPtr_)
|
if (hasPointLevel && !pointLevelPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io, "pointLevel");
|
IOobject rio(io, "pointLevel");
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt(IOobject::NO_READ);
|
||||||
pointLevelPtr_.reset
|
pointLevelPtr_.reset
|
||||||
(
|
(
|
||||||
new labelIOList(rio, labelList(mesh.nPoints(), Zero))
|
new labelIOList(rio, labelList(mesh.nPoints(), Zero))
|
||||||
@ -268,7 +268,7 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
|||||||
if (!level0EdgePtr_)
|
if (!level0EdgePtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io, "level0Edge");
|
IOobject rio(io, "level0Edge");
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt(IOobject::NO_READ);
|
||||||
level0EdgePtr_.reset
|
level0EdgePtr_.reset
|
||||||
(
|
(
|
||||||
new uniformDimensionedScalarField
|
new uniformDimensionedScalarField
|
||||||
@ -284,7 +284,7 @@ void Foam::hexRef8Data::sync(const IOobject& io)
|
|||||||
if (hasHistory && !refHistoryPtr_)
|
if (hasHistory && !refHistoryPtr_)
|
||||||
{
|
{
|
||||||
IOobject rio(io, "refinementHistory");
|
IOobject rio(io, "refinementHistory");
|
||||||
rio.readOpt() = IOobject::NO_READ;
|
rio.readOpt(IOobject::NO_READ);
|
||||||
refHistoryPtr_.reset(new refinementHistory(rio, mesh.nCells(), true));
|
refHistoryPtr_.reset(new refinementHistory(rio, mesh.nCells(), true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -239,7 +239,7 @@ void Foam::polyTopoChanger::update(const mapPolyMesh& m)
|
|||||||
// Force the mesh modifiers to auto-write. This allows us to
|
// Force the mesh modifiers to auto-write. This allows us to
|
||||||
// preserve the current state of modifiers corresponding with
|
// preserve the current state of modifiers corresponding with
|
||||||
// the mesh.
|
// the mesh.
|
||||||
writeOpt() = IOobject::AUTO_WRITE;
|
writeOpt(IOobject::AUTO_WRITE);
|
||||||
instance() = mesh_.time().timeName();
|
instance() = mesh_.time().timeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ void Foam::polyTopoChanger::addTopologyModifiers
|
|||||||
set(tmI, tm[tmI]);
|
set(tmI, tm[tmI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeOpt() = IOobject::AUTO_WRITE;
|
writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -62,8 +62,7 @@ Foam::IOobject Foam::fa::options::createIOobject
|
|||||||
<< io.instance()/io.name() << nl
|
<< io.instance()/io.name() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -76,16 +75,16 @@ Foam::IOobject Foam::fa::options::createIOobject
|
|||||||
<< io.instance()/io.name() << nl
|
<< io.instance()/io.name() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return io;
|
return io;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 Wikki Ltd
|
Copyright (C) 2016-2017 Wikki Ltd
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -1121,7 +1121,7 @@ Foam::faMesh::S00() const
|
|||||||
S0()
|
S0()
|
||||||
);
|
);
|
||||||
|
|
||||||
S0Ptr_->writeOpt() = IOobject::AUTO_WRITE;
|
S0Ptr_->writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return *S00Ptr_;
|
return *S00Ptr_;
|
||||||
|
|||||||
@ -15,8 +15,8 @@ if (mesh.dynamic())
|
|||||||
// - set to READ_IF_PRESENT and AUTO_WRITE to simplify dpdt correction
|
// - set to READ_IF_PRESENT and AUTO_WRITE to simplify dpdt correction
|
||||||
// by meshPhi
|
// by meshPhi
|
||||||
|
|
||||||
dpdtHeader.readOpt() = IOobject::READ_IF_PRESENT;
|
dpdtHeader.readOpt(IOobject::READ_IF_PRESENT);
|
||||||
dpdtHeader.writeOpt() = IOobject::AUTO_WRITE;
|
dpdtHeader.writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -28,5 +28,5 @@ volScalarField dpdt(dpdtHeader, fvc::ddt(p));
|
|||||||
if (!thermo.dpdt())
|
if (!thermo.dpdt())
|
||||||
{
|
{
|
||||||
dpdt == dimensionedScalar(dpdt.dimensions(), Zero);
|
dpdt == dimensionedScalar(dpdt.dimensions(), Zero);
|
||||||
dpdt.writeOpt() = IOobject::NO_WRITE;
|
dpdt.writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
Copyright (C) 2020 PCOpt/NTUA
|
Copyright (C) 2020 PCOpt/NTUA
|
||||||
Copyright (C) 2020 FOSS GP
|
Copyright (C) 2020 FOSS GP
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -53,16 +53,16 @@ Foam::IOobject Foam::IOMRFZoneList::createIOobject
|
|||||||
{
|
{
|
||||||
Info<< "Creating MRF zone list from " << io.name() << endl;
|
Info<< "Creating MRF zone list from " << io.name() << endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "No MRF models present" << nl << endl;
|
Info<< "No MRF models present" << nl << endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return io;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -63,8 +63,7 @@ Foam::IOobject Foam::fv::options::createIOobject
|
|||||||
<< io.instance()/io.name() << nl
|
<< io.instance()/io.name() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -77,16 +76,16 @@ Foam::IOobject Foam::fv::options::createIOobject
|
|||||||
<< io.instance()/io.name() << nl
|
<< io.instance()/io.name() << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
return io;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return io;
|
return io;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2014 OpenFOAM Foundation
|
Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -49,13 +50,13 @@ Foam::IOobject Foam::IOporosityModelList::createIOobject
|
|||||||
{
|
{
|
||||||
Info<< "Creating porosity model list from " << io.name() << nl << endl;
|
Info<< "Creating porosity model list from " << io.name() << nl << endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info<< "No porosity models present" << nl << endl;
|
Info<< "No porosity models present" << nl << endl;
|
||||||
|
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
return io;
|
return io;
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -252,7 +252,7 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V00() const
|
|||||||
|
|
||||||
|
|
||||||
// If V00 is used then V0 should be stored for restart
|
// If V00 is used then V0 should be stored for restart
|
||||||
V0Ptr_->writeOpt() = IOobject::AUTO_WRITE;
|
V0Ptr_->writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return *V00Ptr_;
|
return *V00Ptr_;
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -467,9 +467,9 @@ Foam::simplifiedMeshes::columnFvMesh::columnFvMesh
|
|||||||
// Workaround to read fvSchemes and fvSolution after setting NO_READ
|
// Workaround to read fvSchemes and fvSolution after setting NO_READ
|
||||||
// when creating the mesh
|
// when creating the mesh
|
||||||
{
|
{
|
||||||
fvSchemes::readOpt() = IOobject::MUST_READ;
|
fvSchemes::readOpt(IOobject::MUST_READ);
|
||||||
fvSchemes::read();
|
fvSchemes::read();
|
||||||
fvSolution::readOpt() = IOobject::MUST_READ;
|
fvSolution::readOpt(IOobject::MUST_READ);
|
||||||
fvSolution::read();
|
fvSolution::read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -61,8 +61,8 @@ void Foam::functionObjects::nearWallFields::createFields
|
|||||||
sflds.setSize(sz+1);
|
sflds.setSize(sz+1);
|
||||||
|
|
||||||
IOobject io(fld);
|
IOobject io(fld);
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
io.writeOpt() = IOobject::NO_WRITE;
|
io.writeOpt(IOobject::NO_WRITE);
|
||||||
|
|
||||||
io.rename(sampleFldName);
|
io.rename(sampleFldName);
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -614,7 +614,7 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor
|
|||||||
|
|
||||||
if (log)
|
if (log)
|
||||||
{
|
{
|
||||||
indicator_.writeOpt() = IOobject::AUTO_WRITE;
|
indicator_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -130,7 +130,7 @@ bool Foam::ensightOutput::writeCloudField
|
|||||||
// Handle this by READ_IF_PRESENT instead.
|
// Handle this by READ_IF_PRESENT instead.
|
||||||
|
|
||||||
IOobject fieldObj(io);
|
IOobject fieldObj(io);
|
||||||
fieldObj.readOpt() = IOobject::READ_IF_PRESENT;
|
fieldObj.readOpt(IOobject::READ_IF_PRESENT);
|
||||||
|
|
||||||
IOField<Type> field(fieldObj);
|
IOField<Type> field(fieldObj);
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -331,7 +331,7 @@ Foam::PDRblock::innerMesh(const IOobject& io) const
|
|||||||
|
|
||||||
|
|
||||||
IOobject iomesh(io);
|
IOobject iomesh(io);
|
||||||
iomesh.writeOpt() = IOobject::AUTO_WRITE;
|
iomesh.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
auto meshPtr = autoPtr<polyMesh>::New
|
auto meshPtr = autoPtr<polyMesh>::New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -186,8 +186,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
|
|||||||
// ~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
//IOobject noReadIO(io);
|
//IOobject noReadIO(io);
|
||||||
//noReadIO.readOpt() = IOobject::NO_READ;
|
//noReadIO.readOpt(IOobject::NO_READ);
|
||||||
//noReadIO.writeOpt() = IOobject::AUTO_WRITE;
|
//noReadIO.writeOpt(IOobject::AUTO_WRITE);
|
||||||
newMeshPtr.reset
|
newMeshPtr.reset
|
||||||
(
|
(
|
||||||
new Type
|
new Type
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -341,7 +341,7 @@ Foam::IOobject Foam::topoSet::findIOobject
|
|||||||
if (!io.typeHeaderOk<topoSet>(false) && disallowGenericSets != 0)
|
if (!io.typeHeaderOk<topoSet>(false) && disallowGenericSets != 0)
|
||||||
{
|
{
|
||||||
DebugInfo<< "Setting no read for set " << name << endl;
|
DebugInfo<< "Setting no read for set " << name << endl;
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
}
|
}
|
||||||
|
|
||||||
return io;
|
return io;
|
||||||
@ -389,10 +389,7 @@ Foam::topoSet::topoSet(const IOobject& obj, const word& wantedType)
|
|||||||
(
|
(
|
||||||
readOpt() == IOobject::MUST_READ
|
readOpt() == IOobject::MUST_READ
|
||||||
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
||||||
|| (
|
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
readOpt() == IOobject::READ_IF_PRESENT
|
|
||||||
&& headerOk()
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (readStream(wantedType).good())
|
if (readStream(wantedType).good())
|
||||||
@ -420,10 +417,7 @@ Foam::topoSet::topoSet
|
|||||||
(
|
(
|
||||||
readOpt() == IOobject::MUST_READ
|
readOpt() == IOobject::MUST_READ
|
||||||
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
||||||
|| (
|
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||||
readOpt() == IOobject::READ_IF_PRESENT
|
|
||||||
&& headerOk()
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (readStream(wantedType).good())
|
if (readStream(wantedType).good())
|
||||||
|
|||||||
@ -298,7 +298,7 @@ void variablesSet::renameTurbulenceField
|
|||||||
if (!mesh.foundObject<VolFieldType>(baseName))
|
if (!mesh.foundObject<VolFieldType>(baseName))
|
||||||
{
|
{
|
||||||
autoPtr<VolFieldType> baseCopy(new VolFieldType(baseField));
|
autoPtr<VolFieldType> baseCopy(new VolFieldType(baseField));
|
||||||
baseCopy().IOobject::writeOpt() = baseField.writeOpt();
|
baseCopy().IOobject::writeOpt(baseField.writeOpt());
|
||||||
baseCopy().rename(baseName);
|
baseCopy().rename(baseName);
|
||||||
regIOobject::store(baseCopy);
|
regIOobject::store(baseCopy);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -555,7 +555,7 @@ Foam::autoPtr<Foam::fvMesh> Foam::voxelMeshSearch::makeMesh
|
|||||||
|
|
||||||
//Info<< "Creating polyMesh" << endl;
|
//Info<< "Creating polyMesh" << endl;
|
||||||
IOobject polyIO(io);
|
IOobject polyIO(io);
|
||||||
polyIO.readOpt() = IOobject::NO_READ;
|
polyIO.readOpt(IOobject::NO_READ);
|
||||||
polyMesh mesh
|
polyMesh mesh
|
||||||
(
|
(
|
||||||
//IOobject
|
//IOobject
|
||||||
@ -587,7 +587,7 @@ Foam::autoPtr<Foam::fvMesh> Foam::voxelMeshSearch::makeMesh
|
|||||||
io.name()
|
io.name()
|
||||||
);
|
);
|
||||||
IOobject fvIO(io);
|
IOobject fvIO(io);
|
||||||
fvIO.readOpt() = IOobject::MUST_READ;
|
fvIO.readOpt(IOobject::MUST_READ);
|
||||||
|
|
||||||
return autoPtr<fvMesh>::New(fvIO);
|
return autoPtr<fvMesh>::New(fvIO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2018 OpenFOAM Foundation
|
Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -205,7 +206,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
|
|||||||
),
|
),
|
||||||
K_(nullptr)
|
K_(nullptr)
|
||||||
{
|
{
|
||||||
phi_.writeOpt() = IOobject::AUTO_WRITE;
|
phi_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
correctKinematics();
|
correctKinematics();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2018 OpenFOAM Foundation
|
Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -205,7 +205,7 @@ Foam::phaseSystem::phaseSystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write phi
|
// Write phi
|
||||||
phi_.writeOpt() = IOobject::AUTO_WRITE;
|
phi_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
// Blending methods
|
// Blending methods
|
||||||
forAllConstIter(dictionary, subDict("blending"), iter)
|
forAllConstIter(dictionary, subDict("blending"), iter)
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -88,8 +88,8 @@ void Foam::Detail::MeshedSurfaceIOAllocator::setWriteOption
|
|||||||
IOobject::writeOption wOpt
|
IOobject::writeOption wOpt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
points_.writeOpt() = wOpt;
|
points_.writeOpt(wOpt);
|
||||||
faces_.writeOpt() = wOpt;
|
faces_.writeOpt(wOpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -49,9 +49,9 @@ void Foam::surfMesh::setInstance
|
|||||||
|
|
||||||
void Foam::surfMesh::setWriteOption(IOobject::writeOption wOpt)
|
void Foam::surfMesh::setWriteOption(IOobject::writeOption wOpt)
|
||||||
{
|
{
|
||||||
writeOpt() = wOpt;
|
writeOpt(wOpt);
|
||||||
Allocator::setWriteOption(wOpt);
|
Allocator::setWriteOption(wOpt);
|
||||||
surfZones_.writeOpt() = wOpt;
|
surfZones_.writeOpt(wOpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -111,7 +111,7 @@ Foam::TDACChemistryModel<ReactionThermo, ThermoType>::TDACChemistryModel
|
|||||||
if (!header.typeHeaderOk<volScalarField>(true))
|
if (!header.typeHeaderOk<volScalarField>(true))
|
||||||
{
|
{
|
||||||
composition.setInactive(i);
|
composition.setInactive(i);
|
||||||
this->Y()[i].writeOpt() = IOobject::NO_WRITE;
|
this->Y()[i].writeOpt(IOobject::NO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -883,7 +883,7 @@ Foam::scalar Foam::TDACChemistryModel<ReactionThermo, ThermoType>::solve
|
|||||||
{
|
{
|
||||||
if (composition.active(i))
|
if (composition.active(i))
|
||||||
{
|
{
|
||||||
this->Y()[i].writeOpt() = IOobject::AUTO_WRITE;
|
this->Y()[i].writeOpt(IOobject::AUTO_WRITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
Copyright (C) 2018-2021 OpenCFD Ltd
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -246,7 +246,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
|
|||||||
|
|
||||||
// Reset the MUST_READ flag
|
// Reset the MUST_READ flag
|
||||||
IOobject noReadHeader(IHeader);
|
IOobject noReadHeader(IHeader);
|
||||||
noReadHeader.readOpt() = IOobject::NO_READ;
|
noReadHeader.readOpt(IOobject::NO_READ);
|
||||||
|
|
||||||
ILambda_.set
|
ILambda_.set
|
||||||
(
|
(
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -72,12 +72,12 @@ Foam::IOobject Foam::radiation::radiationModel::createIOobject
|
|||||||
|
|
||||||
if (io.typeHeaderOk<IOdictionary>(true))
|
if (io.typeHeaderOk<IOdictionary>(true))
|
||||||
{
|
{
|
||||||
io.readOpt() = IOobject::MUST_READ_IF_MODIFIED;
|
io.readOpt(IOobject::MUST_READ_IF_MODIFIED);
|
||||||
return io;
|
return io;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
io.readOpt() = IOobject::NO_READ;
|
io.readOpt(IOobject::NO_READ);
|
||||||
return io;
|
return io;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -139,7 +139,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers()
|
|||||||
true // Attach-detach action
|
true // Attach-detach action
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
topoChanger_.writeOpt() = IOobject::AUTO_WRITE;
|
topoChanger_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
// Write mesh
|
// Write mesh
|
||||||
write();
|
write();
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -168,7 +168,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers()
|
|||||||
slidingInterface::INTEGRAL
|
slidingInterface::INTEGRAL
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
topoChanger_.writeOpt() = IOobject::AUTO_WRITE;
|
topoChanger_.writeOpt(IOobject::AUTO_WRITE);
|
||||||
|
|
||||||
write();
|
write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015 IH-Cantabria
|
Copyright (C) 2015 IH-Cantabria
|
||||||
Copyright (C) 2016-2017 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -294,7 +294,7 @@ Foam::waveModel::waveModel
|
|||||||
|
|
||||||
bool Foam::waveModel::readDict(const dictionary& overrideDict)
|
bool Foam::waveModel::readDict(const dictionary& overrideDict)
|
||||||
{
|
{
|
||||||
readOpt() = IOobject::READ_IF_PRESENT;
|
readOpt(IOobject::READ_IF_PRESENT);
|
||||||
if (headerOk())
|
if (headerOk())
|
||||||
{
|
{
|
||||||
IOdictionary::regIOobject::read();
|
IOdictionary::regIOobject::read();
|
||||||
|
|||||||
Reference in New Issue
Block a user