245 const word& wantedType,
259 const label initialCapacity,
349 virtual bool contains(
const label
id)
const;
352 virtual bool found(
const label
id)
const;
355 virtual bool set(
const label
id);
368 virtual void invert(
const label maxLen);
418 template<
class Container>
427 template<
class Container>
typename parent_type::const_key_iterator const_iterator
label size() const noexcept
The number of elements in table.
registerOption
Enumeration for use with registerObject(). Values map to bool (false/true).
@ LEGACY_REGISTER
Legacy/default registration request (bool: true).
readOption
Enumeration defining read preferences.
@ MUST_READ
Reading required.
writeOption
Enumeration defining write preferences.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
const fileName & instance() const noexcept
Read access to instance path component.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A class for handling file names.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Mesh consisting of general polyhedral cells.
Cell-face mesh analysis engine.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
General set of labels of mesh quantity (points, cells, faces).
virtual void deleteSet(const topoSet &set)
Deprecated(2018-10) subtract elements present in set.
virtual void distribute(const mapDistributePolyMesh &)=0
Update any stored data for mesh redistribution.
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
virtual bool writeData(Ostream &) const
Write contents.
virtual void invert(const label maxLen)
Invert contents.
virtual bool unset(const label id)
Unset an index.
bool readIOcontents(const word &wantedType, labelHashSet &contents)
Read into labelHashSet if IOobject flags set. Return true if read.
static fileName localPath(const polyMesh &mesh, const word &name)
Name of file set will use.
void operator=(const topoSet &)
Copy labelHashSet part only.
autoPtr< topoSet > clone() const
Clone.
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const =0
Like above but also writes mesh related quantity (usually coordinate).
static autoPtr< topoSet > New(const word &setType, const polyMesh &mesh, const word &name, IOobjectOption::readOption rOpt=IOobjectOption::MUST_READ, IOobjectOption::writeOption wOpt=IOobjectOption::NO_WRITE)
Return a pointer to a toposet read from file.
void checkLabels(const labelUList &labels, const label maxSize)
Check limits on addressable range.
topoSet(const topoSet &)=delete
No copy construct.
virtual label maxSize(const polyMesh &mesh) const =0
Return max allowable index (+1). Not implemented.
static int disallowGenericSets
Debug switch to disallow the use of generic sets.
declareRunTimeSelectionTable(autoPtr, topoSet, set,(const polyMesh &mesh, const word &name, const topoSet &set, IOobjectOption::writeOption wOpt),(mesh, name, set, wOpt))
virtual void sync(const polyMesh &mesh)
Sync set across coupled patches.
TypeName("topoSet")
Runtime type information.
virtual void subset(const labelUList &elems)
Subset contents. Only elements present in both sets remain.
declareRunTimeSelectionTable(autoPtr, topoSet, size,(const polyMesh &mesh, const word &name, const label size, IOobjectOption::writeOption wOpt),(mesh, name, size, wOpt))
static IOobject findIOobject(const polyMesh &mesh, const word &name, IOobjectOption::registerOption reg, IOobjectOption::readOption rOpt=IOobjectOption::MUST_READ, IOobjectOption::writeOption wOpt=IOobjectOption::NO_WRITE)
Find IOobject in the polyMesh/sets/ (used as constructor helper).
static IOobject findIOobject(const polyMesh &mesh, const word &name, IOobjectOption::readOption rOpt=IOobjectOption::MUST_READ, IOobjectOption::writeOption wOpt=IOobjectOption::NO_WRITE, IOobjectOption::registerOption reg=IOobjectOption::LEGACY_REGISTER)
Find IOobject in the polyMesh/sets/ (used as constructor helper).
virtual void subtractSet(const labelUList &elems)
Subtract given elements from the set.
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels. Not implemented.
static void setInstance(const fileName &instance, Container &items)
Helper: set instance on all items in container.
declareRunTimeSelectionTable(autoPtr, topoSet, word,(const polyMesh &mesh, const word &name, IOobjectOption::readOption rOpt, IOobjectOption::writeOption wOpt),(mesh, name, rOpt, wOpt))
label writeDebug(Ostream &os, const label maxElem, labelHashSet::const_iterator &iter) const
Write part of contents nicely formatted.
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 ~topoSet()=default
Destructor.
virtual void check(const label maxSize)
Check limits on addressable range.
virtual void addSet(const labelUList &elems)
Add given elements to the set.
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 NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
OBJstream os(runTime.globalPath()/outputName)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
#define FOAM_DEPRECATED_FOR(since, replacement)
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.