34 void Foam::mapDistributePolyMesh::calcPatchSizes()
36 oldPatchSizes_.
setSize(oldPatchStarts_.size());
38 if (oldPatchStarts_.size())
41 for (label patchi = 0; patchi < oldPatchStarts_.size() - 1; patchi++)
43 oldPatchSizes_[patchi] =
44 oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi];
48 const label lastPatchID = oldPatchStarts_.size() - 1;
50 oldPatchSizes_[lastPatchID] = nOldFaces_ - oldPatchStarts_[lastPatchID];
52 if (
min(oldPatchSizes_) < 0)
55 <<
"Calculated negative old patch size:" << oldPatchSizes_ <<
nl
71 oldPatchNMeshPoints_(0),
95 const label nOldPoints,
96 const label nOldFaces,
97 const label nOldCells,
113 const bool subFaceHasFlip,
114 const bool constructFaceHasFlip
117 nOldPoints_(nOldPoints),
118 nOldFaces_(nOldFaces),
119 nOldCells_(nOldCells),
120 oldPatchSizes_(oldPatchStarts.size()),
121 oldPatchStarts_(std::move(oldPatchStarts)),
122 oldPatchNMeshPoints_(std::move(oldPatchNMeshPoints)),
126 std::move(subPointMap),
127 std::move(constructPointMap)
132 std::move(subFaceMap),
133 std::move(constructFaceMap),
140 std::move(subCellMap),
141 std::move(constructCellMap)
146 std::move(subPatchMap),
147 std::move(constructPatchMap)
157 const label nOldPoints,
158 const label nOldFaces,
159 const label nOldCells,
170 nOldPoints_(nOldPoints),
171 nOldFaces_(nOldFaces),
172 nOldCells_(nOldCells),
173 oldPatchSizes_(oldPatchStarts.size()),
174 oldPatchStarts_(std::move(oldPatchStarts)),
175 oldPatchNMeshPoints_(std::move(oldPatchNMeshPoints)),
176 pointMap_(std::move(pointMap)),
178 cellMap_(std::move(cellMap)),
179 patchMap_(std::move(patchMap))
195 nOldPoints_ = rhs.nOldPoints_;
196 nOldFaces_ = rhs.nOldFaces_;
197 nOldCells_ = rhs.nOldCells_;
198 oldPatchSizes_.transfer(rhs.oldPatchSizes_);
199 oldPatchStarts_.transfer(rhs.oldPatchStarts_);
200 oldPatchNMeshPoints_.transfer(rhs.oldPatchNMeshPoints_);
201 pointMap_.transfer(rhs.pointMap_);
202 faceMap_.transfer(rhs.faceMap_);
203 cellMap_.transfer(rhs.cellMap_);
204 patchMap_.transfer(rhs.patchMap_);
217 ListOps::createWithValue<bool>(nOldPoints(), lst,
true,
false)
221 distributePointData(isSelected);
233 ListOps::createWithValue<bool>(nOldFaces(), lst,
true,
false)
237 distributeFaceData(isSelected);
249 ListOps::createWithValue<bool>(nOldCells(), lst,
true,
false)
253 distributeCellData(isSelected);
265 ListOps::createWithValue<bool>
267 oldPatchStarts().size(),
275 distributePatchData(isSelected);
286 nOldPoints_ = rhs.nOldPoints_;
287 nOldFaces_ = rhs.nOldFaces_;
288 nOldCells_ = rhs.nOldCells_;
289 oldPatchSizes_ = rhs.oldPatchSizes_;
290 oldPatchStarts_ = rhs.oldPatchStarts_;
291 oldPatchNMeshPoints_ = rhs.oldPatchNMeshPoints_;
292 pointMap_ = rhs.pointMap_;
293 faceMap_ = rhs.faceMap_;
294 cellMap_ = rhs.cellMap_;
295 patchMap_ = rhs.patchMap_;
311 is >> map.nOldPoints_
314 >> map.oldPatchSizes_
315 >> map.oldPatchStarts_
316 >> map.oldPatchNMeshPoints_
330 os << map.nOldPoints_