STYLE: avoid explicit use of 'word' as HashTable template parameter

- less clutter and typing to use the default template parameter when
  the key is 'word' anyhow.

- use EdgeMap instead of the longhand HashTable version where
  appropriate
This commit is contained in:
Mark Olesen
2017-05-10 13:44:27 +02:00
parent 4d126bfe2d
commit 8728e8353f
14 changed files with 87 additions and 110 deletions

View File

@ -924,8 +924,8 @@ int main(int argc, char *argv[])
}
}
HashTable<labelList,word> cellZones;
HashTable<labelList,word> faceZones;
HashTable<labelList> cellZones;
HashTable<labelList> faceZones;
List<bool> isAPatch(patchNames.size(),true);
if (dofVertIndices.size())

View File

@ -233,21 +233,16 @@ void Foam::vtkPVFoam::updateInfoPatches
if (meshPtr_)
{
const polyBoundaryMesh& patches = meshPtr_->boundaryMesh();
const HashTable<labelList, word>& groups = patches.groupPatchIDs();
const HashTable<labelList>& groups = patches.groupPatchIDs();
const wordList allPatchNames = patches.names();
// Add patch groups
// ~~~~~~~~~~~~~~~~
for
(
HashTable<labelList, word>::const_iterator iter = groups.begin();
iter != groups.end();
++iter
)
forAllConstIters(groups, iter)
{
const word& groupName = iter.key();
const labelList& patchIDs = iter();
const labelList& patchIDs = iter.object();
label nFaces = 0;
forAll(patchIDs, i)
@ -349,7 +344,7 @@ void Foam::vtkPVFoam::updateInfoPatches
// Add (non-zero) patch groups to the list of mesh parts
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HashTable<labelList, word> groups(patchEntries.size());
HashTable<labelList> groups(patchEntries.size());
forAll(patchEntries, patchi)
{
@ -360,7 +355,7 @@ void Foam::vtkPVFoam::updateInfoPatches
forAll(groupNames, groupI)
{
HashTable<labelList, word>::iterator iter = groups.find
HashTable<labelList>::iterator iter = groups.find
(
groupNames[groupI]
);
@ -375,16 +370,10 @@ void Foam::vtkPVFoam::updateInfoPatches
}
}
for
(
HashTable<labelList, word>::const_iterator iter =
groups.begin();
iter != groups.end();
++iter
)
forAllConstIters(groups, iter)
{
const word& groupName = iter.key();
const labelList& patchIDs = iter();
const labelList& patchIDs = iter.object();
label nFaces = 0;
forAll(patchIDs, i)