48 const scalar edgeFeatureAngle,
76 const vector nullVector(vector::uniform(0));
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] =
const T & first() const noexcept
Access the first element.
label nPoints() const
Number of points supporting patch faces.
const mapDistribute & globalEdgeSlavesMap() const
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Unit conversion functions.
label constructSize() const noexcept
Constructed data size.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
const labelListList & globalEdgeSlaves() const
const labelList & meshPoints() const
Return labelList of mesh points in patch.
#define forAll(list, i)
Loop across all elements in list.
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 Field< point_type > & faceNormals() const
Return face unit normals for patch.
A list of faces which address into the list of points.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
dimensionedScalar cos(const dimensionedScalar &ds)
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
const labelListList & edgeFaces() const
Return edge-face addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
const Field< point_type > & points() const noexcept
Return reference to global points.
Accumulates point constraints through successive applications of the applyConstraint function...
label nEdges() const
Number of edges in patch.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Pair< label > labelPair
A pair of labels.
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
Class containing processor-to-processor mapping information.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A List with indirect addressing. Like IndirectList but does not store addressing. ...
Mesh consisting of general polyhedral cells.
const T & second() const noexcept
Access the second element.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
const volScalarField & p0
const dimensionedScalar mp
Proton mass.
IOporosityModelList pZones(mesh)
const labelListList & globalEdgeTransformedSlaves() const
static constexpr const zero Zero
Global zero (0)