From 22a13ea28b116f6709ec636879694d8d73f3f3a9 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@Germany> Date: Mon, 4 Aug 2008 18:23:10 +0200 Subject: [PATCH] PV3FoamReader - tooltips and reclaim memory if mesh caching is turned off --- .../PV3FoamReader/PV3FoamReader_SM.xml | 9 ++++++--- .../graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml index 9a0e8d26bfd..59c118281f5 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml +++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml @@ -12,20 +12,22 @@ animateable="0"> <FileListDomain name="files"/> <Documentation> - Specifies the filename for the OpenFOAM Reader + Specifies the filename for the OpenFOAM Reader. </Documentation> </StringVectorProperty> - <!-- Time info sent to animation controls (top of window) --> + <!-- Send discrete time info to the animation panel --> <DoubleVectorProperty name="TimestepValues" + repeatable="1" information_only="1"> <TimeStepsInformationHelper/> <Documentation> - Available timestep values + Available timestep values. </Documentation> </DoubleVectorProperty> + <!-- Send continuous time info to the animation panel --> <DoubleVectorProperty name="TimeRange" information_only="1"> @@ -190,6 +192,7 @@ </Documentation> </IntVectorProperty> + <!-- Update GUI check box --> <IntVectorProperty name="UpdateGUI" diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C index 11a28847b3b..10ccf691263 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C +++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C @@ -79,6 +79,12 @@ void Foam::vtkPV3Foam::reduceMemory() { csetPolyDecomp_[i].clear(); } + + if (!reader_->GetCacheMesh()) + { + delete meshPtr_; + meshPtr_ = NULL; + } } @@ -413,22 +419,25 @@ void Foam::vtkPV3Foam::Update // Set up mesh parts selection(s) updateMeshPartsStatus(); + reader_->UpdateProgress(0.15); + // Update the Foam mesh updateFoamMesh(); - reader_->UpdateProgress(0.2); + reader_->UpdateProgress(0.4); // Convert meshes - start port0 at block=0 int blockNo = 0; convertMeshVolume(output, blockNo); convertMeshPatches(output, blockNo); - reader_->UpdateProgress(0.4); + reader_->UpdateProgress(0.6); if (reader_->GetIncludeZones()) { convertMeshCellZones(output, blockNo); convertMeshFaceZones(output, blockNo); convertMeshPointZones(output, blockNo); + reader_->UpdateProgress(0.65); } if (reader_->GetIncludeSets()) @@ -436,6 +445,7 @@ void Foam::vtkPV3Foam::Update convertMeshCellSets(output, blockNo); convertMeshFaceSets(output, blockNo); convertMeshPointSets(output, blockNo); + reader_->UpdateProgress(0.7); } // restart port1 at block=0 -- GitLab