36template<
class FaceList,
class Po
intField>
39 const scalar mergeDist,
72 faceAddr.
gather(pp, mergedFaces);
77 for (
const label proci : faceAddr.
subProcs())
89 label nPointsChanged(0);
110 for (
const label proci : localPointAddr.
subProcs())
134 for (
auto&
f : mergedFaces)
142 pointMergeMap.
transfer(pointToUnique);
147 if (!nPointsChanged &&
notNull(pointMergeMap))
150 pointMergeMap =
identity(mergedPoints.size());
155template<
class FaceList>
159 const FaceList& localFaces,
171 typedef typename FaceList::value_type FaceType;
181 uniqueMeshPointLabels
188 for (
auto&
f : myFaces)
196 globalPointsPtr().gather
201 globalFacesPtr().gather(myFaces, mergedFaces);
206 uniqueMeshPointLabels = pointToGlobal;
211 mergedFaces = localFaces;
Generic templated field type.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< T > &list)
A HashTable to objects of type <T> with a label key.
A list of faces which address into the list of points.
const Field< point_type > & localPoints() const
Return pointField of points in patch.
std::remove_reference< PointField >::type::value_type point_type
The point type.
const Field< point_type > & points() const noexcept
Return reference to global points.
const labelList & boundaryPoints() const
Return list of boundary points, address into LOCAL point list.
std::remove_reference< FaceList >::type::value_type face_type
The face type.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
A List obtained as a section of another List.
void size(const label n)
Older name for setAddressableSize.
static bool & parRun() noexcept
Test if this a parallel run.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void reset(autoPtr< T > &&other) noexcept
Delete managed object and set to new given pointer.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
labelRange range() const
Return start/size range of local processor data.
static void gather(const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const UPstream::commsTypes=UPstream::commsTypes::nonBlocking)
Collect data in processor order on master (== procIDs[0]).
void inplaceToGlobal(labelUList &labels) const
From local to global index (inplace)
labelRange subProcs() const noexcept
Range of process indices for addressed sub-offsets (processes)
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
Mesh consisting of general polyhedral cells.
const globalMeshData & globalData() const
Return parallel info.
virtual const pointField & points() const
Return raw points.
splitCell * master() const
Geometric merging of points. See below.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values (not the indices) of a list.
vectorField pointField
pointField is a vectorField.
bool notNull(const T *ptr)
True if ptr is not a pointer (of type T) to the nullObject.
label inplaceMergePoints(PointList &points, const scalar mergeTol, const bool verbose, labelList &pointToUnique)