36template<
class FaceList,
class Po
intField>
39 const scalar mergeDist,
64 (useLocal ?
pp.localPoints().size() :
pp.points().size())
69 faceAddr.
gather(
pp.localFaces(), mergedFaces);
70 pointAddr.
gather(
pp.localPoints(), mergedPoints);
75 pointAddr.
gather(
pp.points(), mergedPoints);
79 for (
const label proci : faceAddr.
subProcs())
91 label nPointsChanged(0);
100 pp.localPoints().size()
106 pp.boundaryPoints().size()
109 bndPointAddr.
gather(
pp.boundaryPoints(), boundaryPoints);
112 for (
const label proci : localPointAddr.
subProcs())
136 for (
auto&
f : mergedFaces)
144 pointMergeMap.
transfer(pointToUnique);
149 if (!nPointsChanged &&
notNull(pointMergeMap))
152 pointMergeMap =
identity(mergedPoints.size());
157template<
class FaceList,
class Po
intField>
160 const scalar mergeDist,
161 const PrimitivePatch<FaceList, PointField>&
pp,
174 globalIndex pointAddr;
175 globalIndex faceAddr;
191template<
class FaceList>
195 const FaceList& localFaces,
207 typedef typename FaceList::value_type FaceType;
212 globalPointsPtr =
mesh.globalData().mergePoints
217 uniqueMeshPointLabels
224 for (
auto&
f : myFaces)
232 globalPointsPtr().gather
237 globalFacesPtr().gather(myFaces, mergedFaces);
242 uniqueMeshPointLabels = pointToGlobal;
247 mergedFaces = localFaces;
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
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)
Transfer the contents of the argument List into this list and annul the argument list.
A HashTable to objects of type <T> with a label key.
A list of faces which address into the list of points.
std::remove_reference< PointField >::type::value_type point_type
The point type.
std::remove_reference< FaceList >::type::value_type face_type
The face type.
A non-owning sub-view of a List (allocated or unallocated storage).
void size(const label n)
Older name for setAddressableSize.
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
static void gather(const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &fld, UList< Type > &allFld, const int tag=UPstream::msgType(), UPstream::commsTypes commsType=UPstream::commsTypes::nonBlocking)
Collect data in processor order on master (== procIDs[0]).
void inplaceToGlobal(const label proci, labelUList &labels) const
From local to global index on proci (inplace).
labelRange range(label proci) const noexcept
Return start/size range of proci data.
labelRange subProcs() const noexcept
Range of process indices for addressed sub-offsets (processes).
void reset(label localSize, const label comm=UPstream::worldComm, const bool parallel=UPstream::parRun())
Reset from local size, using gather/broadcast with default/specified communicator if parallel.
Mesh consisting of general polyhedral cells.
virtual const pointField & points() const
Return raw points.
Geometric merging of points. See below.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
List< label > labelList
A List of labels.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
label inplaceMergePoints(PointList &points, const scalar mergeTol, const bool verbose, labelList &pointToUnique)
Inplace merge points, preserving the original point order. All points closer/equal mergeTol are to be...
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
vectorField pointField
pointField is a vectorField.
Dispatch tag: Construct 'one-sided' from local sizes, using gather but no broadcast.