Go to the documentation of this file.
47 if (!labels.test(oldId))
52 if (oldId >= map.
size())
55 <<
"Illegal content " << oldId <<
" of set:" <<
name()
56 <<
" of type " <<
type() <<
nl
57 <<
"Value should be between [0," << map.
size() <<
')'
62 const label newId = map[oldId];
83 const label len = map.
size();
89 const label newId = map[oldId];
105 const label oldId = labels.rfind(
true);
107 if (oldId >= maxSize)
110 <<
"Illegal content " << oldId <<
" of set:" <<
name()
111 <<
" of type " <<
type() <<
nl
112 <<
"Value should be between [0," << maxSize <<
')'
154 selected_.
resize(size, val);
183 selected_ = std::move(
bools);
184 selected_.resize(size);
192 return selected_.test(
id);
198 return selected_.set(
id);
204 return selected_.unset(
id);
210 for (
const label
id : labels)
212 selected_[id] =
true;
219 for (
const label
id : labels)
228 selected_.resize(maxLen);
229 for (
bool&
b : selected_)
247 selected_[i] = (selected_[i] && set.
found(i));
256 for (
const label
id : set)
258 selected_[id] =
true;
266 for (
const label
id : set)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const
Return name.
A class for handling words, derived from Foam::string.
List< bool > bools(const labelHashSet &locations)
virtual void check(const label maxSize)
Check limits on addressable range.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void invert(const label maxLen)
Invert contents.
virtual void subtractSet(const topoSet &set)
Subtract elements present in set.
virtual void updateLabels(const labelUList &map)
Update map from map.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
virtual bool found(const label id) const
Has the given index?
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
word name(const complex &c)
Return string representation of complex.
void transfer(List< T > &list)
void resize(const label sz)
Resize the hash table for efficiency.
General set of labels of mesh quantity (points, cells, faces).
virtual bool set(const label id)
Set an index.
Base for a special purpose topoSet using labels stored as a boolList.
void resize(const label newSize)
Adjust allocated size of list.
errorManip< error > abort(error &err)
virtual bool found(const label id) const
Has the given index?
virtual void addSet(const topoSet &set)
Add elements present in set.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool unset(const label id)
Unset an index.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
topoBoolSet(const polyMesh &mesh, const word &setName)
Construct with empty selection.
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
const Time & time() const
Return the top-level database.
bool empty() const noexcept
True if the hash table is empty.
const word & constant() const
Return constant name.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.