32 void Foam::polyDistributionMap::calcPatchSizes()
34 oldPatchSizes_.
setSize(oldPatchStarts_.size());
36 if (oldPatchStarts_.size())
46 const label lastPatchID = oldPatchStarts_.size() - 1;
48 oldPatchSizes_[lastPatchID] = nOldFaces_ - oldPatchStarts_[lastPatchID];
50 if (
min(oldPatchSizes_) < 0)
53 <<
"Calculated negative old patch size:" << oldPatchSizes_ <<
nl
67 const label nOldPoints,
68 const label nOldFaces,
69 const label nOldCells,
85 const bool subFaceHasFlip,
86 const bool constructFaceHasFlip
90 nOldPoints_(nOldPoints),
91 nOldFaces_(nOldFaces),
92 nOldCells_(nOldCells),
93 oldPatchSizes_(oldPatchStarts.size()),
94 oldPatchStarts_(move(oldPatchStarts)),
95 oldPatchNMeshPoints_(move(oldPatchNMeshPoints)),
96 pointMap_(mesh.
nPoints(), move(subPointMap), move(constructPointMap)),
101 move(constructFaceMap),
102 move(subFaceHasFlip),
105 cellMap_(mesh.nCells(), move(subCellMap), move(constructCellMap)),
108 mesh.boundaryMesh().size(),
110 move(constructPatchMap)
124 createWithValues<boolList>
134 distributePointData(isSelected);
146 createWithValues<boolList>
156 distributeFaceData(isSelected);
168 createWithValues<boolList>
178 distributeCellData(isSelected);
190 createWithValues<boolList>
192 oldPatchStarts().size(),
200 distributePatchData(isSelected);
void setSize(const label)
Reset size of List.
polyDistributionMap(const polyMesh &mesh, const label nOldPoints, const label nOldFaces, const label nOldCells, labelList &&oldPatchStarts, labelList &&oldPatchNMeshPoints, labelListList &&subPointMap, labelListList &&subFaceMap, labelListList &&subCellMap, labelListList &&subPatchMap, labelListList &&constructPointMap, labelListList &&constructFaceMap, labelListList &&constructCellMap, labelListList &&constructPatchMap, const bool subFaceHasFlip=false, const bool constructFaceHasFlip=false)
Move constructor from components.
void distributePatchIndices(labelList &patchIDs) const
Distribute list of patch indices.
void distributePointIndices(labelList &pointIDs) const
Distribute list of point indices.
void distributeFaceIndices(labelList &faceIDs) const
Distribute list of face indices.
void distributeCellIndices(labelList &cellIDs) const
Distribute list of cell indices.
Mesh consisting of general polyhedral cells.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
errorManip< error > abort(error &err)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)