44 label nGlobalInsert = 0;
70 label elem = listA[i];
72 if (elem != global0 && elem != global1)
89 result[resultI++] = global0;
93 result[resultI++] = global1;
100 label elem = listB[i];
102 if (elem != global0 && elem != global1)
104 result[resultI++] = elem;
112 label elem = listA[i];
114 if (elem != global0 && elem != global1)
118 result[resultI++] = elem;
123 if (resultI != result.
size())
143 if (cCells[i] != globalI)
151 if (pGlobals[i] != globalI)
159 cCells[
n++] = globalI;
163 cCells[
n++] = iter.key();
172 isValidBFace.
setSize(mesh().nFaces()-mesh().nInternalFaces(),
true);
178 if (pp.
coupled() || isA<emptyPolyPatch>(pp))
180 label bFacei = pp.
start()-mesh().nInternalFaces();
183 isValidBFace[bFacei++] =
false;
203 nCoupled += pp.
size();
219 coupledFaces[nCoupled++] = facei++;
239 void Foam::cellToCellStencil::unionEqOp::operator()
266 const label exclude0,
267 const label exclude1,
273 const labelList& own = mesh().faceOwner();
274 const labelList& nei = mesh().faceNeighbour();
278 label facei = faceLabels[i];
280 label globalOwn = globalNumbering().toGlobal(own[facei]);
281 if (globalOwn != exclude0 && globalOwn != exclude1)
283 globals.
insert(globalOwn);
286 if (mesh().isInternalFace(facei))
288 label globalNei = globalNumbering().toGlobal(nei[facei]);
289 if (globalNei != exclude0 && globalNei != exclude1)
291 globals.
insert(globalNei);
296 label bFacei = facei-mesh().nInternalFaces();
298 if (isValidBFace[bFacei])
300 label globalI = globalNumbering().toGlobal
306 if (globalI != exclude0 && globalI != exclude1)
334 return globals.
toc();
343 globalNumbering_(mesh_.nCells()+mesh_.nFaces()-mesh_.nInternalFaces())
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
bool insert(const Key &key)
Insert a new entry.
List< Key > toc() const
Return the table of contents.
label size() const
Return number of elements in table.
void clear()
Clear all entries from table.
A List with indirect addressing.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
label size() const
Return the number of elements in the UList.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
autoPtr< indirectPrimitivePatch > allCoupledFacesPatch() const
Return patch of all coupled faces.
void validBoundaryFaces(boolList &isValidBFace) const
Valid boundary faces (not empty and not coupled)
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.
static void merge(const label global0, const label global1, const labelList &listA, labelList &listB)
Merge two lists.
cellToCellStencil(const polyMesh &)
Construct from mesh.
labelList calcFaceCells(const boolList &nonEmptyFace, const labelList &faceLabels, labelHashSet &globals) const
Collect cell neighbours of faces in global numbering.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
virtual bool coupled() const
Return true if this patch is geometrically coupled (i.e. faces and.
label start() const
Return start label of this patch in the polyMesh face list.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvPatchList & patches
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
label findSortedIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element in sorted list and return index,.