ENH: dedicated HashSetOps, HashTableOps namespaces

- relocated HashSetPlusEqOp and HashTablePlusEqOp to
  HashSetOps::plusEqOp and HashTableOps::plusEqOp, respectively

- additional functions for converting between a labelHashSet
  and a PackedBoolList or List<bool>:

  From lists selections to labelHashSet indices:

      HashSetOps::used(const PackedBoolList&);
      HashSetOps::used(const UList<bool>&);

  From labelHashSet to list forms:

      PackedBoolList bitset(const labelHashSet&);
      List<bool> bools(const labelHashSet&);
This commit is contained in:
Mark Olesen
2018-03-06 11:41:34 +01:00
parent 15f7260884
commit bcabe827f6
10 changed files with 340 additions and 112 deletions

View File

@ -62,7 +62,7 @@ if (timeDirs.size() && !noLagrangian)
if (Pstream::parRun())
{
Pstream::mapCombineGather(cloudFields, HashTablePlusEqOp<word>());
Pstream::mapCombineGather(cloudFields, HashTableOps::plusEqOp<word>());
Pstream::mapCombineScatter(cloudFields);
}

View File

@ -73,7 +73,7 @@ Note
#include "IOmanip.H"
#include "OFstream.H"
#include "PstreamCombineReduceOps.H"
#include "HashTableOps.H"
#include "HashOps.H"
#include "fvc.H"
#include "volFields.H"

View File

@ -53,7 +53,7 @@ if (timeDirs.size() && !noLagrangian)
if (Pstream::parRun())
{
Pstream::combineGather(allCloudDirs, HashSetPlusEqOp<word>());
Pstream::combineGather(allCloudDirs, HashSetOps::plusEqOp<word>());
Pstream::combineScatter(allCloudDirs);
}
}

View File

@ -147,7 +147,7 @@ Note
#include "volPointInterpolation.H"
#include "emptyPolyPatch.H"
#include "PstreamCombineReduceOps.H"
#include "HashTableOps.H"
#include "HashOps.H"
#include "labelIOField.H"
#include "scalarIOField.H"
#include "sphericalTensorIOField.H"
@ -1482,7 +1482,7 @@ int main(int argc, char *argv[])
Pstream::mapCombineGather
(
cloudFields,
HashSetPlusEqOp<word>()
HashSetOps::plusEqOp<word>()
);
Pstream::mapCombineScatter(cloudFields);
}