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 69 oldPatchNMeshPoints_(0),
82 const label nOldPoints,
83 const label nOldFaces,
84 const label nOldCells,
100 const bool subFaceHasFlip,
101 const bool constructFaceHasFlip
104 nOldPoints_(nOldPoints),
105 nOldFaces_(nOldFaces),
106 nOldCells_(nOldCells),
110 pointMap_(mesh.
nPoints(), move(subPointMap), move(constructPointMap)),
115 move(constructFaceMap),
116 move(subFaceHasFlip),
119 cellMap_(mesh.
nCells(), move(subCellMap), move(constructCellMap)),
124 move(constructPatchMap)
134 const label nOldPoints,
135 const label nOldFaces,
136 const label nOldCells,
147 nOldPoints_(nOldPoints),
148 nOldFaces_(nOldFaces),
149 nOldCells_(nOldCells),
167 nOldPoints_(map.nOldPoints_),
168 nOldFaces_(map.nOldFaces_),
169 nOldCells_(map.nOldCells_),
170 oldPatchSizes_(move(map.oldPatchSizes_)),
171 oldPatchStarts_(move(map.oldPatchStarts_)),
172 oldPatchNMeshPoints_(move(map.oldPatchNMeshPoints_)),
173 pointMap_(move(map.pointMap_)),
174 faceMap_(move(map.faceMap_)),
175 cellMap_(move(map.cellMap_)),
176 patchMap_(move(map.patchMap_))
190 nOldPoints_ = rhs.nOldPoints_;
191 nOldFaces_ = rhs.nOldFaces_;
192 nOldCells_ = rhs.nOldCells_;
193 oldPatchSizes_.
transfer(rhs.oldPatchSizes_);
194 oldPatchStarts_.transfer(rhs.oldPatchStarts_);
195 oldPatchNMeshPoints_.
transfer(rhs.oldPatchNMeshPoints_);
208 createWithValues<boolList>
230 createWithValues<boolList>
252 createWithValues<boolList>
274 createWithValues<boolList>
293 void Foam::polyDistributionMap::operator=
298 nOldPoints_ = rhs.nOldPoints_;
299 nOldFaces_ = rhs.nOldFaces_;
300 nOldCells_ = rhs.nOldCells_;
301 oldPatchSizes_ = rhs.oldPatchSizes_;
302 oldPatchStarts_ = rhs.oldPatchStarts_;
303 oldPatchNMeshPoints_ = rhs.oldPatchNMeshPoints_;
304 pointMap_ = rhs.pointMap_;
305 faceMap_ = rhs.faceMap_;
306 cellMap_ = rhs.cellMap_;
307 patchMap_ = rhs.patchMap_;
313 nOldPoints_ = rhs.nOldPoints_;
314 nOldFaces_ = rhs.nOldFaces_;
315 nOldCells_ = rhs.nOldCells_;
316 oldPatchSizes_ = move(rhs.oldPatchSizes_);
317 oldPatchStarts_ = move(rhs.oldPatchStarts_);
318 oldPatchNMeshPoints_ = move(rhs.oldPatchNMeshPoints_);
319 pointMap_ = move(rhs.pointMap_);
320 faceMap_ = move(rhs.faceMap_);
321 cellMap_ = move(rhs.cellMap_);
322 patchMap_ = move(rhs.patchMap_);
330 is.
fatalCheck(
"operator>>(Istream&, polyDistributionMap&)");
332 is >> map.nOldPoints_
335 >> map.oldPatchSizes_
336 >> map.oldPatchStarts_
337 >> map.oldPatchNMeshPoints_
351 os << map.nOldPoints_
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void transfer(polyDistributionMap &)
Transfer the contents of the argument and annul the argument.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
polyDistributionMap()
Construct null.
const distributionMap & patchMap() const
Patch distribute map.
label nOldCells() const
Number of cells in mesh before distribution.
void distributePointIndices(labelList &pointIDs) const
Distribute list of point/face/cell/patch indices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
const distributionMap & cellMap() const
Cell distribute map.
const distributionMap & faceMap() const
Face distribute map.
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
void transfer(distributionMap &)
Transfer the contents of the argument and annul the argument.
const labelList & oldPatchStarts() const
List of the old patch start labels.
Istream & operator>>(Istream &, directionInfo &)
label nOldPoints() const
Number of points in mesh before distribution.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
label nOldFaces() const
Number of faces in mesh before distribution.
errorManip< error > abort(error &err)
void fatalCheck(const char *operation) const
Check IOstream status for given operation.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void distributeCellIndices(labelList &cellIDs) const
void distributePatchData(List< T > &lst) const
Distribute list of patch data.
void operator=(const polyDistributionMap &)
void distributeCellData(List< T > &lst) const
Distribute list of cell data.
label size() const
Return the number of elements in the UPtrList.
void distributeFaceData(List< T > &lst) const
Distribute list of face data.
void setSize(const label)
Reset size of List.
Class containing processor-to-processor mapping information.
Ostream & operator<<(Ostream &, const ensightPart &)
void distributePointData(List< T > &lst) const
Distribute list of point data.
Mesh consisting of general polyhedral cells.
const distributionMap & pointMap() const
Point distribute map.
void distributePatchIndices(labelList &patchIDs) const
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void distributeFaceIndices(labelList &faceIDs) const
const labelList & oldPatchNMeshPoints() const
List of numbers of mesh points per old patch.