diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
index ef25ac0378..a78bceb7d5 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
@@ -106,7 +106,7 @@
animateable="0">
- A simple way cause a reader GUI modification.
+ A simple way to cause a reader GUI modification.
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
index 47e919c9c3..55964e9540 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
@@ -385,14 +385,7 @@ int vtkPV3FoamReader::RequestData
foamData_->Update(output, output);
#endif
- if (ShowPatchNames)
- {
- addPatchNamesToView();
- }
- else
- {
- removePatchNamesFromView();
- }
+ updatePatchNamesView(ShowPatchNames);
#endif
@@ -403,7 +396,7 @@ int vtkPV3FoamReader::RequestData
}
-void vtkPV3FoamReader::addPatchNamesToView()
+void vtkPV3FoamReader::updatePatchNamesView(const bool show)
{
pqApplicationCore* appCore = pqApplicationCore::instance();
@@ -415,29 +408,10 @@ void vtkPV3FoamReader::addPatchNamesToView()
for (int viewI=0; viewIaddPatchNames
+ foamData_->renderPatchNames
(
- renderViews[viewI]->getRenderViewProxy()->GetRenderer()
- );
- }
-}
-
-
-void vtkPV3FoamReader::removePatchNamesFromView()
-{
- pqApplicationCore* appCore = pqApplicationCore::instance();
-
- // Server manager model for querying items in the server manager
- pqServerManagerModel* smModel = appCore->getServerManagerModel();
-
- // Get all the pqRenderView instances
- QList renderViews = smModel->findItems();
-
- for (int viewI=0; viewIremovePatchNames
- (
- renderViews[viewI]->getRenderViewProxy()->GetRenderer()
+ renderViews[viewI]->getRenderViewProxy()->GetRenderer(),
+ show
);
}
}
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
index bc21cd8ce8..4a6eb3723e 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
@@ -174,11 +174,8 @@ private:
//- Disallow default bitwise assignment
void operator=(const vtkPV3FoamReader&);
- //- Add patch names to the view
- void addPatchNamesToView();
-
- //- Remove patch names from the view
- void removePatchNamesFromView();
+ //- Add/remove patch names to/from the view
+ void updatePatchNamesView(const bool show);
int TimeStepRange[2];
int CacheMesh;
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPoints.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H
similarity index 91%
rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPoints.H
rename to applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H
index adb4d724b0..6e90e75db0 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPoints.H
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H
@@ -27,15 +27,15 @@ InClass
\*---------------------------------------------------------------------------*/
-#ifndef vtkPV3FoamPoints_H
-#define vtkPV3FoamPoints_H
+#ifndef vtkOpenFOAMPoints_H
+#define vtkOpenFOAMPoints_H
// VTK includes
#include "vtkPoints.h"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-inline void vtkPV3FoamInsertNextPoint
+inline void vtkInsertNextOpenFOAMPoint
(
vtkPoints *points,
const Foam::point& p
@@ -46,7 +46,7 @@ inline void vtkPV3FoamInsertNextPoint
#if 0
// this should be faster, but didn't get it working ...
-inline void vtkPV3FoamSetPoint
+inline void vtkSetOpenFOAMPoint
(
vtkPoints *points,
const Foam::label id,
@@ -58,7 +58,7 @@ inline void vtkPV3FoamSetPoint
// Convert Foam mesh vertices to VTK
-inline vtkPoints* vtkPV3FoamVTKPoints(const Foam::pointField& points)
+inline vtkPoints* vtkSetOpenFOAMPoints(const Foam::pointField& points)
{
vtkPoints *vtkpoints = vtkPoints::New();
vtkpoints->SetNumberOfPoints(points.size());
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
index 34628ac9d1..6a5ab601fb 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
@@ -590,220 +590,204 @@ double* Foam::vtkPV3Foam::findTimes(int& nTimeSteps)
}
-void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
+void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
{
- // Remove any patch names previously added to the renderer
- removePatchNames(renderer);
+ // always remove old actors first
- // get the display patches, strip off any suffix
- wordHashSet selectedPatches = getSelected
- (
- reader_->GetPartSelection(),
- partInfoPatches_
- );
-
- if (!selectedPatches.size())
- {
- return;
- }
-
- if (debug)
- {
- Info<< " Foam::vtkPV3Foam::addPatchNames" << nl
- <<"... add patches: " << selectedPatches << endl;
- }
-
- const polyBoundaryMesh& pbMesh = meshPtr_->boundaryMesh();
-
- // Find the total number of zones
- // Each zone will take the patch name
- // Number of zones per patch ... zero zones should be skipped
- labelList nZones(pbMesh.size(), 0);
-
- // Per global zone number the average face centre position
- DynamicList zoneCentre(pbMesh.size());
-
- if (debug)
- {
- Info<< "... determining patch zones" << endl;
- }
-
- // Loop through all patches to determine zones, and centre of each zone
- forAll(pbMesh, patchI)
- {
- const polyPatch& pp = pbMesh[patchI];
-
- // Only include the patch if it is selected
- if (!selectedPatches.found(pp.name()))
- {
- continue;
- }
-
- const labelListList& edgeFaces = pp.edgeFaces();
- const vectorField& n = pp.faceNormals();
-
- boolList featEdge(pp.nEdges(), false);
-
- forAll(edgeFaces, edgeI)
- {
- const labelList& eFaces = edgeFaces[edgeI];
-
- if (eFaces.size() == 1)
- {
- // Note: could also do ones with > 2 faces but this gives
- // too many zones for baffles
- featEdge[edgeI] = true;
- }
- else if (mag(n[eFaces[0]] & n[eFaces[1]]) < 0.5)
- {
- featEdge[edgeI] = true;
- }
- }
-
- // Do topological analysis of patch, find disconnected regions
- patchZones pZones(pp, featEdge);
-
- nZones[patchI] = pZones.nZones();
-
- labelList zoneNFaces(pZones.nZones(), 0);
-
- // Save start of information for current patch
- label patchStart = zoneCentre.size();
-
- // Create storage for additional zone centres
- forAll(zoneNFaces, zoneI)
- {
- zoneCentre.append(vector::zero);
- }
-
- // Do averaging per individual zone
- forAll(pp, faceI)
- {
- label zoneI = pZones[faceI];
- zoneCentre[patchStart+zoneI] += pp[faceI].centre(pp.points());
- zoneNFaces[zoneI]++;
- }
-
- for (label i=0; i= MAXPATCHZONES)
- {
- increment = nZones[patchI]/MAXPATCHZONES;
- }
-
- for (label i = 0; i < nDisplayZones; i++)
- {
- if (debug)
- {
- Info<< "patch name = " << pp.name() << nl
- << "anchor = " << zoneCentre[globalZoneI] << nl
- << "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(12);
- tprop->SetColor(1.0, 0.0, 0.0);
- tprop->SetJustificationToCentered();
-
- // Set text to use 3-D world co-ordinates
- txt->GetPositionCoordinate()->SetCoordinateSystemToWorld();
-
- txt->GetPositionCoordinate()->SetValue
- (
- zoneCentre[globalZoneI].x(),
- zoneCentre[globalZoneI].y(),
- zoneCentre[globalZoneI].z()
- );
-
- // 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);
-
- if (debug)
- {
- Info<< " Foam::vtkPV3Foam::addPatchNames" << endl;
- }
-}
-
-
-void Foam::vtkPV3Foam::removePatchNames(vtkRenderer* renderer)
-{
forAll(patchTextActorsPtrs_, patchI)
{
renderer->RemoveViewProp(patchTextActorsPtrs_[patchI]);
patchTextActorsPtrs_[patchI]->Delete();
}
patchTextActorsPtrs_.clear();
+
+ if (show)
+ {
+ // get the display patches, strip off any suffix
+ wordHashSet selectedPatches = getSelected
+ (
+ reader_->GetPartSelection(),
+ partInfoPatches_
+ );
+
+ if (!selectedPatches.size())
+ {
+ return;
+ }
+
+ const polyBoundaryMesh& pbMesh = meshPtr_->boundaryMesh();
+
+ // Find the total number of zones
+ // Each zone will take the patch name
+ // Number of zones per patch ... zero zones should be skipped
+ labelList nZones(pbMesh.size(), 0);
+
+ // Per global zone number the average face centre position
+ DynamicList zoneCentre(pbMesh.size());
+
+
+ // Loop through all patches to determine zones, and centre of each zone
+ forAll(pbMesh, patchI)
+ {
+ const polyPatch& pp = pbMesh[patchI];
+
+ // Only include the patch if it is selected
+ if (!selectedPatches.found(pp.name()))
+ {
+ continue;
+ }
+
+ const labelListList& edgeFaces = pp.edgeFaces();
+ const vectorField& n = pp.faceNormals();
+
+ boolList featEdge(pp.nEdges(), false);
+
+ forAll(edgeFaces, edgeI)
+ {
+ const labelList& eFaces = edgeFaces[edgeI];
+
+ if (eFaces.size() == 1)
+ {
+ // Note: could also do ones with > 2 faces but this gives
+ // too many zones for baffles
+ featEdge[edgeI] = true;
+ }
+ else if (mag(n[eFaces[0]] & n[eFaces[1]]) < 0.5)
+ {
+ featEdge[edgeI] = true;
+ }
+ }
+
+ // Do topological analysis of patch, find disconnected regions
+ patchZones pZones(pp, featEdge);
+
+ nZones[patchI] = pZones.nZones();
+
+ labelList zoneNFaces(pZones.nZones(), 0);
+
+ // Save start of information for current patch
+ label patchStart = zoneCentre.size();
+
+ // Create storage for additional zone centres
+ forAll(zoneNFaces, zoneI)
+ {
+ zoneCentre.append(vector::zero);
+ }
+
+ // Do averaging per individual zone
+ forAll(pp, faceI)
+ {
+ label zoneI = pZones[faceI];
+ zoneCentre[patchStart+zoneI] += pp[faceI].centre(pp.points());
+ zoneNFaces[zoneI]++;
+ }
+
+ for (label i=0; i= MAXPATCHZONES)
+ {
+ increment = nZones[patchI]/MAXPATCHZONES;
+ }
+
+ for (label i = 0; i < nDisplayZones; i++)
+ {
+ if (debug)
+ {
+ Info<< "patch name = " << pp.name() << nl
+ << "anchor = " << zoneCentre[globalZoneI] << nl
+ << "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(12);
+ tprop->SetColor(1.0, 0.0, 0.0);
+ tprop->SetJustificationToCentered();
+
+ // Set text to use 3-D world co-ordinates
+ txt->GetPositionCoordinate()->SetCoordinateSystemToWorld();
+
+ txt->GetPositionCoordinate()->SetValue
+ (
+ zoneCentre[globalZoneI].x(),
+ zoneCentre[globalZoneI].y(),
+ zoneCentre[globalZoneI].z()
+ );
+
+ // 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);
+ }
}
+
void Foam::vtkPV3Foam::PrintSelf(ostream& os, vtkIndent indent) const
{
os << indent << "Number of nodes: "
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
index 4e203eacec..d56b62d7d1 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H
@@ -31,7 +31,6 @@ Description
SourceFiles
vtkPV3Foam.C
vtkPV3Foam.H
- vtkPV3FoamI.H
vtkPV3FoamFields.C
vtkPV3FoamMesh.C
vtkPV3FoamMeshLagrangian.C
@@ -627,9 +626,6 @@ class vtkPV3Foam
// GUI selection helper functions
- //- Extract up to the first non-word characters
- inline static word getFirstWord(const char*);
-
//- Only keep what is listed in hashSet
static void pruneObjectList
(
@@ -715,11 +711,8 @@ public:
// returns the count via the parameter
double* findTimes(int& nTimeSteps);
- //- Add patch names to the display
- void addPatchNames(vtkRenderer* renderer);
-
- //- Remove patch names from the display
- void removePatchNames(vtkRenderer* renderer);
+ //- Add/remove patch names to/from the view
+ void renderPatchNames(vtkRenderer*, const bool show);
//- set the runTime to the first plausible request time,
// returns the timeIndex
@@ -751,8 +744,6 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-# include "vtkPV3FoamI.H"
-
#endif
// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamI.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamI.H
deleted file mode 100644
index 626c90a7a4..0000000000
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamI.H
+++ /dev/null
@@ -1,48 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2 of the License, or (at your
- option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-\*---------------------------------------------------------------------------*/
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
-
-inline Foam::word Foam::vtkPV3Foam::getFirstWord(const char* str)
-{
- if (str)
- {
- label n = 0;
- while (str[n] && word::valid(str[n]))
- {
- ++n;
- }
- return word(str, n, true);
- }
- else
- {
- return word::null;
- }
-}
-
-// ************************************************************************* //
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C
index 07d322d542..e653b05adb 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C
@@ -33,7 +33,7 @@ Description
#include "fvMesh.H"
#include "IOobjectList.H"
#include "passiveParticle.H"
-#include "vtkPV3FoamPoints.H"
+#include "vtkOpenFOAMPoints.H"
// VTK includes
#include "vtkCellArray.h"
@@ -86,7 +86,7 @@ vtkPolyData* Foam::vtkPV3Foam::lagrangianVTKMesh
vtkIdType particleId = 0;
forAllConstIter(Cloud, parcels, iter)
{
- vtkPV3FoamInsertNextPoint(vtkpoints, iter().position());
+ vtkInsertNextOpenFOAMPoint(vtkpoints, iter().position());
vtkcells->InsertNextCell(1, &particleId);
particleId++;
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C
index 29e8d07020..d7c0f2f013 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C
@@ -31,7 +31,7 @@ Description
// Foam includes
#include "polyPatch.H"
#include "primitivePatch.H"
-#include "vtkPV3FoamPoints.H"
+#include "vtkOpenFOAMPoints.H"
// VTK includes
#include "vtkCellArray.h"
@@ -60,7 +60,7 @@ vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh
vtkpoints->Allocate( points.size() );
forAll(points, i)
{
- vtkPV3FoamInsertNextPoint(vtkpoints, points[i]);
+ vtkInsertNextOpenFOAMPoint(vtkpoints, points[i]);
}
vtkmesh->SetPoints(vtkpoints);
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C
index 7f08a215a3..f363beae45 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C
@@ -31,7 +31,7 @@ Description
// Foam includes
#include "faceSet.H"
#include "pointSet.H"
-#include "vtkPV3FoamPoints.H"
+#include "vtkOpenFOAMPoints.H"
// VTK includes
#include "vtkPoints.h"
@@ -75,7 +75,7 @@ vtkPolyData* Foam::vtkPV3Foam::faceSetVTKMesh
vtkpoints->Allocate( points.size() );
forAll(points, i)
{
- vtkPV3FoamInsertNextPoint(vtkpoints, points[i]);
+ vtkInsertNextOpenFOAMPoint(vtkpoints, points[i]);
}
vtkmesh->SetPoints(vtkpoints);
vtkpoints->Delete();
@@ -132,7 +132,7 @@ vtkPolyData* Foam::vtkPV3Foam::pointSetVTKMesh
forAllConstIter(pointSet, pSet, iter)
{
- vtkPV3FoamInsertNextPoint(vtkpoints, meshPoints[iter.key()]);
+ vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[iter.key()]);
}
vtkmesh->SetPoints(vtkpoints);
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C
index 49f9016dc1..e1fd59ccd0 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C
@@ -31,7 +31,7 @@ Description
// Foam includes
#include "fvMesh.H"
#include "cellModeller.H"
-#include "vtkPV3FoamPoints.H"
+#include "vtkOpenFOAMPoints.H"
// VTK includes
#include "vtkCellArray.h"
@@ -143,7 +143,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
forAll(points, i)
{
- vtkPV3FoamInsertNextPoint(vtkpoints, points[i]);
+ vtkInsertNextOpenFOAMPoint(vtkpoints, points[i]);
}
@@ -267,7 +267,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
// Insert the new vertex from the cell-centre
label newVertexLabel = mesh.nPoints() + addPointI;
- vtkPV3FoamInsertNextPoint(vtkpoints, mesh.C()[cellI]);
+ vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[cellI]);
// Whether to insert cell in place of original or not.
bool substituteCell = true;
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
index 14c5da92c2..0a21310a63 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C
@@ -29,7 +29,7 @@ Description
#include "vtkPV3Foam.H"
// Foam includes
-#include "vtkPV3FoamPoints.H"
+#include "vtkOpenFOAMPoints.H"
// VTK includes
#include "vtkPoints.h"
@@ -72,7 +72,7 @@ vtkPolyData* Foam::vtkPV3Foam::faceZoneVTKMesh
vtkpoints->Allocate( points.size() );
forAll(points, i)
{
- vtkPV3FoamInsertNextPoint(vtkpoints, points[i]);
+ vtkInsertNextOpenFOAMPoint(vtkpoints, points[i]);
}
vtkmesh->SetPoints(vtkpoints);
@@ -131,7 +131,7 @@ vtkPolyData* Foam::vtkPV3Foam::pointZoneVTKMesh
forAll(pointLabels, pointI)
{
- vtkPV3FoamInsertNextPoint(vtkpoints, meshPoints[pointLabels[pointI]]);
+ vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[pointLabels[pointI]]);
}
vtkmesh->SetPoints(vtkpoints);
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtilities.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtilities.C
index aff0ea4eec..3e38b30162 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtilities.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtilities.C
@@ -41,6 +41,34 @@ Description
#include "vtkMultiBlockDataSet.h"
#include "vtkInformation.h"
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+ //! @cond fileScope
+ // Extract up to the first non-word characters
+ inline word getFirstWord(const char* str)
+ {
+ if (str)
+ {
+ label n = 0;
+ while (str[n] && word::valid(str[n]))
+ {
+ ++n;
+ }
+ return word(str, n, true);
+ }
+ else
+ {
+ return word::null;
+ }
+
+ }
+ //! @endcond fileScope
+
+} // End namespace Foam
+
+
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::vtkPV3Foam::AddToBlock