Go to the documentation of this file.
51 void Foam::faPatch::clearOut()
61 Foam::faPatch::faPatch
67 const label ngbPolyPatchIndex
72 nbrPolyPatchId_(ngbPolyPatchIndex),
74 edgeFacesPtr_(nullptr),
75 pointLabelsPtr_(nullptr),
76 pointEdgesPtr_(nullptr)
80 Foam::faPatch::faPatch
90 nbrPolyPatchId_(
dict.
get<label>(
"ngbPolyPatchIndex")),
92 edgeFacesPtr_(nullptr),
93 pointLabelsPtr_(nullptr),
94 pointEdgesPtr_(nullptr)
102 nbrPolyPatchId_(
p.nbrPolyPatchId_),
104 edgeFacesPtr_(nullptr),
105 pointLabelsPtr_(nullptr),
106 pointEdgesPtr_(nullptr)
122 return boundaryMesh_;
141 for (
const label patchEdgei : this->edgeLabels())
143 const label bndEdgei = (patchEdgei - nInternalEdges);
154 const auto& connections = boundaryMesh().mesh().boundaryConnections();
155 const label nInternalEdges = boundaryMesh().mesh().nInternalEdges();
159 for (
const label patchEdgei : this->edgeLabels())
161 const label bndEdgei = (patchEdgei - nInternalEdges);
162 const label proci = connections[bndEdgei].first();
163 procsUsed.insert(proci);
168 return procsUsed.sortedToc();
179 for (
const label patchEdgei : this->edgeLabels())
181 const label bndEdgei = (patchEdgei - nInternalEdges);
182 const label proci = connections[bndEdgei].first();
189 List<labelPair>
output(procCount.size());
191 for (
const label proci : procCount.sortedToc())
204 if (!pointLabelsPtr_)
209 return *pointLabelsPtr_;
220 return *pointEdgesPtr_;
236 DynamicList<label> dynEdgePoints(2*edges.size());
238 for (
const edge&
e : edges)
241 if (markedPoints.insert(
e.first()))
243 dynEdgePoints.append(
e.first());
246 if (markedPoints.insert(
e.second()))
248 dynEdgePoints.append(
e.second());
253 pointLabelsPtr_ =
new labelList(std::move(dynEdgePoints));
291 List<DynamicList<label,2>> dynPointEdges(edgePoints.size());
295 const edge&
e = edges[edgei];
297 dynPointEdges[edgePoints.find(
e.first())].append(edgei);
298 dynPointEdges[edgePoints.find(
e.second())].append(edgei);
303 auto& pEdges = *pointEdgesPtr_;
307 pEdges[pointi] = std::move(dynPointEdges[pointi]);
314 if (nbrPolyPatchId_ < 0)
325 if (nbrPolyPatchId_ < 0)
333 boundaryMesh().
mesh().haloFaceNormals(this->index())
339 auto& pointNorm = tpointNorm.ref();
346 for (
const label bndEdgei : pntEdges[pointi])
364 patchSlice(boundaryMesh().
mesh().edgeOwner())
368 return *edgeFacesPtr_;
394 for (
vector&
n : tedgeNorm.ref())
406 auto& fc = tfc.ref();
410 boundaryMesh().mesh().areaCentres().internalField();
416 fc[edgeI] = gfc[faceLabels[edgeI]];
425 return edgeNormals()*(edgeNormals() & (edgeCentres() - edgeFaceCentres()));
431 dc = scalar(1)/(edgeNormals() &
delta());
441 k = edgeNormMag - (scalar(1)/(unitDelta & edgeNormMag))*unitDelta;
470 static_cast<labelList&
>(*this) = newEdges;
477 static_cast<labelList&
>(*this) = std::move(newEdges);
488 static_cast<const labelList&
>(*this).writeEntry(
"edgeLabels",
os);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
List< label > labelList
A List of labels.
const bMesh & mesh() const
tmp< vectorField > edgeFaceCentres() const
const labelListList & pointEdges() const
static Ostream & output(Ostream &os, const IntRange< T > &range)
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
static constexpr const zero Zero
virtual void movePoints(const pointField &)
void resetEdges(const UList< label > &newEdges)
const scalarField & deltaCoeffs() const
virtual void makeWeights(scalarField &) const
Template functions to aid in the implementation of demand driven data.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
A List obtained as a section of another List.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void append(const T &val)
void calcPointLabels() const
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
A HashTable with keys but without contents that is similar to std::unordered_set.
const faBoundaryMesh & boundaryMesh() const noexcept
virtual tmp< vectorField > delta() const
const scalarField & weights() const
tmp< vectorField > ngbPolyPatchFaceNormals() const
Field< vector > vectorField
Specialisation of Field<T> for vector.
const labelUList & edgeFaces() const
void deleteDemandDrivenData(DataPtr &dataPtr)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Finite area boundary mesh.
Identifies a patch by name and index, with optional physical type and group information.
labelList boundaryProcs() const
surfaceVectorField faceNormals(mesh.Sf()/mesh.magSf())
Generic templated field type.
virtual void makeDeltaCoeffs(scalarField &) const
const vectorField & edgeCentres() const
DynamicList< T, SizeMin > & append(const T &val)
virtual bool check(const char *operation) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
List< labelPair > boundaryProcSizes() const
void makeCorrectionVectors(vectorField &) const
Vector< scalar > vector
A scalar version of the templated Vector.
label nInternalEdges() const
List< labelPair > boundaryConnections() const
const labelList & pointLabels() const
List< labelList > labelListList
A List of labelList.
static int myProcNo(const label communicator=worldComm)
const scalarField & magEdgeLengths() const
unsigned int count(const UList< bool > &bools, const bool val=true)
virtual void write(Ostream &) const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const dimensionedScalar e
static tmp< T > New(Args &&... args)
bool insert(const Key &key)
tmp< vectorField > edgeNormals() const
Ostream & writeEntry(const keyType &key, const T &value)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
word name(const expressions::valueTypeCode typeCode)
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
void write(Ostream &os) const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
UList< label > labelUList
A UList of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
tmp< vectorField > ngbPolyPatchPointNormals() const
Finite area patch class. Used for 2-D non-Euclidian finite area method.
defineTypeNameAndDebug(combustionModel, 0)
labelList pointLabels(nPoints, -1)
static label nProcs(const label communicator=worldComm)
const vectorField & edgeLengths() const
void calcPointEdges() const