Commit abf262f0 authored by mattijs's avatar mattijs
Browse files

ENH: polyMesh: movePoints to optionally clear tetBasePt structure

parent 70c9c27b
......@@ -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_);
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment