Skip to content
Permalink
Browse files

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

…fferencing
  • Loading branch information...
Henry Weller
Henry Weller committed Apr 26, 2019
1 parent 3eb9635 commit 911a106592cd5622fccfbef8b455251607c77627
Showing with 7 additions and 4 deletions.
  1. +6 −0 src/finiteVolume/fvMesh/fvMesh.C
  2. +1 −4 src/finiteVolume/fvMesh/fvMeshGeometry.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);
}

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

0 comments on commit 911a106

Please sign in to comment.
You can’t perform that action at this time.