Skip to content

Commit

Permalink
BUG: movePoints: remove additional argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mattijs committed Aug 29, 2012
1 parent 415f025 commit 969dc72
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
11 changes: 1 addition & 10 deletions src/OpenFOAM/meshes/polyMesh/polyMesh.C
Expand Up @@ -1092,8 +1092,7 @@ const Foam::pointField& Foam::polyMesh::oldPoints() const

Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
(
const pointField& newPoints,
const bool deleteDemandDrivenData
const pointField& newPoints
)
{
if (debug)
Expand Down Expand Up @@ -1147,14 +1146,6 @@ 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_);

Expand Down
9 changes: 4 additions & 5 deletions src/OpenFOAM/meshes/polyMesh/polyMesh.H
Expand Up @@ -442,11 +442,7 @@ public:
}

//- Move points, returns volumes swept by faces in motion
virtual tmp<scalarField> movePoints
(
const pointField&,
const bool deleteDemandDrivenData = false
);
virtual tmp<scalarField> movePoints(const pointField&);

//- Reset motion
void resetMotion() const;
Expand Down Expand Up @@ -526,6 +522,9 @@ public:
//- Clear primitive data (points, faces and cells)
void clearPrimitives();

//- Clear geometry not used for CFD (cellTree, tetBasePtIs)
void clearAdditionalGeom();

//- Clear cell tree data
void clearCellTree();

Expand Down
18 changes: 17 additions & 1 deletion src/OpenFOAM/meshes/polyMesh/polyMeshClear.C
Expand Up @@ -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
Expand Down Expand Up @@ -81,6 +81,22 @@ void Foam::polyMesh::clearGeom()
}


void Foam::polyMesh::clearAdditionalGeom()
{
if (debug)
{
Info<< "void polyMesh::clearAdditionalGeom() : "
<< "clearing additional geometric data"
<< endl;
}

// Remove the stored tet base points
tetBasePtIsPtr_.clear();
// Remove the cell tree
cellTreePtr_.clear();
}


void Foam::polyMesh::clearAddressing()
{
if (debug)
Expand Down
3 changes: 2 additions & 1 deletion src/dynamicMesh/motionSmoother/motionSmoother.C
Expand Up @@ -844,7 +844,8 @@ Foam::tmp<Foam::scalarField> Foam::motionSmoother::movePoints

// Move actual mesh points. Make sure to delete tetBasePtIs so it
// gets rebuilt.
tmp<scalarField> tsweptVol = mesh_.movePoints(newPoints, true);
mesh_.clearAdditionalGeom();
tmp<scalarField> tsweptVol = mesh_.movePoints(newPoints);

pp_.movePoints(mesh_.points());

Expand Down

0 comments on commit 969dc72

Please sign in to comment.