ENH: polyMesh - add functions to set regIOobject up-to-date with mesh points for topology change

This commit is contained in:
andy
2014-04-08 11:57:27 +01:00
committed by Andrew Heather
parent 7ee82c56a1
commit 792ee881af
2 changed files with 20 additions and 2 deletions

View File

@ -1047,6 +1047,18 @@ const Foam::pointField& Foam::polyMesh::points() const
}
bool Foam::polyMesh::upToDatePoints(const regIOobject& io) const
{
return io.upToDate(points_);
}
void Foam::polyMesh::setUpToDatePoints(regIOobject& io) const
{
io.eventNo() = points_.eventNo();
}
const Foam::faceList& Foam::polyMesh::faces() const
{
if (clearedPrimitives_)
@ -1132,7 +1144,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
points_.writeOpt() = IOobject::AUTO_WRITE;
points_.instance() = time().timeName();
points_.eventNo() = getEvent();
tmp<scalarField> sweptVols = primitiveMesh::movePoints
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -394,6 +394,12 @@ public:
//- Return raw points
virtual const pointField& points() const;
//- Return true if io is up-to-date with points
virtual bool upToDatePoints(const regIOobject& io) const;
//- Set io to be up-to-date with points
virtual void setUpToDatePoints(regIOobject& io) const;
//- Return raw faces
virtual const faceList& faces() const;