diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index abeeadca9d..1844139c2d 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -1014,6 +1014,12 @@ bool Foam::fvMesh::writeObject ok = phiPtr_->write(valid); } + // Write V0 only if V00 exists + if (V00Ptr_) + { + ok = ok && V0Ptr_->write(valid); + } + return ok && polyMesh::writeObject(fmt, ver, cmp, valid); } diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index c77610a2ae..973a8ddef1 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -262,9 +262,6 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V00() const ), V0() ); - - // If V00 is used then V0 should be stored for restart - V0Ptr_->writeOpt() = IOobject::AUTO_WRITE; } return *V00Ptr_;