Commit 22b85e36 authored by mattijs's avatar mattijs
Browse files

BUG: sampledSurface : clear out underlying storage

parent 8d7689b2
......@@ -50,6 +50,9 @@ void Foam::distanceSurface::createGeometry()
// Clear any stored topologies
facesPtr_.clear();
// Clear derived data
clearGeom();
const fvMesh& fvm = static_cast<const fvMesh&>(mesh());
// Distance to cell centres
......@@ -361,6 +364,9 @@ bool Foam::distanceSurface::expire()
// Clear any stored topologies
facesPtr_.clear();
// Clear derived data
clearGeom();
// already marked as expired
if (needsUpdate_)
{
......
......@@ -333,6 +333,9 @@ bool Foam::sampledIsoSurface::updateGeometry() const
surfPtr_.clear();
facesPtr_.clear();
// Clear derived data
clearGeom();
if (subMeshPtr_.valid())
{
surfPtr_.reset
......@@ -471,6 +474,9 @@ bool Foam::sampledIsoSurface::expire()
facesPtr_.clear();
subMeshPtr_.clear();
// Clear derived data
clearGeom();
// already marked as expired
if (prevTimeIndex_ == -1)
{
......
......@@ -62,6 +62,9 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const
// Clear any stored topo
facesPtr_.clear();
// Clear derived data
sampledSurface::clearGeom();
// Optionally read volScalarField
autoPtr<volScalarField> readFieldPtr_;
......@@ -240,6 +243,9 @@ bool Foam::sampledIsoSurfaceCell::expire()
{
facesPtr_.clear();
// Clear derived data
sampledSurface::clearGeom();
// already marked as expired
if (prevTimeIndex_ == -1)
{
......
......@@ -60,6 +60,8 @@ void Foam::sampledCuttingPlane::createGeometry()
pointDistance_.clear();
cellDistancePtr_.clear();
// Clear derived data
clearGeom();
// Get any subMesh
if (zoneID_.index() != -1 && !subMeshPtr_.valid())
......@@ -321,6 +323,9 @@ bool Foam::sampledCuttingPlane::expire()
// Clear any stored topologies
facesPtr_.clear();
// Clear derived data
clearGeom();
// already marked as expired
if (needsUpdate_)
{
......
......@@ -124,6 +124,8 @@ bool Foam::sampledThresholdCellFaces::updateGeometry() const
).MeshedSurface<face>::transfer(surf);
meshCells_.transfer(surf.meshCells());
// clear derived data
sampledSurface::clearGeom();
if (debug)
{
......
Markdown is supported
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