diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H index 076e4e97a6eee7f9e55c7167e049c19038b36dbe..e2502ccf96cd598ff1b70656ca99a706fe4cef86 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSet.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSet.H @@ -244,6 +244,11 @@ public: // \note Method name compatibility with std::bitset inline bool test(const label pos) const; + //- Test value at specified position, never auto-vivify entries. + // + // \note Method name compatibility with HashSet + inline bool found(const label pos) const; + //- Locate the first bit that is set. // \return the location or -1 if there are no bits set. // diff --git a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H index c3332a4a2f19a1b7d6a65918ec62cf139461cff5..b52f52d55ab5a7102b3af985aaf55e3018eb94b4 100644 --- a/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H +++ b/src/OpenFOAM/containers/Bits/bitSet/bitSetI.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -515,6 +515,12 @@ inline bool Foam::bitSet::test(const label pos) const } +inline bool Foam::bitSet::found(const label pos) const +{ + return get(pos); +} + + inline Foam::labelList Foam::bitSet::sortedToc() const { return toc();