diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
index 82b3384a28..a82c81850f 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/PVFoamReader_SM.xml
@@ -27,20 +27,17 @@
-
-
+
-
-
- Rescan for updated times/fields.
-
-
+ Rescan for updated times/fields.
+
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The list of point fields.
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.cxx
index 95c3002d74..3b6fe3da97 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.cxx
@@ -30,7 +30,7 @@ License
#include
#include
-#include "pqApplicationCore.h"
+#include "pqPVApplicationCore.h"
#include "pqPipelineRepresentation.h"
#include "pqView.h"
#include "vtkSMDocumentation.h"
@@ -45,8 +45,7 @@ License
static QAbstractButton* setButtonProperties
(
QAbstractButton* b,
- vtkSMIntVectorProperty* prop,
- bool initChecked = true
+ vtkSMProperty* prop
)
{
QString tip;
@@ -68,10 +67,13 @@ static QAbstractButton* setButtonProperties
}
b->setFocusPolicy(Qt::NoFocus); // avoid dotted border
- // initial checked state
- if (initChecked)
+ vtkSMIntVectorProperty* intProp =
+ vtkSMIntVectorProperty::SafeDownCast(prop);
+
+ // initial checked state for integer (bool) properties
+ if (intProp)
{
- b->setChecked(prop->GetElement(0));
+ b->setChecked(intProp->GetElement(0));
}
return b;
@@ -97,19 +99,27 @@ static vtkSMIntVectorProperty* lookupIntProp
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
-void pqFoamReaderControls::updatePartsStatus()
+void pqFoamReaderControls::fireCommand
+(
+ vtkSMIntVectorProperty* prop,
+ bool checked
+)
{
- vtkSMProperty* prop = this->proxy()->GetProperty("PartArrayStatus");
- if (prop)
- {
- this->proxy()->UpdatePropertyInformation(prop);
- }
+ vtkSMProxy* pxy = this->proxy();
+
+ prop->SetElement(0, checked); // Toogle bool
+
+ // Fire off command
+ prop->Modified();
+ pxy->UpdateProperty(pxy->GetPropertyName(prop));
}
-void pqFoamReaderControls::updatePartsStatus(bool)
+void pqFoamReaderControls::updateParts()
{
- updatePartsStatus();
+ vtkSMProxy* pxy = this->proxy();
+
+ pxy->UpdatePropertyInformation(pxy->GetProperty("PartArrayStatus"));
}
@@ -117,25 +127,28 @@ void pqFoamReaderControls::updatePartsStatus(bool)
void pqFoamReaderControls::refreshPressed()
{
- // Update everything
+ vtkSMProxy* pxy = this->proxy();
+
+ // Fire off command
refresh_->Modified();
+ pxy->UpdateProperty(pxy->GetPropertyName(refresh_));
- vtkSMSourceProxy::SafeDownCast(this->proxy())->UpdatePipeline();
+ vtkSMSourceProxy::SafeDownCast(pxy)->UpdatePipeline();
- // Update all views
- pqApplicationCore::instance()->render();
+ // Trigger a rendering (all views)
+ pqPVApplicationCore::instance()->render();
}
void pqFoamReaderControls::cacheMesh(bool checked)
{
- cacheMesh_->SetElement(0, checked);
+ fireCommand(cacheMesh_, checked);
}
void pqFoamReaderControls::showPatchNames(bool checked)
{
- showPatchNames_->SetElement(0, checked);
+ fireCommand(showPatchNames_, checked);
// update the active view
if (this->view())
@@ -143,28 +156,28 @@ void pqFoamReaderControls::showPatchNames(bool checked)
this->view()->render();
}
// OR: update all views
- // pqApplicationCore::instance()->render();
+ // pqPVApplicationCore::instance()->render();
}
void pqFoamReaderControls::showGroupsOnly(bool checked)
{
- showGroupsOnly_->SetElement(0, checked);
- updatePartsStatus();
+ fireCommand(showGroupsOnly_, checked);
+ updateParts();
}
void pqFoamReaderControls::includeSets(bool checked)
{
- includeSets_->SetElement(0, checked);
- updatePartsStatus();
+ fireCommand(includeSets_, checked);
+ updateParts();
}
void pqFoamReaderControls::includeZones(bool checked)
{
- includeZones_->SetElement(0, checked);
- updatePartsStatus();
+ fireCommand(includeZones_, checked);
+ updateParts();
}
@@ -178,7 +191,7 @@ pqFoamReaderControls::pqFoamReaderControls
)
:
Superclass(proxy, parent),
- refresh_(lookupIntProp(group, "Refresh")),
+ refresh_(group->GetProperty("Refresh")),
showPatchNames_(lookupIntProp(group, "ShowPatchNames")),
showGroupsOnly_(lookupIntProp(group, "ShowGroupsOnly")),
includeSets_(lookupIntProp(group, "IncludeSets")),
@@ -196,11 +209,10 @@ pqFoamReaderControls::pqFoamReaderControls
if (refresh_)
{
QPushButton* b = new QPushButton(this);
- setButtonProperties(b, refresh_, false);
+ setButtonProperties(b, refresh_);
form->addWidget(b, row, 0, Qt::AlignLeft);
connect(b, SIGNAL(clicked()), this, SLOT(refreshPressed()));
- refresh_->SetImmediateUpdate(true);
}
intProp* zeroTime = lookupIntProp(group, "ZeroTime");
@@ -233,9 +245,7 @@ pqFoamReaderControls::pqFoamReaderControls
form->addWidget(b, row, 0, Qt::AlignLeft);
addPropertyLink(b, "checked", SIGNAL(toggled(bool)), includeSets_);
-
connect(b, SIGNAL(toggled(bool)), this, SLOT(includeSets(bool)));
- includeSets_->SetImmediateUpdate(true);
}
if (showGroupsOnly_)
@@ -245,9 +255,7 @@ pqFoamReaderControls::pqFoamReaderControls
form->addWidget(b, row, 1, Qt::AlignLeft);
addPropertyLink(b, "checked", SIGNAL(toggled(bool)), showGroupsOnly_);
-
connect(b, SIGNAL(toggled(bool)), this, SLOT(showGroupsOnly(bool)));
- showGroupsOnly_->SetImmediateUpdate(true);
}
@@ -262,9 +270,7 @@ pqFoamReaderControls::pqFoamReaderControls
form->addWidget(b, row, 0, Qt::AlignLeft);
addPropertyLink(b, "checked", SIGNAL(toggled(bool)), includeZones_);
-
connect(b, SIGNAL(toggled(bool)), this, SLOT(includeZones(bool)));
- includeZones_->SetImmediateUpdate(true);
}
if (showPatchNames_)
@@ -274,7 +280,6 @@ pqFoamReaderControls::pqFoamReaderControls
form->addWidget(b, row, 1, Qt::AlignLeft);
connect(b, SIGNAL(toggled(bool)), this, SLOT(showPatchNames(bool)));
- showPatchNames_->SetImmediateUpdate(true);
}
// LINE
@@ -327,7 +332,7 @@ pqFoamReaderControls::pqFoamReaderControls
if (updateGui)
{
QPushButton* b = new QPushButton(this);
- setButtonProperties(b, updateGui, false);
+ setButtonProperties(b, updateGui);
form->addWidget(b, row, 0, Qt::AlignLeft);
addPropertyLink(b, "checked", SIGNAL(clicked()), updateGui);
@@ -350,7 +355,6 @@ pqFoamReaderControls::pqFoamReaderControls
form->addWidget(b, row, 2, Qt::AlignLeft);
connect(b, SIGNAL(toggled(bool)), this, SLOT(cacheMesh(bool)));
- cacheMesh_->SetImmediateUpdate(true);
}
}
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.h
index dd958f5e8c..fc3c8d4044 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/pqFoamReaderControls.h
@@ -37,6 +37,7 @@ SourceFiles
#include "pqPropertyWidget.h"
// Forward declarations
+class vtkSMProperty;
class vtkSMIntVectorProperty;
@@ -53,8 +54,8 @@ class pqFoamReaderControls
// Private data
- //- Refresh (bool property - as push button)
- vtkSMIntVectorProperty* refresh_;
+ //- Refresh (push button)
+ vtkSMProperty* refresh_;
//- Show Patch Names (bool property)
vtkSMIntVectorProperty* showPatchNames_;
@@ -72,15 +73,28 @@ class pqFoamReaderControls
vtkSMIntVectorProperty* cacheMesh_;
+ // Private Member Functions
+
+ //- Update property
+ void fireCommand(vtkSMProperty* prop);
+
+ //- Toggle and update bool property
+ void fireCommand(vtkSMIntVectorProperty* prop, bool checked);
+
+
+ //- Disallow default bitwise copy construct
+ pqFoamReaderControls(const pqFoamReaderControls&) = delete;
+
+ //- Disallow default bitwise assignment
+ void operator=(const pqFoamReaderControls&) = delete;
+
+
private slots:
// Private Member Functions
//- Update "PartArrayStatus" property information
- void updatePartsStatus();
-
- //- Update "PartArrayStatus" property information
- void updatePartsStatus(bool unused);
+ void updateParts();
protected slots:
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
index ecfffe09e2..46c01d92f7 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.cxx
@@ -80,7 +80,6 @@ vtkPVFoamReader::vtkPVFoamReader()
TimeStepRange[1] = 0;
CacheMesh = true;
- Refresh = false;
SkipZeroTime = false;
ExtrapolatePatches = false;
@@ -138,9 +137,11 @@ vtkPVFoamReader::~vtkPVFoamReader()
if (backend_)
{
- // remove patch names
+ // Remove text actors
updatePatchNamesView(false);
+
delete backend_;
+ backend_ = nullptr;
}
if (FileName)
@@ -202,13 +203,13 @@ int vtkPVFoamReader::RequestInformation
}
}
- if (!backend_)
+ if (backend_)
{
- backend_ = new Foam::vtkPVFoam(FileName, this);
+ backend_->updateInfo();
}
else
{
- backend_->updateInfo();
+ backend_ = new Foam::vtkPVFoam(FileName, this);
}
std::vector times = backend_->findTimes(this->SkipZeroTime);
@@ -450,7 +451,7 @@ void vtkPVFoamReader::PrintInfo()
}
-void vtkPVFoamReader::SetRefresh(bool val)
+void vtkPVFoamReader::Refresh()
{
Modified();
}
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
index 28a68445cd..c634f667fb 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/PVFoamReader/vtkPVFoamReader.h
@@ -88,7 +88,7 @@ public:
// Description:
// OpenFOAM refresh times/fields
- virtual void SetRefresh(bool);
+ virtual void Refresh();
// Description:
// OpenFOAM skip/include the 0/ time directory
@@ -231,7 +231,6 @@ private:
void updatePatchNamesView(const bool show);
int TimeStepRange[2];
- bool Refresh;
bool CacheMesh;
bool SkipZeroTime;
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
index 9ec5d92e71..2b7ab51888 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
@@ -45,6 +45,35 @@ namespace Foam
defineTypeNameAndDebug(vtkPVFoam, 0);
}
+
+// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
+
+vtkTextActor* Foam::vtkPVFoam::createTextActor
+(
+ const string& s,
+ const point& pt
+)
+{
+ vtkTextActor* txt = vtkTextActor::New();
+ txt->SetInput(s.c_str());
+
+ // Set text properties
+ vtkTextProperty* tprop = txt->GetTextProperty();
+ tprop->SetFontFamilyToArial();
+ tprop->BoldOn();
+ tprop->ShadowOff();
+ tprop->SetLineSpacing(1.0);
+ tprop->SetFontSize(14);
+ tprop->SetColor(1.0, 0.0, 1.0);
+ tprop->SetJustificationToCentered();
+
+ txt->GetPositionCoordinate()->SetCoordinateSystemToWorld();
+ txt->GetPositionCoordinate()->SetValue(pt.x(), pt.y(), pt.z());
+
+ return txt;
+}
+
+
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::vtkPVFoam::resetCounters()
@@ -606,11 +635,6 @@ void Foam::vtkPVFoam::renderPatchNames
const bool show
)
{
- if (!meshPtr_)
- {
- return;
- }
-
// always remove old actors first
forAll(patchTextActorsPtrs_, patchi)
@@ -620,7 +644,7 @@ void Foam::vtkPVFoam::renderPatchNames
}
patchTextActorsPtrs_.clear();
- if (show)
+ if (show && meshPtr_)
{
// get the display patches, strip off any suffix
hashedWordList selectedPatches = getSelected
@@ -737,17 +761,16 @@ void Foam::vtkPVFoam::renderPatchNames
{
const polyPatch& pp = pbMesh[patchi];
- label globalZoneI = 0;
-
// Only selected patches will have a non-zero number of zones
- label nDisplayZones = min(MAXPATCHZONES, nZones[patchi]);
+ const label nDisplayZones = min(MAXPATCHZONES, nZones[patchi]);
label increment = 1;
if (nZones[patchi] >= MAXPATCHZONES)
{
increment = nZones[patchi]/MAXPATCHZONES;
}
- for (label i = 0; i < nDisplayZones; i++)
+ label globalZoneI = 0;
+ for (label i = 0; i < nDisplayZones; ++i, globalZoneI += increment)
{
if (debug)
{
@@ -756,45 +779,24 @@ void Foam::vtkPVFoam::renderPatchNames
<< "globalZoneI = " << globalZoneI << endl;
}
- vtkTextActor* txt = vtkTextActor::New();
-
- txt->SetInput(pp.name().c_str());
-
- // Set text properties
- vtkTextProperty* tprop = txt->GetTextProperty();
- tprop->SetFontFamilyToArial();
- tprop->BoldOff();
- tprop->ShadowOff();
- tprop->SetLineSpacing(1.0);
- tprop->SetFontSize(14);
- tprop->SetColor(1.0, 0.0, 1.0);
- tprop->SetJustificationToCentered();
-
- // Set text to use 3-D world co-ordinates
- txt->GetPositionCoordinate()->SetCoordinateSystemToWorld();
-
- txt->GetPositionCoordinate()->SetValue
+ // Into a list for later removal
+ patchTextActorsPtrs_[displayZoneI++] = createTextActor
(
- zoneCentre[patchi][globalZoneI].x(),
- zoneCentre[patchi][globalZoneI].y(),
- zoneCentre[patchi][globalZoneI].z()
+ pp.name(),
+ zoneCentre[patchi][globalZoneI]
);
-
- // Add text to each renderer
- renderer->AddViewProp(txt);
-
- // Maintain a list of text labels added so that they can be
- // removed later
- patchTextActorsPtrs_[displayZoneI] = txt;
-
- globalZoneI += increment;
- displayZoneI++;
}
}
// Resize the patch names list to the actual number of patch names added
patchTextActorsPtrs_.setSize(displayZoneI);
}
+
+ // Add text to each renderer
+ forAll(patchTextActorsPtrs_, actori)
+ {
+ renderer->AddViewProp(patchTextActorsPtrs_[actori]);
+ }
}
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
index 17322e44c7..3f0a1ad55d 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.H
@@ -223,6 +223,9 @@ class vtkPVFoam
// Private Member Functions
+ //- Create a text actor
+ static vtkTextActor* createTextActor(const string& s, const point& pt);
+
//- Reset data counters
void resetCounters();
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader_SM.xml b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader_SM.xml
index e782c4371f..e0110552ee 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/PVblockMeshReader_SM.xml
@@ -14,20 +14,32 @@
The filename for the OpenFOAM blockMesh reader.
-
-
+
+ Rescan for updated blockMeshDict.
+
+
+
+
+
+
- Rescan for updated blockMeshDict.
+ Show patch names in render window.
Show point numbers in render window.
-
+
+
+
+
+
+
+
The list of curved edges
-
-
-
-
-
-
-
-
-
@@ -106,6 +111,12 @@
+
+
+
+
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.cxx
index 911ad83988..ab4a651706 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.cxx
@@ -29,7 +29,7 @@ License
#include
#include
-#include "pqApplicationCore.h"
+#include "pqPVApplicationCore.h"
#include "pqView.h"
#include "vtkSMDocumentation.h"
#include "vtkSMIntVectorProperty.h"
@@ -43,8 +43,7 @@ License
static QAbstractButton* setButtonProperties
(
QAbstractButton* b,
- vtkSMIntVectorProperty* prop,
- bool initChecked = true
+ vtkSMProperty* prop
)
{
QString tip;
@@ -66,10 +65,14 @@ static QAbstractButton* setButtonProperties
}
b->setFocusPolicy(Qt::NoFocus); // avoid dotted border
- // initial checked state
- if (initChecked)
+
+ vtkSMIntVectorProperty* intProp =
+ vtkSMIntVectorProperty::SafeDownCast(prop);
+
+ // initial checked state for integer (bool) properties
+ if (intProp)
{
- b->setChecked(prop->GetElement(0));
+ b->setChecked(intProp->GetElement(0));
}
return b;
@@ -93,23 +96,61 @@ static vtkSMIntVectorProperty* lookupIntProp
}
+// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
+
+void pqFoamBlockMeshControls::fireCommand(vtkSMProperty* prop)
+{
+ vtkSMProxy* pxy = this->proxy();
+
+ // Fire off command
+ prop->Modified();
+ pxy->UpdateProperty(pxy->GetPropertyName(prop));
+}
+
+
+void pqFoamBlockMeshControls::fireCommand
+(
+ vtkSMIntVectorProperty* prop,
+ bool checked
+)
+{
+ vtkSMProxy* pxy = this->proxy();
+
+ prop->SetElement(0, checked); // Toogle bool
+
+ // Fire off command
+ prop->Modified();
+ pxy->UpdateProperty(pxy->GetPropertyName(prop));
+}
+
+
+void pqFoamBlockMeshControls::updateParts()
+{
+ vtkSMProxy* pxy = this->proxy();
+
+ pxy->UpdatePropertyInformation(pxy->GetProperty("BlockArrayStatus"));
+ pxy->UpdatePropertyInformation(pxy->GetProperty("CurvedEdgesArrayStatus"));
+}
+
+
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void pqFoamBlockMeshControls::refreshPressed()
{
- // Update everything
- refresh_->Modified();
+ fireCommand(refresh_);
vtkSMSourceProxy::SafeDownCast(this->proxy())->UpdatePipeline();
- // Render all views
- pqApplicationCore::instance()->render();
+ // Trigger a rendering (all views)
+ pqPVApplicationCore::instance()->render();
+
+ updateParts();
}
-void pqFoamBlockMeshControls::showPointNumbers(bool checked)
+void pqFoamBlockMeshControls::showPatchNames(bool checked)
{
- showPointNumbers_->SetElement(0, checked);
+ fireCommand(showPatchNames_, checked);
// Update the active view
if (this->view())
@@ -118,7 +159,22 @@ void pqFoamBlockMeshControls::showPointNumbers(bool checked)
}
// OR: update all views
- // pqApplicationCore::instance()->render();
+ // pqPVApplicationCore::instance()->render();
+}
+
+
+void pqFoamBlockMeshControls::showPointNumbers(bool checked)
+{
+ fireCommand(showPointNumbers_, checked);
+
+ // Update the active view
+ if (this->view())
+ {
+ this->view()->render();
+ }
+
+ // OR: update all views
+ // pqPVApplicationCore::instance()->render();
}
@@ -132,7 +188,8 @@ pqFoamBlockMeshControls::pqFoamBlockMeshControls
)
:
Superclass(proxy, parent),
- refresh_(lookupIntProp(group, "Refresh")),
+ refresh_(group->GetProperty("Refresh")),
+ showPatchNames_(lookupIntProp(group, "ShowPatchNames")),
showPointNumbers_(lookupIntProp(group, "ShowPointNumbers"))
{
QGridLayout* form = new QGridLayout(this);
@@ -140,21 +197,28 @@ pqFoamBlockMeshControls::pqFoamBlockMeshControls
if (refresh_)
{
QPushButton* b = new QPushButton(this);
- setButtonProperties(b, refresh_, false);
+ setButtonProperties(b, refresh_);
form->addWidget(b, 0, 0, Qt::AlignLeft);
connect(b, SIGNAL(clicked()), this, SLOT(refreshPressed()));
- refresh_->SetImmediateUpdate(true);
+ }
+
+ if (showPatchNames_)
+ {
+ QCheckBox* b = new QCheckBox(this);
+ setButtonProperties(b, showPatchNames_);
+ form->addWidget(b, 0, 1, Qt::AlignLeft);
+
+ connect(b, SIGNAL(toggled(bool)), this, SLOT(showPatchNames(bool)));
}
if (showPointNumbers_)
{
QCheckBox* b = new QCheckBox(this);
setButtonProperties(b, showPointNumbers_);
- form->addWidget(b, 0, 1, Qt::AlignLeft);
+ form->addWidget(b, 0, 2, Qt::AlignLeft);
connect(b, SIGNAL(toggled(bool)), this, SLOT(showPointNumbers(bool)));
- showPointNumbers_->SetImmediateUpdate(true);
}
}
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.h b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.h
index 0ec7150d5c..a46cdc3052 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/pqFoamBlockMeshControls.h
@@ -27,7 +27,7 @@ Class
Description
Customized property controls for the ParaView blockMesh reader.
- Refresh and ShowPointNumbers.
+ Refresh, ShowPatchNames, ShowPointNumbers.
SourceFiles
pqFoamBlockMeshControls.cxx
@@ -39,6 +39,7 @@ SourceFiles
#include "pqPropertyWidget.h"
// Forward declarations (ParaView)
+class vtkSMProperty;
class vtkSMIntVectorProperty;
@@ -55,8 +56,11 @@ class pqFoamBlockMeshControls
// Private data
- //- Refresh (bool property - as push button)
- vtkSMIntVectorProperty* refresh_;
+ //- Refresh (push button)
+ vtkSMProperty* refresh_;
+
+ //- Show Patch Names (bool property)
+ vtkSMIntVectorProperty* showPatchNames_;
//- Show Point Numbers (bool property)
vtkSMIntVectorProperty* showPointNumbers_;
@@ -64,6 +68,16 @@ class pqFoamBlockMeshControls
// Private Member Functions
+ //- Update property
+ void fireCommand(vtkSMProperty* prop);
+
+ //- Toggle and update bool property
+ void fireCommand(vtkSMIntVectorProperty* prop, bool checked);
+
+ //- Update "BlockArrayStatus", "CurvedEdgesArrayStatus" information
+ void updateParts();
+
+
//- Disallow default bitwise copy construct
pqFoamBlockMeshControls(const pqFoamBlockMeshControls&) = delete;
@@ -78,6 +92,9 @@ protected slots:
//- Trigger refresh
void refreshPressed();
+ //- Sync property with changed checkbox state, update rendered view(s)
+ void showPatchNames(bool checked);
+
//- Sync property with changed checkbox state, update rendered view(s)
void showPointNumbers(bool checked);
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx
index 51f2fd8061..2c8c1ce453 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.cxx
@@ -59,6 +59,7 @@ vtkPVblockMeshReader::vtkPVblockMeshReader()
FileName = nullptr;
backend_ = nullptr;
+ ShowPatchNames = false;
ShowPointNumbers = true;
BlockSelection = vtkDataArraySelection::New();
@@ -95,9 +96,12 @@ vtkPVblockMeshReader::~vtkPVblockMeshReader()
if (backend_)
{
- // Remove point numbers
+ // Remove text actors
+ updatePatchNamesView(false);
updatePointNumbersView(false);
+
delete backend_;
+ backend_ = nullptr;
}
if (FileName)
@@ -110,6 +114,7 @@ vtkPVblockMeshReader::~vtkPVblockMeshReader()
SelectionObserver->Delete();
BlockSelection->Delete();
+ CurvedEdgesSelection->Delete();
}
@@ -124,35 +129,25 @@ int vtkPVblockMeshReader::RequestInformation
{
vtkDebugMacro(<<"RequestInformation");
- if (Foam::vtkPVblockMesh::debug)
- {
- cout<<"REQUEST_INFORMATION\n";
- }
-
if (!FileName)
{
vtkErrorMacro("FileName has to be specified!");
return 0;
}
- int nInfo = outputVector->GetNumberOfInformationObjects();
-
if (Foam::vtkPVblockMesh::debug)
{
- cout<<"RequestInformation with " << nInfo << " item(s)\n";
- for (int infoI = 0; infoI < nInfo; ++infoI)
- {
- outputVector->GetInformationObject(infoI)->Print(cout);
- }
+ cout<<"REQUEST_INFORMATION\n";
+ outputVector->GetInformationObject(0)->Print(cout);
}
- if (!backend_)
+ if (backend_)
{
- backend_ = new Foam::vtkPVblockMesh(FileName, this);
+ backend_->updateInfo();
}
else
{
- backend_->updateInfo();
+ backend_ = new Foam::vtkPVblockMesh(FileName, this);
}
return 1;
@@ -181,15 +176,10 @@ int vtkPVblockMeshReader::RequestData
return 0;
}
- int nInfo = outputVector->GetNumberOfInformationObjects();
-
if (Foam::vtkPVblockMesh::debug)
{
- cout<<"RequestData with " << nInfo << " item(s)\n";
- for (int infoI = 0; infoI < nInfo; ++infoI)
- {
- outputVector->GetInformationObject(infoI)->Print(cout);
- }
+ cout<<"REQUEST_DATA:\n";
+ outputVector->GetInformationObject(0)->Print(cout);
}
vtkMultiBlockDataSet* output = vtkMultiBlockDataSet::SafeDownCast
@@ -207,6 +197,8 @@ int vtkPVblockMeshReader::RequestData
}
backend_->Update(output);
+
+ updatePatchNamesView(ShowPatchNames);
updatePointNumbersView(ShowPointNumbers);
// Do any cleanup on the OpenFOAM side
@@ -216,17 +208,30 @@ int vtkPVblockMeshReader::RequestData
}
-void vtkPVblockMeshReader::SetRefresh(bool val)
+void vtkPVblockMeshReader::Refresh()
{
// Delete the current blockMesh to force re-read and update
if (backend_)
{
+ // Remove text actors
+ updatePatchNamesView(false);
updatePointNumbersView(false);
+
delete backend_;
backend_ = nullptr;
}
- Modified();
+ this->Modified();
+}
+
+
+void vtkPVblockMeshReader::SetShowPatchNames(bool val)
+{
+ if (ShowPatchNames != val)
+ {
+ ShowPatchNames = val;
+ updatePatchNamesView(ShowPatchNames);
+ }
}
@@ -240,6 +245,38 @@ void vtkPVblockMeshReader::SetShowPointNumbers(bool val)
}
+void vtkPVblockMeshReader::updatePatchNamesView(const bool show)
+{
+ pqApplicationCore* appCore = pqApplicationCore::instance();
+
+ // Need to check this, since our destructor calls this
+ if (!appCore)
+ {
+ return;
+ }
+
+ // Server manager model for querying items in the server manager
+ pqServerManagerModel* smModel = appCore->getServerManagerModel();
+ if (!smModel || !backend_)
+ {
+ return;
+ }
+
+ // Get all the pqRenderView instances
+ QList renderViews = smModel->findItems();
+ for (int viewI=0; viewIrenderPatchNames
+ (
+ renderViews[viewI]->getRenderViewProxy()->GetRenderer(),
+ show
+ );
+ }
+
+ // Use refresh here?
+}
+
+
void vtkPVblockMeshReader::updatePointNumbersView(const bool show)
{
pqApplicationCore* appCore = pqApplicationCore::instance();
@@ -257,7 +294,6 @@ void vtkPVblockMeshReader::updatePointNumbersView(const bool show)
return;
}
-
// Get all the pqRenderView instances
QList renderViews = smModel->findItems();
for (int viewI=0; viewIGetNumberOfArrays();
}
-
const char* vtkPVblockMeshReader::GetBlockArrayName(int index)
{
- vtkDebugMacro(<<"GetBlockArrayName");
return BlockSelection->GetArrayName(index);
}
-
int vtkPVblockMeshReader::GetBlockArrayStatus(const char* name)
{
- vtkDebugMacro(<<"GetBlockArrayStatus");
return BlockSelection->ArrayIsEnabled(name);
}
-
void vtkPVblockMeshReader::SetBlockArrayStatus
(
const char* name,
int status
)
{
- vtkDebugMacro(<<"SetBlockArrayStatus");
if (status)
{
BlockSelection->EnableArray(name);
@@ -339,39 +366,30 @@ void vtkPVblockMeshReader::SetBlockArrayStatus
vtkDataArraySelection* vtkPVblockMeshReader::GetCurvedEdgesSelection()
{
- vtkDebugMacro(<<"GetCurvedEdgesSelection");
return CurvedEdgesSelection;
}
-
int vtkPVblockMeshReader::GetNumberOfCurvedEdgesArrays()
{
- vtkDebugMacro(<<"GetNumberOfCurvedEdgesArrays");
return CurvedEdgesSelection->GetNumberOfArrays();
}
-
const char* vtkPVblockMeshReader::GetCurvedEdgesArrayName(int index)
{
- vtkDebugMacro(<<"GetCurvedEdgesArrayName");
return CurvedEdgesSelection->GetArrayName(index);
}
-
int vtkPVblockMeshReader::GetCurvedEdgesArrayStatus(const char* name)
{
- vtkDebugMacro(<<"GetCurvedEdgesArrayStatus");
return CurvedEdgesSelection->ArrayIsEnabled(name);
}
-
void vtkPVblockMeshReader::SetCurvedEdgesArrayStatus
(
const char* name,
int status
)
{
- vtkDebugMacro(<<"SetCurvedEdgesArrayStatus");
if (status)
{
CurvedEdgesSelection->EnableArray(name);
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.h b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.h
index 1cb24d7baf..66805716ee 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.h
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/vtkPVblockMeshReader.h
@@ -71,6 +71,11 @@ public:
vtkSetStringMacro(FileName);
vtkGetStringMacro(FileName);
+ // Description:
+ // Display patch names
+ virtual void SetShowPatchNames(bool);
+ vtkGetMacro(ShowPatchNames, bool);
+
// Description:
// Display corner point labels
virtual void SetShowPointNumbers(bool);
@@ -78,22 +83,22 @@ public:
// Description:
// Refresh blockMesh from changes to blockMeshDict
- virtual void SetRefresh(bool);
+ virtual void Refresh();
// Description:
// Blocks selection list control
vtkDataArraySelection* GetBlockSelection();
int GetNumberOfBlockArrays();
- int GetBlockArrayStatus(const char*);
- void SetBlockArrayStatus(const char*, int status);
+ int GetBlockArrayStatus(const char* name);
+ void SetBlockArrayStatus(const char* name, int status);
const char* GetBlockArrayName(int index);
// Description:
// CurvedEdges selection list control
vtkDataArraySelection* GetCurvedEdgesSelection();
int GetNumberOfCurvedEdgesArrays();
- int GetCurvedEdgesArrayStatus(const char*);
- void SetCurvedEdgesArrayStatus(const char*, int status);
+ int GetCurvedEdgesArrayStatus(const char* name);
+ void SetCurvedEdgesArrayStatus(const char* name, int status);
const char* GetCurvedEdgesArrayName(int index);
// Description:
@@ -119,17 +124,17 @@ protected:
//- Return information about mesh, times, etc without loading anything
virtual int RequestInformation
(
- vtkInformation*,
- vtkInformationVector**,
- vtkInformationVector*
+ vtkInformation* unusedRequest,
+ vtkInformationVector** unusedInputVector,
+ vtkInformationVector* outputVector
);
- //- Get the mesh/fields for a particular time
+ //- Get the mesh for a particular time
virtual int RequestData
(
- vtkInformation*,
- vtkInformationVector**,
- vtkInformationVector*
+ vtkInformation* unusedRequest,
+ vtkInformationVector** unusedInputVector,
+ vtkInformationVector* outputVector
);
//- Fill in additional port information
@@ -149,15 +154,20 @@ private:
//- Disallow default bitwise assignment
void operator=(const vtkPVblockMeshReader&) = delete;
+ //- Add/remove patch names to/from the view
+ void updatePatchNamesView(const bool show);
+
//- Add/remove point numbers to/from the view
void updatePointNumbersView(const bool show);
+ //- Show Patch Names
+ bool ShowPatchNames;
+
//- Show Point Numbers
bool ShowPointNumbers;
vtkDataArraySelection* BlockSelection;
-
vtkDataArraySelection* CurvedEdgesSelection;
//- Backend portion of the reader
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C
index 4dee4f8953..e64f031dec 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.C
@@ -28,6 +28,7 @@ License
// OpenFOAM includes
#include "blockMesh.H"
+#include "blockMeshTools.H"
#include "Time.H"
#include "patchZones.H"
#include "OStringStream.H"
@@ -47,6 +48,34 @@ namespace Foam
}
+// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
+
+vtkTextActor* Foam::vtkPVblockMesh::createTextActor
+(
+ const string& s,
+ const point& pt
+)
+{
+ vtkTextActor* txt = vtkTextActor::New();
+ txt->SetInput(s.c_str());
+
+ // Set text properties
+ vtkTextProperty* tprop = txt->GetTextProperty();
+ tprop->SetFontFamilyToArial();
+ tprop->BoldOn();
+ tprop->ShadowOff();
+ tprop->SetLineSpacing(1.0);
+ tprop->SetFontSize(14);
+ tprop->SetColor(1.0, 0.0, 1.0);
+ tprop->SetJustificationToCentered();
+
+ txt->GetPositionCoordinate()->SetCoordinateSystemToWorld();
+ txt->GetPositionCoordinate()->SetValue(pt.x(), pt.y(), pt.z());
+
+ return txt;
+}
+
+
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::vtkPVblockMesh::resetCounters()
@@ -60,7 +89,7 @@ void Foam::vtkPVblockMesh::resetCounters()
void Foam::vtkPVblockMesh::updateInfoBlocks
(
- vtkDataArraySelection* arraySelection
+ vtkDataArraySelection* select
)
{
arrayRange& range = arrayRangeBlocks_;
@@ -71,7 +100,7 @@ void Foam::vtkPVblockMesh::updateInfoBlocks
<< " [meshPtr=" << (meshPtr_ ? "set" : "null") << "]" << endl;
}
- range.reset(arraySelection->GetNumberOfArrays());
+ range.reset(select->GetNumberOfArrays());
const blockMesh& blkMesh = *meshPtr_;
@@ -92,7 +121,7 @@ void Foam::vtkPVblockMesh::updateInfoBlocks
}
// Add "blockId" or "blockId - zoneName" to GUI list
- arraySelection->AddArray(ostr.str().c_str());
+ select->AddArray(ostr.str().c_str());
}
range += nBlocks;
@@ -106,7 +135,7 @@ void Foam::vtkPVblockMesh::updateInfoBlocks
void Foam::vtkPVblockMesh::updateInfoEdges
(
- vtkDataArraySelection* arraySelection
+ vtkDataArraySelection* select
)
{
arrayRange& range = arrayRangeEdges_;
@@ -117,7 +146,7 @@ void Foam::vtkPVblockMesh::updateInfoEdges
<< " [meshPtr=" << (meshPtr_ ? "set" : "null") << "]" << endl;
}
- range.reset(arraySelection->GetNumberOfArrays());
+ range.reset(select->GetNumberOfArrays());
const blockMesh& blkMesh = *meshPtr_;
const blockEdgeList& edges = blkMesh.edges();
@@ -131,7 +160,7 @@ void Foam::vtkPVblockMesh::updateInfoEdges
ostr << " - " << edges[edgeI].type();
// Add "beg:end - type" to GUI list
- arraySelection->AddArray(ostr.str().c_str());
+ select->AddArray(ostr.str().c_str());
}
range += edges.size();
@@ -251,14 +280,6 @@ Foam::vtkPVblockMesh::~vtkPVblockMesh()
Info<< "~vtkPVblockMesh" << endl;
}
- // Hmm. pointNumberTextActors are not getting removed
- //
- forAll(pointNumberTextActorsPtrs_, pointi)
- {
- pointNumberTextActorsPtrs_[pointi]->Delete();
- }
- pointNumberTextActorsPtrs_.clear();
-
delete meshPtr_;
}
@@ -411,6 +432,103 @@ void Foam::vtkPVblockMesh::CleanUp()
}
+void Foam::vtkPVblockMesh::renderPatchNames
+(
+ vtkRenderer* renderer,
+ const bool show
+)
+{
+ // always remove old actors first
+ forAll(patchTextActorsPtrs_, actori)
+ {
+ renderer->RemoveViewProp(patchTextActorsPtrs_[actori]);
+ patchTextActorsPtrs_[actori]->Delete();
+ }
+ patchTextActorsPtrs_.clear();
+
+ // the number of text actors
+ label nActors = 0;
+
+ if (show && meshPtr_)
+ {
+ const blockMesh& blkMesh = *meshPtr_;
+ const dictionary& meshDescription = blkMesh.meshDict();
+ const pointField& cornerPts = blkMesh.vertices();
+ const scalar scaleFactor = blkMesh.scaleFactor();
+
+ if (!meshDescription.found("boundary"))
+ {
+ return;
+ }
+
+ // 8 sides per block is plenty
+ patchTextActorsPtrs_.setSize(8*blkMesh.size());
+
+ // Collect all variables
+ dictionary varDict(meshDescription.subOrEmptyDict("namedVertices"));
+ varDict.merge(meshDescription.subOrEmptyDict("namedBlocks"));
+
+ // Read like boundary file
+ const PtrList patchesInfo(meshDescription.lookup("boundary"));
+
+ forAll(patchesInfo, patchi)
+ {
+ const entry& patchInfo = patchesInfo[patchi];
+
+ if (!patchInfo.isDict())
+ {
+ IOWarningInFunction(meshDescription)
+ << "Entry " << patchInfo << " in boundary section is not a"
+ << " valid dictionary."
+ << endl;
+ break;
+ }
+
+ const word& patchName = patchInfo.keyword();
+
+ // Read block faces
+ faceList patchFaces = blockMeshTools::read
+ (
+ patchInfo.dict().lookup("faces"),
+ varDict
+ );
+
+ forAll(patchFaces, facei)
+ {
+ const face& f = patchFaces[facei];
+
+ // Into a list for later removal
+ patchTextActorsPtrs_[nActors++] = createTextActor
+ (
+ patchName,
+ f.centre(cornerPts) * scaleFactor
+ );
+
+ if (nActors == patchTextActorsPtrs_.size())
+ {
+ // hit max allocated space - bail out
+ break;
+ }
+ }
+
+ if (nActors == patchTextActorsPtrs_.size())
+ {
+ // hit max allocated space - bail out
+ break;
+ }
+ }
+
+ patchTextActorsPtrs_.setSize(nActors);
+ }
+
+ // Add text to each renderer
+ forAll(patchTextActorsPtrs_, actori)
+ {
+ renderer->AddViewProp(patchTextActorsPtrs_[actori]);
+ }
+}
+
+
void Foam::vtkPVblockMesh::renderPointNumbers
(
vtkRenderer* renderer,
@@ -419,12 +537,12 @@ void Foam::vtkPVblockMesh::renderPointNumbers
{
// always remove old actors first
- forAll(pointNumberTextActorsPtrs_, pointi)
+ forAll(pointTextActorsPtrs_, actori)
{
- renderer->RemoveViewProp(pointNumberTextActorsPtrs_[pointi]);
- pointNumberTextActorsPtrs_[pointi]->Delete();
+ renderer->RemoveViewProp(pointTextActorsPtrs_[actori]);
+ pointTextActorsPtrs_[actori]->Delete();
}
- pointNumberTextActorsPtrs_.clear();
+ pointTextActorsPtrs_.clear();
if (show && meshPtr_)
{
@@ -432,49 +550,29 @@ void Foam::vtkPVblockMesh::renderPointNumbers
const pointField& cornerPts = blkMesh.vertices();
const scalar scaleFactor = blkMesh.scaleFactor();
- pointNumberTextActorsPtrs_.setSize(cornerPts.size());
+ pointTextActorsPtrs_.setSize(cornerPts.size());
forAll(cornerPts, pointi)
{
- vtkTextActor* txt = vtkTextActor::New();
-
// Display either pointi as a number or with its name
// (looked up from blockMeshDict)
- {
- OStringStream os;
- blockVertex::write(os, pointi, blkMesh.meshDict());
- txt->SetInput(os.str().c_str());
- }
+ OStringStream os;
+ blockVertex::write(os, pointi, blkMesh.meshDict());
- // Set text properties
- vtkTextProperty* tprop = txt->GetTextProperty();
- tprop->SetFontFamilyToArial();
- tprop->BoldOn();
- tprop->ShadowOff();
- tprop->SetLineSpacing(1.0);
- tprop->SetFontSize(14);
- tprop->SetColor(1.0, 0.0, 1.0);
- tprop->SetJustificationToCentered();
-
- // Set text to use 3-D world co-ordinates
- txt->GetPositionCoordinate()->SetCoordinateSystemToWorld();
-
- txt->GetPositionCoordinate()->SetValue
+ // Into a list for later removal
+ pointTextActorsPtrs_[pointi] = createTextActor
(
- cornerPts[pointi].x()*scaleFactor,
- cornerPts[pointi].y()*scaleFactor,
- cornerPts[pointi].z()*scaleFactor
+ os.str(),
+ cornerPts[pointi]*scaleFactor
);
-
- // Add text to each renderer
- renderer->AddViewProp(txt);
-
- // Maintain a list of text labels added so that they can be
- // removed later
- pointNumberTextActorsPtrs_[pointi] = txt;
}
}
-}
+ // Add text to each renderer
+ forAll(pointTextActorsPtrs_, actori)
+ {
+ renderer->AddViewProp(pointTextActorsPtrs_[actori]);
+ }
+}
void Foam::vtkPVblockMesh::PrintSelf(ostream& os, vtkIndent indent) const
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.H b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.H
index e4e8c56c2c..a22316c84a 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.H
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/vtkPVblockMesh/vtkPVblockMesh.H
@@ -109,38 +109,38 @@ class vtkPVblockMesh
//- First instance and size of block corners (only partially used)
arrayRange arrayRangeCorners_;
+ //- List of patch names for rendering to window
+ List patchTextActorsPtrs_;
+
//- List of point numbers for rendering to window
- List pointNumberTextActorsPtrs_;
+ List pointTextActorsPtrs_;
// Private Member Functions
+ //- Create a text actor
+ static vtkTextActor* createTextActor(const string& s, const point& pt);
+
//- Reset data counters
void resetCounters();
- // Update information helper functions
+ //- OpenFOAM mesh
+ void updateFoamMesh();
- //- Internal block info
- void updateInfoBlocks(vtkDataArraySelection*);
+ //- Internal block info
+ void updateInfoBlocks(vtkDataArraySelection* select);
- //- Block curved edges info
- void updateInfoEdges(vtkDataArraySelection*);
+ //- Block curved edges info
+ void updateInfoEdges(vtkDataArraySelection* select);
- // Update helper functions
+ //- Mesh blocks
+ void convertMeshBlocks(vtkMultiBlockDataSet*, int& blockNo);
- //- OpenFOAM mesh
- void updateFoamMesh();
+ //- Mesh curved edges
+ void convertMeshEdges(vtkMultiBlockDataSet*, int& blockNo);
- // Mesh conversion functions
-
- //- Mesh blocks
- void convertMeshBlocks(vtkMultiBlockDataSet*, int& blockNo);
-
- //- Mesh curved edges
- void convertMeshEdges(vtkMultiBlockDataSet*, int& blockNo);
-
- //- Mesh corners
- void convertMeshCorners(vtkMultiBlockDataSet*, int& blockNo);
+ //- Mesh corners
+ void convertMeshCorners(vtkMultiBlockDataSet*, int& blockNo);
//- Disallow default bitwise copy construct
@@ -181,6 +181,9 @@ public:
//- Clean any storage
void CleanUp();
+ //- Add/remove patch names to/from the view
+ void renderPatchNames(vtkRenderer*, const bool show);
+
//- Add/remove point numbers to/from the view
void renderPointNumbers(vtkRenderer*, const bool show);