33 template<
class FaceList,
class Po
intField>
36 const scalar mergeDist,
51 gatheredPoints[Pstream::myProcNo()] = p.
points();
53 Pstream::gatherList(gatheredPoints);
55 if (Pstream::master())
63 mergedPoints = ListListOps::combine<Field<PointType>>
75 gatheredFaces[Pstream::myProcNo()] =
p;
76 Pstream::gatherList(gatheredFaces);
78 if (Pstream::master())
82 ListListOps::combineOffset<List<FaceType>>
93 if (Pstream::master())
127 template<
class FaceList>
131 const FaceList& localFaces,
143 typedef typename FaceList::value_type FaceType;
145 if (Pstream::parRun())
153 uniqueMeshPointLabels
158 if (Pstream::master())
169 mergedFaces.
setSize(globalFacesPtr().size());
170 mergedPoints.
setSize(globalPointsPtr().size());
173 label pOffset = globalPointsPtr().offset(Pstream::masterNo());
176 label fOffset = globalFacesPtr().offset(Pstream::masterNo());
181 for (
int slave=1; slave<Pstream::nProcs(); slave++)
183 IPstream fromSlave(Pstream::commsTypes::scheduled, slave);
188 label pOffset = globalPointsPtr().offset(slave);
192 label fOffset = globalFacesPtr().offset(slave);
211 Pstream::commsTypes::scheduled,
213 myPoints.byteSize() + 4*
sizeof(
label)*myFaces.size()
215 toMaster << myPoints << myFaces;
221 uniqueMeshPointLabels = pointToGlobal;
226 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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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...
A List obtained as a section of another List.
vectorField pointField
pointField is a vectorField.
Pre-declare SubField and related Field type.
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.
std::remove_reference< FaceList >::type::value_type FaceType
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.
std::remove_reference< PointField >::type::value_type PointType
void transfer(List< T > &)
Transfer the contents of the argument List into this list.