Go to the documentation of this file.
36 template<
class FaceList,
class Po
intField>
39 const scalar mergeDist,
60 gi.
gather(
p.points(), mergedPoints);
62 pointSizes = gi.sizes();
69 gatheredFaces[Pstream::myProcNo()] =
p;
70 Pstream::gatherList(gatheredFaces);
72 if (Pstream::master())
76 ListListOps::combineOffset<List<FaceType>>
87 if (Pstream::master())
107 mergedPoints.transfer(newPoints);
110 for (
auto&
f : mergedFaces)
119 template<
class FaceList>
123 const FaceList& localFaces,
135 typedef typename FaceList::value_type FaceType;
137 if (Pstream::parRun())
140 globalPointsPtr =
mesh.globalData().mergePoints
145 uniqueMeshPointLabels
150 if (Pstream::master())
155 for (
auto&
f : myFaces)
161 mergedFaces.
setSize(globalFacesPtr().size());
162 mergedPoints.setSize(globalPointsPtr().size());
165 label pOffset = globalPointsPtr().offset(Pstream::masterNo());
166 SubList<point>(mergedPoints, myPoints.size(), pOffset) = myPoints;
168 label fOffset = globalFacesPtr().offset(Pstream::masterNo());
173 for (
int slave=1; slave<Pstream::nProcs(); slave++)
175 IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
180 label pOffset = globalPointsPtr().offset(slave);
184 label fOffset = globalFacesPtr().offset(slave);
194 for (
auto&
f : myFaces)
203 Pstream::commsTypes::scheduled,
205 myPoints.byteSize() + 4*
sizeof(label)*myFaces.size()
207 toMaster << myPoints << myFaces;
212 pointToGlobal =
identity(meshPoints.size());
213 uniqueMeshPointLabels = pointToGlobal;
218 mergedFaces = localFaces;
vectorField pointField
pointField is a vectorField.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
Output inter-processor communications stream.
A List obtained as a section of another List.
Mesh consisting of general polyhedral cells.
Generic templated field type.
std::remove_reference< PointField >::type::value_type point_type
The point type.
void transfer(List< T > &list)
Offset operator for ListListOps::combineOffset()
void inplaceRenumber(const labelUList &oldToNew, IntListType &lists)
Inplace renumber the values (not the indices) of a list of lists.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label mergePoints(const PointList &points, const scalar mergeTol, const bool verbose, labelList &pointMap, typename PointList::const_reference origin=PointList::value_type::zero)
Sorts and merges points. All points closer than/equal mergeTol get merged.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
std::remove_reference< FaceList >::type::value_type face_type
The face type.
Input inter-processor communications stream.
void setSize(const label newSize)
Alias for resize(const label)
A list of faces which address into the list of points.
static void gather(const labelUList &offsets, const label comm, const Container &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const Pstream::commsTypes commsType=Pstream::commsTypes::nonBlocking)
Collect data in processor order on master (== procIDs[0]).