BUG: polyMesh constructor AUTO_WRITE flag, ignored readOpt (#1147)
- fixed some more places with an explicit AUTO_WRITE. BUG: revert handling of the readOption. It should not be NO_READ. In cases where the user a IOobject without specifying read/write, it defaults to NO_READ anyhow. However, the move constructor can also be called with empty lists and a read option. This has the same signature, but obviously will not work with NO_READ.
This commit is contained in:
parent
620f5274d0
commit
74d9dc3f50
@ -213,7 +213,9 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
fvMesh::defaultRegion,
|
||||
runTime.timeName(),
|
||||
runTime
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
pointField(mesh.points()), // Could we safely re-use the data?
|
||||
faceList(mesh.faces()),
|
||||
|
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -605,7 +605,9 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
polyMesh::defaultRegion,
|
||||
runTime.constant(),
|
||||
runTime
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
std::move(points),
|
||||
cellShapes,
|
||||
|
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -329,7 +329,9 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
polyMesh::defaultRegion,
|
||||
runTime.constant(),
|
||||
runTime
|
||||
runTime,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
pointField(points), // Copy of points
|
||||
cells,
|
||||
|
@ -374,7 +374,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
io.writeOpt()
|
||||
),
|
||||
std::move(points)
|
||||
@ -387,7 +387,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
io.writeOpt()
|
||||
),
|
||||
std::move(faces)
|
||||
@ -400,7 +400,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
io.writeOpt()
|
||||
),
|
||||
std::move(owner)
|
||||
@ -413,7 +413,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
io.writeOpt()
|
||||
),
|
||||
std::move(neighbour)
|
||||
@ -427,7 +427,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
io.writeOpt()
|
||||
),
|
||||
*this,
|
||||
@ -447,7 +447,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
*this,
|
||||
@ -461,7 +461,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
*this,
|
||||
@ -475,7 +475,7 @@ Foam::polyMesh::polyMesh
|
||||
instance(),
|
||||
meshSubDir,
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
io.readOpt(),
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
*this,
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -2607,7 +2607,9 @@ Foam::autoPtr<Foam::polyMesh> Foam::ccm::reader::mesh
|
||||
(
|
||||
polyMesh::defaultRegion,
|
||||
"constant",
|
||||
registry
|
||||
registry,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
std::move(points_),
|
||||
std::move(faces_),
|
||||
|
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -97,7 +97,9 @@ Foam::autoPtr<Foam::polyMesh> Foam::meshReader::mesh
|
||||
(
|
||||
polyMesh::defaultRegion,
|
||||
registry.time().constant(),
|
||||
registry
|
||||
registry,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
std::move(points_),
|
||||
std::move(meshFaces_),
|
||||
|
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -431,7 +431,9 @@ Foam::autoPtr<Foam::polyMesh> Foam::fileFormats::FIREMeshReader::mesh
|
||||
(
|
||||
polyMesh::defaultRegion,
|
||||
"constant",
|
||||
registry
|
||||
registry,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
std::move(points_),
|
||||
std::move(meshFaces_),
|
||||
|
@ -3311,6 +3311,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
|
||||
|
||||
IOobject noReadIO(io);
|
||||
noReadIO.readOpt() = IOobject::NO_READ;
|
||||
noReadIO.readOpt() = IOobject::AUTO_WRITE;
|
||||
newMeshPtr.reset
|
||||
(
|
||||
new fvMesh
|
||||
|
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -478,7 +478,8 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
|
||||
"newTgt." + Foam::name(Pstream::myProcNo()),
|
||||
tgtRegion_.time().timeName(),
|
||||
tgtRegion_.time(),
|
||||
IOobject::NO_READ
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
std::move(newTgtPoints),
|
||||
std::move(newTgtFaces),
|
||||
|
Loading…
Reference in New Issue
Block a user