46 label nGlobalInsert = 0;
72 label elem = listA[i];
74 if (elem != global0 && elem != global1)
91 result[resultI++] = global0;
95 result[resultI++] = global1;
102 label elem = listB[i];
104 if (elem != global0 && elem != global1)
106 result[resultI++] = elem;
114 label elem = listA[i];
116 if (elem != global0 && elem != global1)
120 result[resultI++] = elem;
125 if (resultI != result.size())
143 for (
const label celli : cCells)
145 if (celli != globalI)
151 for (
const label celli : pGlobals)
153 if (celli != globalI)
159 cCells.setSize(
set.size()+1);
161 cCells[
n++] = globalI;
163 for (
const label seti :
set)
174 isValidBFace.
setSize(
mesh().nBoundaryFaces(),
true);
178 if (
pp.coupled() || isA<emptyPolyPatch>(
pp))
183 isValidBFace[bFacei++] =
false;
201 nCoupled +=
pp.size();
211 label facei =
pp.start();
215 coupledFaces[nCoupled++] = facei++;
234 const label exclude0,
235 const label exclude1,
248 label globalOwn = globalNumbering().toGlobal(own[facei]);
249 if (globalOwn != exclude0 && globalOwn != exclude1)
251 globals.
insert(globalOwn);
254 if (
mesh().isInternalFace(facei))
256 label globalNei = globalNumbering().toGlobal(nei[facei]);
257 if (globalNei != exclude0 && globalNei != exclude1)
259 globals.
insert(globalNei);
266 if (isValidBFace[bFacei])
268 label globalI = globalNumbering().toGlobal
274 if (globalI != exclude0 && globalI != exclude1)
302 return globals.toc();
311 globalNumbering_(mesh_.nCells()+mesh_.nBoundaryFaces())
static void merge(const label global0, const label global1, const labelList &listA, labelList &listB)
Merge two lists.
void size(const label n)
Older name for setAddressableSize.
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const labelList & faceNeighbour() const
Return face neighbour.
label findSortedIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
Binary search to find the index of the last element in a sorted list that is less than value...
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
labelList faceLabels(nFaceLabels)
#define forAll(list, i)
Loop across all elements in list.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
void clear()
Clear the list, i.e. set size to zero.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
void sort(UList< T > &list)
Sort the list.
virtual const labelList & faceOwner() const
Return face owner.
label nInternalFaces() const noexcept
Number of internal faces.
errorManip< error > abort(error &err)
void validBoundaryFaces(boolList &isValidBFace) const
Valid boundary faces (not empty and not coupled)
void setSize(const label newLen)
Same as resize()
labelList calcFaceCells(const boolList &nonEmptyFace, const labelList &faceLabels, labelHashSet &globals) const
Collect cell neighbours of faces in global numbering.
const polyBoundaryMesh & patches
cellToCellStencil(const polyMesh &)
Construct from mesh.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void insertFaceCells(const label exclude0, const label exclude1, const boolList &nonEmptyFace, const labelList &faceLabels, labelHashSet &globals) const
Collect cell neighbours of faces in global numbering.
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
List< bool > boolList
A List of bools.
autoPtr< indirectPrimitivePatch > allCoupledFacesPatch() const
Return patch of all coupled faces.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())