Commit 7620f654 authored by Henry Weller's avatar Henry Weller
Browse files

boundaryField() -> boundaryFieldRef()

parent 139317a0
......@@ -636,10 +636,10 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
// always remove old actors first
forAll(patchTextActorsPtrs_, patchI)
forAll(patchTextActorsPtrs_, patchi)
{
renderer->RemoveViewProp(patchTextActorsPtrs_[patchI]);
patchTextActorsPtrs_[patchI]->Delete();
renderer->RemoveViewProp(patchTextActorsPtrs_[patchi]);
patchTextActorsPtrs_[patchi]->Delete();
}
patchTextActorsPtrs_.clear();
......@@ -669,9 +669,9 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
// Loop through all patches to determine zones, and centre of each zone
forAll(pbMesh, patchI)
forAll(pbMesh, patchi)
{
const polyPatch& pp = pbMesh[patchI];
const polyPatch& pp = pbMesh[patchi];
// Only include the patch if it is selected
if (!selectedPatches.found(pp.name()))
......@@ -703,27 +703,27 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
// Do topological analysis of patch, find disconnected regions
patchZones pZones(pp, featEdge);
nZones[patchI] = pZones.nZones();
nZones[patchi] = pZones.nZones();
labelList zoneNFaces(pZones.nZones(), 0);
// Create storage for additional zone centres
forAll(zoneNFaces, zoneI)
{
zoneCentre[patchI].append(Zero);
zoneCentre[patchi].append(Zero);
}
// Do averaging per individual zone
forAll(pp, faceI)
{
label zoneI = pZones[faceI];
zoneCentre[patchI][zoneI] += pp[faceI].centre(pp.points());
zoneCentre[patchi][zoneI] += pp[faceI].centre(pp.points());
zoneNFaces[zoneI]++;
}
forAll(zoneCentre[patchI], zoneI)
forAll(zoneCentre[patchi], zoneI)
{
zoneCentre[patchI][zoneI] /= zoneNFaces[zoneI];
zoneCentre[patchi][zoneI] /= zoneNFaces[zoneI];
}
}
......@@ -734,9 +734,9 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
label displayZoneI = 0;
forAll(pbMesh, patchI)
forAll(pbMesh, patchi)
{
displayZoneI += min(MAXPATCHZONES, nZones[patchI]);
displayZoneI += min(MAXPATCHZONES, nZones[patchi]);
}
if (debug)
......@@ -756,18 +756,18 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
// Actor index
displayZoneI = 0;
forAll(pbMesh, patchI)
forAll(pbMesh, patchi)
{
const polyPatch& pp = pbMesh[patchI];
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]);
label nDisplayZones = min(MAXPATCHZONES, nZones[patchi]);
label increment = 1;
if (nZones[patchI] >= MAXPATCHZONES)
if (nZones[patchi] >= MAXPATCHZONES)
{
increment = nZones[patchI]/MAXPATCHZONES;
increment = nZones[patchi]/MAXPATCHZONES;
}
for (label i = 0; i < nDisplayZones; i++)
......@@ -775,7 +775,7 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
if (debug)
{
Info<< "patch name = " << pp.name() << nl
<< "anchor = " << zoneCentre[patchI][globalZoneI] << nl
<< "anchor = " << zoneCentre[patchi][globalZoneI] << nl
<< "globalZoneI = " << globalZoneI << endl;
}
......@@ -798,9 +798,9 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
txt->GetPositionCoordinate()->SetValue
(
zoneCentre[patchI][globalZoneI].x(),
zoneCentre[patchI][globalZoneI].y(),
zoneCentre[patchI][globalZoneI].z()
zoneCentre[patchi][globalZoneI].x(),
zoneCentre[patchi][globalZoneI].y(),
zoneCentre[patchi][globalZoneI].z()
);
// Add text to each renderer
......
......@@ -295,9 +295,9 @@ void Foam::vtkPV3Foam::updateInfoPatches
if (!reader_->GetShowGroupsOnly())
{
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if (pp.size())
{
......@@ -344,12 +344,12 @@ void Foam::vtkPV3Foam::updateInfoPatches
wordList names(patchEntries.size());
labelList sizes(patchEntries.size());
forAll(patchEntries, patchI)
forAll(patchEntries, patchi)
{
const dictionary& patchDict = patchEntries[patchI].dict();
const dictionary& patchDict = patchEntries[patchi].dict();
sizes[patchI] = readLabel(patchDict.lookup("nFaces"));
names[patchI] = patchEntries[patchI].keyword();
sizes[patchi] = readLabel(patchDict.lookup("nFaces"));
names[patchi] = patchEntries[patchi].keyword();
}
......@@ -358,9 +358,9 @@ void Foam::vtkPV3Foam::updateInfoPatches
HashTable<labelList, word> groups(patchEntries.size());
forAll(patchEntries, patchI)
forAll(patchEntries, patchi)
{
const dictionary& patchDict = patchEntries[patchI].dict();
const dictionary& patchDict = patchEntries[patchi].dict();
wordList groupNames;
patchDict.readIfPresent("inGroups", groupNames);
......@@ -373,11 +373,11 @@ void Foam::vtkPV3Foam::updateInfoPatches
);
if (iter != groups.end())
{
iter().append(patchI);
iter().append(patchi);
}
else
{
groups.insert(groupNames[groupI], labelList(1, patchI));
groups.insert(groupNames[groupI], labelList(1, patchi));
}
}
}
......@@ -432,14 +432,14 @@ void Foam::vtkPV3Foam::updateInfoPatches
if (!reader_->GetShowGroupsOnly())
{
forAll(names, patchI)
forAll(names, patchi)
{
// Valid patch if nFace > 0 - add patch to GUI list
if (sizes[patchI])
if (sizes[patchi])
{
arraySelection->AddArray
(
(names[patchI] + " - patch").c_str()
(names[patchi] + " - patch").c_str()
);
++nPatches;
......
......@@ -640,10 +640,10 @@ void Foam::vtkPVFoam::renderPatchNames
// always remove old actors first
forAll(patchTextActorsPtrs_, patchI)
forAll(patchTextActorsPtrs_, patchi)
{
renderer->RemoveViewProp(patchTextActorsPtrs_[patchI]);
patchTextActorsPtrs_[patchI]->Delete();
renderer->RemoveViewProp(patchTextActorsPtrs_[patchi]);
patchTextActorsPtrs_[patchi]->Delete();
}
patchTextActorsPtrs_.clear();
......@@ -673,9 +673,9 @@ void Foam::vtkPVFoam::renderPatchNames
// Loop through all patches to determine zones, and centre of each zone
forAll(pbMesh, patchI)
forAll(pbMesh, patchi)
{
const polyPatch& pp = pbMesh[patchI];
const polyPatch& pp = pbMesh[patchi];
// Only include the patch if it is selected
if (!selectedPatches.found(pp.name()))
......@@ -707,27 +707,27 @@ void Foam::vtkPVFoam::renderPatchNames
// Do topological analysis of patch, find disconnected regions
patchZones pZones(pp, featEdge);
nZones[patchI] = pZones.nZones();
nZones[patchi] = pZones.nZones();
labelList zoneNFaces(pZones.nZones(), 0);
// Create storage for additional zone centres
forAll(zoneNFaces, zoneI)
{
zoneCentre[patchI].append(Zero);
zoneCentre[patchi].append(Zero);
}
// Do averaging per individual zone
forAll(pp, faceI)
{
label zoneI = pZones[faceI];
zoneCentre[patchI][zoneI] += pp[faceI].centre(pp.points());
zoneCentre[patchi][zoneI] += pp[faceI].centre(pp.points());
zoneNFaces[zoneI]++;
}
forAll(zoneCentre[patchI], zoneI)
forAll(zoneCentre[patchi], zoneI)
{
zoneCentre[patchI][zoneI] /= zoneNFaces[zoneI];
zoneCentre[patchi][zoneI] /= zoneNFaces[zoneI];
}
}
......@@ -738,9 +738,9 @@ void Foam::vtkPVFoam::renderPatchNames
label displayZoneI = 0;
forAll(pbMesh, patchI)
forAll(pbMesh, patchi)
{
displayZoneI += min(MAXPATCHZONES, nZones[patchI]);
displayZoneI += min(MAXPATCHZONES, nZones[patchi]);
}
if (debug)
......@@ -760,18 +760,18 @@ void Foam::vtkPVFoam::renderPatchNames
// Actor index
displayZoneI = 0;
forAll(pbMesh, patchI)
forAll(pbMesh, patchi)
{
const polyPatch& pp = pbMesh[patchI];
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]);
label nDisplayZones = min(MAXPATCHZONES, nZones[patchi]);
label increment = 1;
if (nZones[patchI] >= MAXPATCHZONES)
if (nZones[patchi] >= MAXPATCHZONES)
{
increment = nZones[patchI]/MAXPATCHZONES;
increment = nZones[patchi]/MAXPATCHZONES;
}
for (label i = 0; i < nDisplayZones; i++)
......@@ -779,7 +779,7 @@ void Foam::vtkPVFoam::renderPatchNames
if (debug)
{
Info<< "patch name = " << pp.name() << nl
<< "anchor = " << zoneCentre[patchI][globalZoneI] << nl
<< "anchor = " << zoneCentre[patchi][globalZoneI] << nl
<< "globalZoneI = " << globalZoneI << endl;
}
......@@ -802,9 +802,9 @@ void Foam::vtkPVFoam::renderPatchNames
txt->GetPositionCoordinate()->SetValue
(
zoneCentre[patchI][globalZoneI].x(),
zoneCentre[patchI][globalZoneI].y(),
zoneCentre[patchI][globalZoneI].z()
zoneCentre[patchi][globalZoneI].x(),
zoneCentre[patchi][globalZoneI].y(),
zoneCentre[patchi][globalZoneI].z()
);
// Add text to each renderer
......
......@@ -295,9 +295,9 @@ void Foam::vtkPVFoam::updateInfoPatches
if (!reader_->GetShowGroupsOnly())
{
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if (pp.size())
{
......@@ -344,12 +344,12 @@ void Foam::vtkPVFoam::updateInfoPatches
wordList names(patchEntries.size());
labelList sizes(patchEntries.size());
forAll(patchEntries, patchI)
forAll(patchEntries, patchi)
{
const dictionary& patchDict = patchEntries[patchI].dict();
const dictionary& patchDict = patchEntries[patchi].dict();
sizes[patchI] = readLabel(patchDict.lookup("nFaces"));
names[patchI] = patchEntries[patchI].keyword();
sizes[patchi] = readLabel(patchDict.lookup("nFaces"));
names[patchi] = patchEntries[patchi].keyword();
}
......@@ -358,9 +358,9 @@ void Foam::vtkPVFoam::updateInfoPatches
HashTable<labelList, word> groups(patchEntries.size());
forAll(patchEntries, patchI)
forAll(patchEntries, patchi)
{
const dictionary& patchDict = patchEntries[patchI].dict();
const dictionary& patchDict = patchEntries[patchi].dict();
wordList groupNames;
patchDict.readIfPresent("inGroups", groupNames);
......@@ -373,11 +373,11 @@ void Foam::vtkPVFoam::updateInfoPatches
);
if (iter != groups.end())
{
iter().append(patchI);
iter().append(patchi);
}
else
{
groups.insert(groupNames[groupI], labelList(1, patchI));
groups.insert(groupNames[groupI], labelList(1, patchi));
}
}
}
......@@ -432,14 +432,14 @@ void Foam::vtkPVFoam::updateInfoPatches
if (!reader_->GetShowGroupsOnly())
{
forAll(names, patchI)
forAll(names, patchi)
{
// Valid patch if nFace > 0 - add patch to GUI list
if (sizes[patchI])
if (sizes[patchi])
{
arraySelection->AddArray
(
(names[patchI] + " - patch").c_str()
(names[patchi] + " - patch").c_str()
);
++nPatches;
......
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