diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
index 644b794a44..ef25ac0378 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
@@ -30,16 +30,16 @@
-
+
- Extrapolate internalField to wall and empty patches
+ Extrapolate internalField to non-constraint patches
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
index 8fc518d745..c16a43deae 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
@@ -64,7 +64,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
CacheMesh = 1;
- ExtrapolateWalls = 0;
+ ExtrapolatePatches = 0;
IncludeSets = 0;
IncludeZones = 0;
ShowPatchNames = 0;
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
index fde87527de..bc21cd8ce8 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h
@@ -65,9 +65,9 @@ public:
vtkGetMacro(CacheMesh, int);
// Description:
- // FOAM extrapolate internal values onto the walls
- vtkSetMacro(ExtrapolateWalls, int);
- vtkGetMacro(ExtrapolateWalls, int);
+ // FOAM extrapolate internal values onto the patches
+ vtkSetMacro(ExtrapolatePatches, int);
+ vtkGetMacro(ExtrapolatePatches, int);
// FOAM read sets control
vtkSetMacro(IncludeSets, int);
@@ -183,7 +183,7 @@ private:
int TimeStepRange[2];
int CacheMesh;
- int ExtrapolateWalls;
+ int ExtrapolatePatches;
int IncludeSets;
int IncludeZones;
int ShowPatchNames;
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
index 7a8fd89e9e..0ed3d53185 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
@@ -659,29 +659,55 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
}
}
+ // Count number of zones we're actually going to display. This is truncated
+ // to a max per patch
+
+ const label MAXPATCHZONES = 20;
+
+ label displayZoneI = 0;
+
+ forAll(pbMesh, patchI)
+ {
+ displayZoneI += min(MAXPATCHZONES, nZones[patchI]);
+ }
+
+
zoneCentre.shrink();
if (debug)
{
Info<< "patch zone centres = " << zoneCentre << nl
+ << "displayed zone centres = " << displayZoneI << nl
<< "zones per patch = " << nZones << endl;
}
// Set the size of the patch labels to max number of zones
- patchTextActorsPtrs_.setSize(zoneCentre.size());
+ patchTextActorsPtrs_.setSize(displayZoneI);
if (debug)
{
Info<< "constructing patch labels" << endl;
}
+ // Actor index
+ displayZoneI = 0;
+
+ // Index in zone centres
label globalZoneI = 0;
+
forAll(pbMesh, patchI)
{
const polyPatch& pp = pbMesh[patchI];
// Only selected patches will have a non-zero number of zones
- for (label i=0; i= MAXPATCHZONES)
+ {
+ increment = nZones[patchI]/MAXPATCHZONES;
+ }
+
+ for (label i = 0; i < nDisplayZones; i++)
{
if (debug)
{
@@ -719,14 +745,15 @@ void Foam::vtkPV3Foam::addPatchNames(vtkRenderer* renderer)
// Maintain a list of text labels added so that they can be
// removed later
- patchTextActorsPtrs_[globalZoneI] = txt;
+ patchTextActorsPtrs_[displayZoneI] = txt;
- globalZoneI++;
+ globalZoneI += increment;
+ displayZoneI++;
}
}
// Resize the patch names list to the actual number of patch names added
- patchTextActorsPtrs_.setSize(globalZoneI);
+ patchTextActorsPtrs_.setSize(displayZoneI);
if (debug)
{
diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
index f217d1a889..6c8d32f470 100644
--- a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
+++ b/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H
@@ -132,8 +132,8 @@ void Foam::vtkPV3Foam::convertVolFields
isType >(ptf)
||
(
- typeid(patches[patchId]) == typeid(wallPolyPatch)
- && reader_->GetExtrapolateWalls()
+ reader_->GetExtrapolatePatches()
+ && !polyPatch::constraintType(patches[patchId].type())
)
)
{