fvMesh: Ensure V0 is written if V00 exists for restart of backward differencing

This commit is contained in:
Henry Weller
2019-04-26 16:28:07 +01:00
parent 3eb9635cde
commit 911a106592
2 changed files with 7 additions and 4 deletions

View File

@ -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);
}

View File

@ -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_;