Commit 22a13ea2 authored by Mark Olesen's avatar Mark Olesen
Browse files

PV3FoamReader - tooltips and reclaim memory if mesh caching is turned off

parent 062bb366
......@@ -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"
......
......@@ -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
......
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