ENH: Use edgeHashes.H and labelPairHashes.H

- avoids some duplicate code.
This commit is contained in:
Mark Olesen
2017-04-27 10:15:56 +02:00
parent 799490a3cf
commit 633e4c9c7f
26 changed files with 59 additions and 120 deletions

View File

@ -45,7 +45,7 @@ Description
#include "timeSelector.H"
#include "OFstream.H"
#include "passiveParticleCloud.H"
#include "labelPairHashes.H"
#include "SortableList.H"
#include "IOobjectList.H"
#include "PtrList.H"
@ -133,8 +133,6 @@ int main(int argc, char *argv[])
fileName vtkPath(runTime.path()/"VTK");
mkDir(vtkPath);
typedef HashTable<label, labelPair, labelPair::Hash<>> trackTableType;
forAll(timeDirs, timeI)
{
runTime.setTime(timeDirs[timeI], timeI);
@ -168,13 +166,14 @@ int main(int argc, char *argv[])
label nTracks = 0;
{
trackTableType trackTable;
labelPairLookup trackTable;
forAll(particles, i)
{
const label origProc = particles[i].origProc();
const label origId = particles[i].origId();
const trackTableType::const_iterator& iter =
labelPairLookup::const_iterator iter =
trackTable.find(labelPair(origProc, origId));
if (iter == trackTable.end())