39 nOldCells_(
mesh.nCells()),
41 pointsFromPointsMap_(),
43 facesFromPointsMap_(),
47 cellsFromPointsMap_(),
56 pointZoneMap_(
mesh.pointZones().size()),
57 faceZonePointMap_(
mesh.faceZones().size()),
58 faceZoneFaceMap_(
mesh.faceZones().size()),
59 cellZoneMap_(
mesh.cellZones().size()),
67 forAll(patchPointMap_, patchi)
70 oldPatchNMeshPoints_[patchi] =
nPoints;
76 forAll(pointZoneMap_, zonei)
81 forAll(faceZonePointMap_, zonei)
83 faceZonePointMap_[zonei] =
87 forAll(faceZoneFaceMap_, zonei)
92 forAll(cellZoneMap_, zonei)
102 const label nOldPoints,
103 const label nOldFaces,
104 const label nOldCells,
132 nOldPoints_(nOldPoints),
133 nOldFaces_(nOldFaces),
134 nOldCells_(nOldCells),
136 pointsFromPointsMap_(pointsFromPoints),
138 facesFromPointsMap_(facesFromPoints),
139 facesFromEdgesMap_(facesFromEdges),
140 facesFromFacesMap_(facesFromFaces),
142 cellsFromPointsMap_(cellsFromPoints),
143 cellsFromEdgesMap_(cellsFromEdges),
144 cellsFromFacesMap_(cellsFromFaces),
145 cellsFromCellsMap_(cellsFromCells),
146 reversePointMap_(reversePointMap),
147 reverseFaceMap_(reverseFaceMap),
148 reverseCellMap_(reverseCellMap),
149 flipFaceFlux_(flipFaceFlux),
150 patchPointMap_(patchPointMap),
151 pointZoneMap_(pointZoneMap),
152 faceZonePointMap_(faceZonePointMap),
153 faceZoneFaceMap_(faceZoneFaceMap),
154 cellZoneMap_(cellZoneMap),
155 preMotionPoints_(preMotionPoints),
156 oldPatchSizes_(oldPatchStarts.size()),
157 oldPatchStarts_(oldPatchStarts),
158 oldPatchNMeshPoints_(oldPatchNMeshPoints),
159 oldCellVolumesPtr_(oldCellVolumesPtr)
161 if (oldPatchStarts_.
size())
164 for (label patchi = 0; patchi < oldPatchStarts_.
size() - 1; patchi++)
166 oldPatchSizes_[patchi] =
167 oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi];
171 const label lastPatchID = oldPatchStarts_.
size() - 1;
173 oldPatchSizes_[lastPatchID] = nOldFaces_ - oldPatchStarts_[lastPatchID];
177 if (
min(oldPatchSizes_) < 0)
190 const label nOldPoints,
191 const label nOldFaces,
192 const label nOldCells,
221 nOldPoints_(nOldPoints),
222 nOldFaces_(nOldFaces),
223 nOldCells_(nOldCells),
224 pointMap_(pointMap, reuse),
225 pointsFromPointsMap_(pointsFromPoints, reuse),
227 facesFromPointsMap_(facesFromPoints, reuse),
228 facesFromEdgesMap_(facesFromEdges, reuse),
229 facesFromFacesMap_(facesFromFaces, reuse),
230 cellMap_(cellMap, reuse),
231 cellsFromPointsMap_(cellsFromPoints, reuse),
232 cellsFromEdgesMap_(cellsFromEdges, reuse),
233 cellsFromFacesMap_(cellsFromFaces, reuse),
234 cellsFromCellsMap_(cellsFromCells, reuse),
235 reversePointMap_(reversePointMap, reuse),
236 reverseFaceMap_(reverseFaceMap, reuse),
237 reverseCellMap_(reverseCellMap, reuse),
238 flipFaceFlux_(flipFaceFlux),
239 patchPointMap_(patchPointMap, reuse),
240 pointZoneMap_(pointZoneMap, reuse),
241 faceZonePointMap_(faceZonePointMap, reuse),
242 faceZoneFaceMap_(faceZoneFaceMap, reuse),
243 cellZoneMap_(cellZoneMap, reuse),
244 preMotionPoints_(preMotionPoints, reuse),
245 oldPatchSizes_(oldPatchStarts.size()),
246 oldPatchStarts_(oldPatchStarts, reuse),
247 oldPatchNMeshPoints_(oldPatchNMeshPoints, reuse),
253 oldCellVolumesPtr_ = std::move(oldCellVolumesPtr);
257 oldCellVolumesPtr_ = oldCellVolumesPtr.
clone();
260 if (oldPatchStarts_.
size() > 0)
263 for (label patchi = 0; patchi < oldPatchStarts_.
size() - 1; patchi++)
265 oldPatchSizes_[patchi] =
266 oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi];
270 const label lastPatchID = oldPatchStarts_.
size() - 1;
272 oldPatchSizes_[lastPatchID] = nOldFaces_ - oldPatchStarts_[lastPatchID];
276 if (
min(oldPatchSizes_) < 0)
279 <<
"Calculated negative old patch size."
280 <<
" Error in mapping data"
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of elements in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
autoPtr< T > clone(Args &&... args) const
Copy construct by invoking clone on underlying managed object.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const polyMesh & mesh() const
Return polyMesh.
Mesh consisting of general polyhedral cells.
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
const pointZoneMesh & pointZones() const noexcept
Return point zone mesh.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
#define forAll(list, i)
Loop across all elements in list.