36 template<
class>
class FaceList,
42 const scalar mergeDist,
53 gatheredPoints[Pstream::myProcNo()] = p.
points();
55 Pstream::gatherList(gatheredPoints);
57 if (Pstream::master())
65 mergedPoints = ListListOps::combine<Field<PointType>>
77 gatheredFaces[Pstream::myProcNo()] =
p;
78 Pstream::gatherList(gatheredFaces);
80 if (Pstream::master())
84 ListListOps::combineOffset<List<Face>>
95 if (Pstream::master())
129 template<
class FaceList>
133 const FaceList& localFaces,
145 typedef typename FaceList::value_type FaceType;
147 if (Pstream::parRun())
155 uniqueMeshPointLabels
160 if (Pstream::master())
171 mergedFaces.
setSize(globalFacesPtr().size());
172 mergedPoints.
setSize(globalPointsPtr().size());
175 label pOffset = globalPointsPtr().offset(Pstream::masterNo());
178 label fOffset = globalFacesPtr().offset(Pstream::masterNo());
183 for (
int slave=1; slave<Pstream::nProcs(); slave++)
185 IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
190 label pOffset = globalPointsPtr().offset(slave);
194 label fOffset = globalFacesPtr().offset(slave);
213 Pstream::commsTypes::scheduled,
215 myPoints.byteSize() + 4*
sizeof(
label)*myFaces.size()
217 toMaster << myPoints << myFaces;
223 uniqueMeshPointLabels = pointToGlobal;
228 mergedFaces = localFaces;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void inplaceRenumber(const labelUList &oldToNew, ListType &)
Inplace renumber the values of a list.
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
void size(const label)
Override size to be inconsistent with allocated storage.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
virtual const pointField & points() const
Return raw points.
Input inter-processor communications stream.
A list of faces which address into the list of points.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
vectorField pointField
pointField is a vectorField.
const Field< PointType > & points() const
Return reference to global points.
const globalMeshData & globalData() const
Return parallel info.
labelList subSizes(const List< T > &, AccessOp aop=accessOp< T >())
Gets sizes of sublists.
Output inter-processor communications stream.
void setSize(const label)
Reset size of List.
label mergePoints(const UList< Type > &points, const scalar mergeTol, const bool verbose, labelList &pointMap, const Type &origin=Type::zero)
Sorts and merges points. All points closer than/equal mergeTol get merged.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh consisting of general polyhedral cells.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.