39 #ifndef Foam_topoSet_H 40 #define Foam_topoSet_H 58 class mapDistributePolyMesh;
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>
virtual void subset(const labelUList &elems)
Subset contents. Only elements present in both sets remain.
virtual bool writeData(Ostream &) const
Write contents.
writeOption
Enumeration defining write preferences.
virtual label maxSize(const polyMesh &mesh) const =0
Return max allowable index (+1). Not implemented.
void operator=(const topoSet &)
Copy labelHashSet part only.
A class for handling file names.
virtual ~topoSet()=default
Destructor.
declareRunTimeSelectionTable(autoPtr, topoSet, word,(const polyMesh &mesh, const word &name, IOobjectOption::readOption rOpt, IOobjectOption::writeOption wOpt),(mesh, name, rOpt, wOpt))
virtual bool unset(const label id)
Unset an index.
Legacy/default registration request (bool: true)
const word & name() const noexcept
Return the object name.
Cell-face mesh analysis engine.
static int disallowGenericSets
Debug switch to disallow the use of generic sets.
virtual bool set(const label id)
Set an index.
virtual void distribute(const mapDistributePolyMesh &)=0
Update any stored data for mesh redistribution.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Ignore writing from objectRegistry::writeObject()
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual bool contains(const label id) const
Has the given index?
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
label size() const noexcept
The number of elements in table.
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)
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
autoPtr< topoSet > clone() const
Clone.
A class for handling words, derived from Foam::string.
topoSet(const topoSet &)=delete
No copy construct.
void checkLabels(const labelUList &labels, const label maxSize)
Check limits on addressable range.
TypeName("topoSet")
Runtime type information.
virtual void addSet(const labelUList &elems)
Add given elements to the set.
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.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label writeDebug(Ostream &os, const label maxElem, labelHashSet::const_iterator &iter) const
Write part of contents nicely formatted.
virtual void updateLabels(const labelUList &map)
Update map from map.
OBJstream os(runTime.globalPath()/outputName)
General set of labels of mesh quantity (points, cells, faces).
const fileName & instance() const noexcept
Read access to instance path component.
registerOption
Enumeration for use with registerObject(). Values map to bool (false/true)
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
virtual bool found(const label id) const
Has the given index?
virtual void subtractSet(const labelUList &elems)
Subtract given elements from the set.
virtual void sync(const polyMesh &mesh)
Sync set across coupled patches.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual void invert(const label maxLen)
Invert contents.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
typename parent_type::const_key_iterator const_iterator
A const_iterator, returning reference to the key.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
virtual void check(const label maxSize)
Check limits on addressable range.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
virtual void deleteSet(const topoSet &set)
Deprecated(2018-10) subtract elements present in set.
Defines the attributes of an object for which implicit objectRegistry management is supported...
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels. Not implemented.
static fileName localPath(const polyMesh &mesh, const word &name)
Name of file set will use.
bool readIOcontents(const word &wantedType, labelHashSet &contents)
Read into labelHashSet if IOobject flags set. Return true if read.
static void setInstance(const fileName &instance, Container &items)
Helper: set instance on all items in container.
readOption
Enumeration defining read preferences.