113 const polyBoundaryMesh& bm,
114 const word& physicalType,
118 patchIdentifier(
name, index, physicalType, inGroups),
121 SubList<face>(bm.
mesh().faces(), size, start),
135 const word& patchType
144 dict.get<label>(
"nFaces"),
145 dict.get<label>(
"startFace")
149 start_(
dict.get<label>(
"startFace")),
162 const polyBoundaryMesh& bm
221 mapAddressing.size(),
236 boundaryMesh_(
p.boundaryMesh_)
275 const auto& cnstrTable = *dictionaryConstructorTablePtr_;
283 if (constraintType(iter.key()))
285 cTypes[i++] = iter.key();
298 return start_ - boundaryMesh_.start();
304 return boundaryMesh_;
342 auto& cc = tcc.ref();
345 const vectorField& gcc = boundaryMesh_.mesh().cellCentres();
364 auto& fraction = tfraction.ref();
370 const face&
f = this->operator[](facei);
380 if (areaFractionPtr_)
390 areaFractionPtr_ = std::make_unique<scalarField>(
size(), fraction);
399 areaFractionPtr_.reset(fraction.
ptr());
403 areaFractionPtr_.reset(
nullptr);
416 patchSlice(boundaryMesh().
mesh().faceOwner())
421 return *faceCellsPtr_;
435 boundaryMesh().
mesh().edges(),
436 boundaryMesh().
mesh().pointEdges()
450 faceCellsPtr_.reset(
nullptr);
451 mePtr_.reset(
nullptr);
452 areaFractionPtr_.reset(
nullptr);
460 os.writeEntry(
"nFaces",
size());
461 os.writeEntry(
"startFace",
start());
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
SubField< vector > subField
void resize(const label len)
Adjust allocated size of list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const labelListList & pointEdges() const
const edgeList & edges() const
labelList meshEdges(const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
void operator=(const PrimitivePatch< SubList< face >, const pointField & > &rhs)
const Field< point_type > & points() const noexcept
virtual void movePoints(const Field< point_type > &)
void clearPatchMeshAddr()
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A non-owning sub-view of a List (allocated or unallocated storage).
UList< T > & reset(std::nullptr_t) noexcept
Reset to zero-sized and nullptr.
bool get(const label i) const
face & operator[](const label i)
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
A face is a list of labels corresponding to mesh vertices.
Identifies a patch by name and index, with optional physical type and group information.
const word & physicalType() const noexcept
The (optional) physical type of the patch.
patchIdentifier & operator=(const patchIdentifier &)=default
Copy assignment.
const wordList & inGroups() const noexcept
The (optional) groups that the patch belongs to.
void write(Ostream &os) const
Write (physicalType, inGroups) dictionary entries (without surrounding braces).
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
patchIdentifier(const patchIdentifier &)=default
Copy construct.
void addGroup(const word &name)
Add (unique) group for the patch.
Abstract base class for point-mesh patch fields.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
A patch is a list of labels that address the faces in the global face list.
static wordList constraintTypes()
Return a list of all the constraint patch types.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
const vectorField::subField faceAreas() const
Return face normals.
friend class polyBoundaryMesh
virtual void clearGeom()
Clear geometry.
void operator=(const polyPatch &p)
Copy assignment.
label offset() const noexcept
The offset where this patch starts in the boundary face list.
const faceList::subList faces() const
Return mesh faces for the patch.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
virtual void write(Ostream &os) const
Write the polyPatch data as a dictionary.
const vectorField::subField faceCentres() const
Return face centres.
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
virtual ~polyPatch()
Destructor.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual void clearAddressing()
Clear addressing.
polyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
static int disallowGenericPolyPatch
Debug switch to disallow the use of genericPolyPatch.
label start() const noexcept
Return start label of this patch in the polyMesh face list.
const List< T >::subList patchSlice(const UList< T > &values) const
This patch slice from the complete list, which has size mesh::nFaces(), using the number of patch fac...
tmp< vectorField > faceCellCentres() const
Return face cell centres.
const labelList::subList faceOwner() const
Return face owner for the patch.
static bool constraintType(const word &patchType)
Return true if the given type is a constraint type.
const labelUList & faceCells() const
Return face-cell addressing.
const labelList & meshEdges() const
Return global edge index for local edges.
tmp< scalarField > areaFraction() const
Return the cached area fraction. Usually only set for the non-overlap patches on ACMI.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
T * ptr() const
Return managed pointer for reuse, or clone() the object reference.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< word > wordList
List of word.
List< label > labelList
A List of labels.
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Field< vector > vectorField
Specialisation of Field<T> for vector.
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 defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.