Go to the documentation of this file.
47 label nGlobalInsert = 0;
73 label elem = listA[i];
75 if (elem != global0 && elem != global1)
85 labelList result(listB.size() + nGlobalInsert + nInsert);
92 result[resultI++] = global0;
96 result[resultI++] = global1;
103 label elem = listB[i];
105 if (elem != global0 && elem != global1)
107 result[resultI++] = elem;
115 label elem = listA[i];
117 if (elem != global0 && elem != global1)
121 result[resultI++] = elem;
126 if (resultI != result.size())
144 for (
const label celli : cCells)
146 if (celli != globalI)
152 for (
const label celli : pGlobals)
154 if (celli != globalI)
160 cCells.setSize(set.
size()+1);
162 cCells[
n++] = globalI;
164 for (
const label seti : set)
175 isValidBFace.
setSize(
mesh().nBoundaryFaces(),
true);
179 if (pp.coupled() || isA<emptyPolyPatch>(pp))
184 isValidBFace[bFacei++] =
false;
202 nCoupled += pp.size();
212 label facei = pp.start();
216 coupledFaces[nCoupled++] = facei++;
235 const label exclude0,
236 const label exclude1,
247 label facei = faceLabels[i];
249 label globalOwn = globalNumbering().toGlobal(own[facei]);
250 if (globalOwn != exclude0 && globalOwn != exclude1)
252 globals.
insert(globalOwn);
255 if (
mesh().isInternalFace(facei))
257 label globalNei = globalNumbering().toGlobal(nei[facei]);
258 if (globalNei != exclude0 && globalNei != exclude1)
260 globals.
insert(globalNei);
267 if (isValidBFace[bFacei])
269 label globalI = globalNumbering().toGlobal
275 if (globalI != exclude0 && globalI != exclude1)
303 return globals.
toc();
312 globalNumbering_(mesh_.nCells()+mesh_.nBoundaryFaces())
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
label size() const noexcept
The number of elements in table.
const polyMesh & mesh() const
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.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
label nInternalFaces() const
Number of internal faces.
labelList calcFaceCells(const boolList &nonEmptyFace, const labelList &faceLabels, labelHashSet &globals) const
Collect cell neighbours of faces in global numbering.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
cellToCellStencil(const polyMesh &)
Construct from mesh.
void validBoundaryFaces(boolList &isValidBFace) const
Valid boundary faces (not empty and not coupled)
A patch is a list of labels that address the faces in the global face list.
virtual const labelList & faceOwner() const
Return face owner.
void transfer(List< T > &list)
A List with indirect addressing.
label findSortedIndex(const ListType &input, typename ListType::const_reference val, const label start=0)
errorManip< error > abort(error &err)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void clear()
Clear all entries from table.
autoPtr< indirectPrimitivePatch > allCoupledFacesPatch() const
Return patch of all coupled faces.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
const polyBoundaryMesh & patches
void setSize(const label newSize)
Alias for resize(const label)
virtual const labelList & faceNeighbour() const
Return face neighbour.
static void merge(const label global0, const label global1, const labelList &listA, labelList &listB)
Merge two lists.