45 #ifndef Foam_faPatch_H 46 #define Foam_faPatch_H 83 const label nbrPolyPatchId_;
104 void operator=(
const faPatch&) =
delete;
183 const label nbrPolyPatchi,
184 const word& patchType
194 const word& patchType
207 const label nbrPolyPatchi
224 const label nbrPolyPatchi
241 static autoPtr<faPatch>
New 244 const dictionary&
dict,
250 static autoPtr<faPatch>
New 252 const word& patchType,
254 const dictionary&
dict,
278 return static_cast<const labelList&
>(*this);
296 return nbrPolyPatchId_;
316 virtual label
size()
const 324 return edgei -
start();
474 template<
class GeometricField,
class AnyType =
bool>
484 template<
class GeometricField,
class AnyType =
bool>
489 const AnyType* =
nullptr PtrList< faPatch > faPatchList
Store lists of faPatch as a PtrList.
const List< T >::subList patchSlice(const List< T > &values) const
This patch slice from the complete list of values, which has size mesh::nEdges(), using the virtual p...
static autoPtr< faPatch > New(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm)
Return pointer to a new patch created on freestore from dictionary.
void size(const label n)
Older name for setAddressableSize.
const GeometricField::Patch & patchField(const GeometricField &gf) const
Return the patch field of the GeometricField corresponding to this patch.
friend class faBoundaryMesh
The faPatch geometry initialisation is called by faBoundaryMesh.
label nPoints() const
Number of patch points.
const scalarField & weights() const
Return patch weighting factors.
virtual tmp< vectorField > delta() const
Return cell-centre to face-centre vector.
const List< T >::subList boundarySlice(const List< T > &values) const
This patch slice from the list of boundary values, which has size mesh::nBoundaryEdges(), using the virtual patch size.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const scalarField & deltaCoeffs() const
Return patch edge - neighbour face distances.
Identifies a patch by name and index, with optional physical type and group information.
static bool constraintType(const word &patchType)
Return true if the given type is a constraint type.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
const labelList & pointLabels() const
Return patch point labels.
virtual label size() const
Patch size is the number of edge labels, but can be overloaded.
virtual void makeDeltaCoeffs(scalarField &) const
Make patch edge - neighbour face distances.
Generic GeometricField class.
const scalarField & magEdgeLengths() const
Return edge length magnitudes, like the faMesh::magLe() method.
SubList< T > subList
Declare type of subList.
friend Ostream & operator<<(Ostream &, const faPatch &)
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
label nEdges() const noexcept
Number of edge labels (boundary edges) addressed by this patch.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
const GeometricField::Patch & lookupPatchField(const word &name, const GeometricField *=nullptr, const AnyType *=nullptr) const
Lookup the named field from the local registry and return the patch field corresponding to this patch...
const labelList & edgeLabels() const noexcept
Return the list of edges.
label whichEdge(const label edgei) const
Return label of edge in patch from global edge label.
friend class List< T >
Declare friendship with the List class.
List< labelPair > boundaryProcSizes() const
List of proc/size for the boundary edge neighbour processors (does not include own proc) ...
static wordList constraintTypes()
Return a list of all the constraint patch types.
void makeCorrectionVectors(vectorField &) const
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
A List obtained as a section of another List.
virtual bool coupled() const
Return true if this patch is coupled.
const vectorField & edgeCentres() const
Return edge centres.
tmp< vectorField > edgeFaceCentres() const
Return neighbour face centres.
void calcPointLabels() const
Calculate patch point labels.
A class for handling words, derived from Foam::string.
virtual void write(Ostream &) const
Write.
const labelUList & edgeFaces() const
Return edge-face addressing.
tmp< vectorField > edgeNormals() const
Return edge unit normals, like the faMesh::unitLe() method.
const word & name() const noexcept
The patch name.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
label size() const noexcept
The number of elements in the List.
labelList boundaryProcs() const
Boundary edge neighbour processors (does not include own proc)
List< labelPair > boundaryConnections() const
List of proc/face for the boundary edge neighbours in locally reordered edge numbering.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
label start() const
Patch start in edge list.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
virtual ~faPatch()
Destructor.
TypeName("patch")
Runtime type information.
tmp< vectorField > ngbPolyPatchPointNormals() const
Return normals of neighbour polyPatch joined points.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
virtual void makeWeights(scalarField &) const
Make patch weighting factors.
faBoundaryMesh BoundaryMesh
The boundary type associated with the patch.
void patchInternalField(const UList< Type > &internalData, const labelUList &addressing, Field< Type > &pfld) const
Extract internal field next to patch using specified addressing.
Forward declarations for faPatchField types.
const vectorField & edgeLengths() const
Return edge length vectors, like the faMesh::Le() method.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Finite area boundary mesh.
autoPtr< List< label > > clone() const
Clone.
const labelListList & pointEdges() const
Return patch point-edge addressing.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
label index() const noexcept
The index of this patch in the boundaryMesh.
label offset() const
The offset where this patch starts in the boundary edge list.
A class for managing temporary objects.
declareRunTimeSelectionTable(autoPtr, faPatch, dictionary,(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm, const word &patchType),(name, dict, index, bm, patchType))
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
tmp< vectorField > ngbPolyPatchFaceNormals() const
Return normals of neighbour polyPatch faces.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patch after moving points.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
void calcPointEdges() const
Calculate patch point-edge addressing.
void resetEdges(const labelUList &newEdges)
Reset the list of edges (use with caution)
const faBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
label ngbPolyPatchIndex() const noexcept
The neighbour polyPatch index.