43#ifndef Foam_faceZone_H
44#define Foam_faceZone_H
89 mutable std::unique_ptr<primitiveFacePatch> patchPtr_;
92 mutable std::unique_ptr<labelList> frontCellsPtr_;
95 mutable std::unique_ptr<labelList> backCellsPtr_;
98 mutable std::unique_ptr<labelList> mePtr_;
104 void setFlipMap(
const bool val);
107 void calcFaceZonePatch()
const;
110 void calcCellLayers()
const;
113 void checkAddressing()
const;
123 static constexpr const char*
labelsName() {
return "faceLabels"; }
168 const bool flipMapValue,
179 const bool flipMapValue,
219 const label newIndex = -1
230 const label newIndex = -1
275 const label newIndex = -1
300 static autoPtr<faceZone>
New
328 label
whichFace(
const label meshFaceID)
const
388 const bool flipMapValue
396 const bool flipMapValue
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A subset of mesh faces organised as a primitive patch.
label whichFace(const label meshFaceID) const
The local index of the given mesh face, -1 if not in the zone.
const primitiveFacePatch & operator()() const
Deprecated(2023-09) same as patch().
virtual ~faceZone()=default
Destructor.
const labelList & slaveCells() const
Deprecated(2023-09) same as backCells.
virtual bool checkDefinition(const bool report=false) const
Check zone definition.
static constexpr const char * labelsName()
The name associated with the zone-labels dictionary entry.
const primitiveFacePatch & patch() const
Return [demand-driven] reference to an equivalent primitive patch, with faces oriented according to f...
virtual autoPtr< faceZone > clone(const faceZoneMesh &zm, const label newIndex=-1) const
Construct and return a clone, resetting the zone mesh.
const boolList & flipMap() const noexcept
Return face flip map.
virtual void clearPrimitives()
Clear primitive addressing.
virtual void resetAddressing(faceZone &&zn)
Move reset addressing and flip map from another zone.
virtual autoPtr< faceZone > clone(const labelUList &addr, const boolUList &fm, const label index, const faceZoneMesh &zm) const
Construct and return a clone, resetting the face list and zone mesh.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes in topology.
label max_index() const noexcept
The maximum index the zone may contain == mesh nFaces().
virtual void clearAddressing()
Clear addressing (remove lookup maps, patch/geometric information).
declareRunTimeSelectionTable(autoPtr, faceZone, dictionary,(const word &name, const dictionary &dict, const label index, const faceZoneMesh &zm),(name, dict, index, zm))
static autoPtr< faceZone > New(const word &name, const dictionary &dict, const label index, const faceZoneMesh &zm)
Return a pointer to a new face zone created on freestore from dictionary.
void writeDict(Ostream &os) const
Deprecated(2025-09) Write dictionary.
const labelList & backCells() const
The back cells layer. Cells on the negative normal side of faces.
const labelList & frontCells() const
The front cells layer. Cells on the positive normal side of faces.
virtual void movePoints(const pointField &pts)
Correct patch after moving points.
friend Ostream & operator<<(Ostream &os, const faceZone &zn)
Ostream Operator.
const faceZoneMesh & zoneMesh() const noexcept
Return reference to the zone mesh.
faceZone(const faceZone &)=delete
No copy construct.
virtual bool checkParallelSync(const bool report=false) const
Check whether all procs have faces synchronised.
void operator=(const faceZone &zn)
Assign addressing, clearing demand-driven data.
TypeName("faceZone")
Runtime type information.
const labelList & masterCells() const
Deprecated(2023-09) same as frontCells.
const labelList & meshEdges() const
Return global edge index for local edges.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
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.
ZoneMesh< faceZone, polyMesh > faceZoneMesh
A ZoneMesh with faceZone content on a polyMesh.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
A PrimitivePatch with List storage for the faces, const reference for the point field.
List< bool > boolList
A List of bools.
UList< bool > boolUList
A UList of bools.
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)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.