43 if (oldId >= map.
size())
46 <<
"Illegal content " << oldId <<
" of set:" <<
name()
47 <<
" of type " <<
type() <<
nl
48 <<
"Value should be between [0," << map.
size() <<
')'
58 for (
const label oldId : labels)
60 const label newId = map[oldId];
78 const label len = map.
size();
82 for (
const label oldId : labels)
84 const label newId = map[oldId];
94 const bitSet& labels = selected_;
101 <<
"Illegal content " << oldId <<
" of set:" <<
name()
102 <<
" of type " <<
type() <<
nl
103 <<
"Value should be between [0," << maxSize <<
')'
114 const polyMesh&
mesh,
231 selected_ &= topoBitsPtr->selected_;
233 else if (set.empty())
239 for (
const label
id : selected_)
253 bitSet newLabels(selected_.size());
255 for (
const label
id : elems)
257 if (selected_.test(
id))
262 selected_.transfer(newLabels);
273 selected_ |= topoBitsPtr->selected_;
277 for (
const label
id : set)
298 selected_ -= topoBitsPtr->selected_;
302 for (
const label
id : set)
312 selected_.unset(elems);
label size() const noexcept
The number of elements in table.
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
const word & name() const noexcept
Return the object name.
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
label find_last() const
Locate the last bit set.
void set(const bitSet &bitset)
Set specified bits from another bitset.
void transfer(bitSet &bitset)
Transfer the contents of the argument list into this list and annul the argument list.
constant condensation/saturation model.
Mesh consisting of general polyhedral cells.
Base for a special purpose topoSet using labels stored as a bitSet.
virtual void invert(const label maxLen)
Invert contents.
virtual bool unset(const label id)
Unset an index.
virtual bool found(const label id) const
Has the given index?
virtual void subset(const labelUList &elems)
Subset contents. Only elements present in both sets remain.
topoBitSet(const polyMesh &mesh, const word &setName)
Construct (no-read) with empty selection.
virtual void subtractSet(const labelUList &elems)
Subtract given elements from the set.
virtual bool contains(const label id) const
Has the given index?
virtual void updateLabels(const labelUList &map)
Update map from map.
virtual bool set(const label id)
Set an index.
virtual void check(const label maxSize)
Check limits on addressable range.
virtual void addSet(const labelUList &elems)
Add given elements to the set.
General set of labels of mesh quantity (points, cells, faces).
topoSet(const topoSet &)=delete
No copy construct.
virtual label maxSize(const polyMesh &mesh) const =0
Return max allowable index (+1). Not implemented.
A class for handling words, derived from Foam::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void set(List< bool > &bools, const labelUList &locations)
Set the listed locations (assign 'true').
Different types of constants.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).