48 const scalar edgeFeatureAngle,
79 if (
x == nullVector &&
y != nullVector)
101 bitSet sameEdgeOrientation;
123 const PN nullPN(-1, nullVector);
167 if (
y[0] != -1 &&
y[0] !=
x[0])
171 else if (
y[1] != -1 &&
y[1] !=
x[1])
179 if (
y[0] != -1 &&
y[0] !=
x[0] &&
y[0] !=
x[1])
183 else if (
y[1] != -1 &&
y[1] !=
x[0] &&
y[1] !=
x[1])
192 forAll(allBoundary, facei)
194 const auto&
f = allBoundary[facei];
195 const label zonei = faceToZone[facei];
196 for (
const label pointi :
f)
198 auto&
pZones = pointToZones[pointi];
206 else if (
pZones.second() == -1)
243 const auto& edgeFaces = allBoundary.
edgeFaces();
244 const auto& faceNormals = allBoundary.
faceNormals();
248 const auto& eFaces = edgeFaces[edgei];
249 const vector& n0 = faceNormals[eFaces[0]];
250 const label zone0 = faceToZone[eFaces[0]];
251 if (eFaces.size() == 1)
253 allEdgeToFaces[edgei] =
Pair<PN>(PN(zone0, n0), nullPN);
257 const vector& n1 = faceNormals[eFaces[1]];
258 const label zone1 = faceToZone[eFaces[1]];
286 else if (
x[1] == nullPN)
288 if (
y[0] != nullPN &&
y[0] !=
x[0])
328 const auto assignNonNullPN = [&](PN&
x,
const PN&
y)
330 if (
x.second() == nullVector &&
y.second() != nullVector)
352 forAll(allEdgeToFaces, edgei)
355 const label mp0 = mp[
e[0]];
356 const label mp1 = mp[
e[1]];
358 const Pair<PN>& facesInfo = allEdgeToFaces[edgei];
360 if (facesInfo[1] == nullPN)
367 const label zone0 = facesInfo[0].
first();
368 const label zone1 = facesInfo[1].
first();
382 patchEdgeNormal[mp0] = eVec;
383 patchEdgeNormal[mp1] = eVec;
392 if ((n0 & n1) < featEdgeCos)
407 if (patchEdgeNormal[mp0] == nullVector)
414 featEdgeNormal[mp0].
first() = zone0;
416 featEdgeNormal[mp0].second() = eVec;
418 if (patchEdgeNormal[mp1] == nullVector)
425 featEdgeNormal[mp1].
first() = zone1;
427 featEdgeNormal[mp1].second() = eVec;
457 forAll(pointToZones, pointi)
459 if (pointToZones[pointi] ==
labelPair(-2, -2))
461 dynMultiZoneMeshPoints.
append(pointi);
463 dynMultiZoneConstraints.
append
472 patchEdgeNormal[pointi] = nullVector;
473 featEdgeNormal[pointi] = nullPN;
476 multiZoneMeshPoints = std::move(dynMultiZoneMeshPoints);
477 multiZoneConstraints = std::move(dynMultiZoneConstraints);
482 forAll(patchEdgeNormal, pointi)
484 if (patchEdgeNormal[pointi] != nullVector)
486 dynTwoZoneMeshPoints.
append(pointi);
488 dynTwoZoneConstraints.
append
493 patchEdgeNormal[pointi]
498 featEdgeNormal[pointi] = nullPN;
501 twoZoneMeshPoints = std::move(dynTwoZoneMeshPoints);
502 twoZoneConstraints = std::move(dynTwoZoneConstraints);
510 forAll(featEdgeNormal, pointi)
512 const auto& pInfo = featEdgeNormal[pointi];
515 const label zonei = pInfo.first();
519 forAll(zoneToMeshPoints, zonei)
521 zoneToMeshPoints[zonei].
setSize(sizes[zonei]);
522 zoneToConstraints[zonei].
setSize(sizes[zonei]);
525 forAll(featEdgeNormal, pointi)
527 const auto& pInfo = featEdgeNormal[pointi];
530 const label zonei = pInfo.first();
531 const label index = sizes[zonei]++;
533 zoneToMeshPoints[zonei][index] = pointi;
534 zoneToConstraints[zonei][index] =
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void setSize(label n)
Alias for resize().
An ordered pair of two objects of type <T> with first() and second() elements.
const T & first() const noexcept
Access the first element.
const T & second() const noexcept
Access the second element.
label nEdges() const
Number of edges in patch.
label nPoints() const
Number of points supporting patch faces.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
const Field< point_type > & faceNormals() const
Return face unit normals for patch.
const Field< point_type > & points() const noexcept
Return reference to global points.
const labelListList & edgeFaces() const
Return edge-face addressing.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
A List with indirect addressing. Like IndirectList but does not store addressing.
T & first()
Access first element of the list, position [0].
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
Vector< Cmpt > & normalise(const scalar tol=ROOTVSMALL)
Inplace normalise the vector by its magnitude.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
const labelListList & globalEdgeTransformedSlaves() const
const mapDistribute & globalEdgeSlavesMap() const
static void syncData(List< Type > &elems, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
Helper: synchronise data with transforms.
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
const labelListList & globalEdgeSlaves() const
label constructSize() const noexcept
Constructed data size.
Class containing processor-to-processor mapping information.
Accumulates point constraints through successive applications of the applyConstraint function.
Mesh consisting of general polyhedral cells.
const volScalarField & p0
IOporosityModelList pZones(mesh)
Pair< label > labelPair
A pair of labels.
List< labelPair > labelPairList
List of labelPair.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
List< pointConstraint > pointConstraintList
List of pointConstraint.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
dimensionedScalar cos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.