diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 960e35ddd4ca620744ee5733e4843b9f539c139b..8877cdafcfc38b98f6851040fb9159c5b87ace3f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1092,7 +1092,8 @@ const Foam::pointField& Foam::polyMesh::oldPoints() const Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints ( - const pointField& newPoints + const pointField& newPoints, + const bool deleteDemandDrivenData ) { if (debug) @@ -1146,6 +1147,14 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints // Force recalculation of all geometric data with new points + if (deleteDemandDrivenData) + { + // Remove the stored tet base points + tetBasePtIsPtr_.clear(); + // Remove the cell tree + cellTreePtr_.clear(); + } + bounds_ = boundBox(points_); boundary_.movePoints(points_); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index d67896744f9b0b3bb9b67b538442c53e2ca438ca..6c013339745a3add02a726040160f3b61994db50 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -442,7 +442,11 @@ public: } //- Move points, returns volumes swept by faces in motion - virtual tmp<scalarField> movePoints(const pointField&); + virtual tmp<scalarField> movePoints + ( + const pointField&, + const bool deleteDemandDrivenData = false + ); //- Reset motion void resetMotion() const;