44#ifndef Foam_cellZone_H
45#define Foam_cellZone_H
78 static constexpr const char*
labelsName() {
return "cellLabels"; }
151 const label newIndex = -1
162 const label newIndex = -1
204 const label newIndex = -1
253 label
whichCell(
const label meshCellID)
const
autoPtr< List< label > > clone() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
void operator=(const cellZone &zn)
Assign addressing, clearing demand-driven data.
virtual bool checkDefinition(const bool report=false) const
Check zone definition.
label whichCell(const label meshCellID) const
The local index of the given mesh cell, -1 if not in the zone.
static autoPtr< cellZone > New(const word &name, const dictionary &dict, const label index, const cellZoneMesh &zm)
Return a pointer to a new cell zone created on freestore from dictionary.
static constexpr const char * labelsName()
The name associated with the zone-labels dictionary entry.
virtual bool checkParallelSync(const bool report=false) const
Check whether zone is synchronised across coupled boundaries.
virtual void resetAddressing(cellZone &&zn)
Move reset addressing from another zone.
virtual autoPtr< cellZone > clone(const cellZoneMesh &zm, const label newIndex=-1) const
Construct and return a clone, resetting the zone mesh.
declareRunTimeSelectionTable(autoPtr, cellZone, dictionary,(const word &name, const dictionary &dict, const label index, const cellZoneMesh &zm),(name, dict, index, zm))
virtual autoPtr< cellZone > clone(const labelUList &addr, const label index, const cellZoneMesh &zm) const
Construct and return a clone, resetting the cell list and zone mesh.
friend Ostream & operator<<(Ostream &os, const cellZone &zn)
Ostream Operator.
label max_index() const noexcept
The maximum index the zone may contain == mesh nCells().
const cellZoneMesh & zoneMesh() const noexcept
Return reference to the zone mesh.
void writeDict(Ostream &os) const
Deprecated(2025-09) Write dictionary.
TypeName("cellZone")
Runtime type information.
virtual ~cellZone()=default
Destructor.
cellZone(const cellZone &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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 ...
label index() const noexcept
The index of this zone in the zone list.
const word & name() const noexcept
The zone name.
virtual bool checkDefinition(const bool report=false) const =0
Check zone definition. Return true if in error.
label localID(const label globalID) const
Lookup local address in zone for given global index.
zone()
Default construct: empty zone with name="", index=0.
const labelList & addressing() const noexcept
The addressing used by the zone.
OBJstream os(runTime.globalPath()/outputName)
List< label > labelList
A List of labels.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
ZoneMesh< cellZone, polyMesh > cellZoneMesh
A ZoneMesh with cellZone content on a polyMesh.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
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)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.