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:
Mark Olesen
2019-01-07 22:23:19 +01:00
parent 620f5274d0
commit 74d9dc3f50
9 changed files with 35 additions and 21 deletions

View File

@ -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),