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 <<
')'
123 const polyMesh&
mesh,
215 for (
const label
id : labels)
224 for (
const label
id : labels)
233 selected_.resize(maxLen);
267 const boolList oldSelected(selected_);
269 for (
const label
id : set)
280 for (
const label
id :
set)
290 for (
const label
id :
set)
300 for (
const label
id :
set)
310 for (
const label
id : set)
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 transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
bool set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
bool test(const label i) const
Test bool value at specified position, always false for out-of-range access.
label rfind(const T &val, label pos=-1) const
Find index of the last occurrence of the value.
void size(const label n)
Older name for setAddressableSize.
constant condensation/saturation model.
Mesh consisting of general polyhedral cells.
Base for a special purpose topoSet using labels stored as a boolList.
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.
virtual void subtractSet(const labelUList &elems)
Subtract given elements from the set.
topoBoolSet(const polyMesh &mesh, const word &setName)
Construct (no-read) with empty selection.
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.
errorManip< error > abort(error &err)
List< bool > boolList
A List of bools.
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).
#define forAll(list, i)
Loop across all elements in list.