79 const labelList& polyMeshSharedPointLabels =
82 const labelList& polyMeshSharedPointAddr =
89 forAll(mesh_.boundary(), patchI)
91 const faPatch& fap = mesh_.boundary()[patchI];
93 if (isA<processorFaPatch>(fap))
97 forAll(localPointLabels, pointI)
100 mesh_.patch().meshPoints()[localPointLabels[pointI]];
102 const label sharedPolyMeshPoint =
103 polyMeshSharedPointLabels.
find(polyMeshPoint);
107 sharedPolyMeshPoint != -1
108 && !sharedPointLabels.
found(localPointLabels[pointI])
111 globalList[polyMeshSharedPointAddr[sharedPolyMeshPoint]]
114 sharedPointLabels.
insert(localPointLabels[pointI]);
120 sharedPointLabels_ = sharedPointLabels.
toc();
125 for (label i=0; i<globalList.size(); ++i)
127 if (globalList[i] > 0)
129 globalList[i] = ++nGlobalPoints_;
133 sharedPointAddr_.setSize(sharedPointLabels_.size());
134 forAll(sharedPointAddr_, pointI)
136 const label polyMeshSharedPointIndex =
137 polyMeshSharedPointLabels.
find 139 mesh_.patch().meshPoints()[sharedPointLabels_[pointI]]
142 sharedPointAddr_[pointI] =
143 globalList[polyMeshSharedPointAddr[polyMeshSharedPointIndex]]
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
bool found(const Key &key) const
Same as contains()
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
const labelList & pointLabels() const
Return patch point labels.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
const faMesh & mesh() const noexcept
Return mesh reference.
#define forAll(list, i)
Loop across all elements in list.
~faGlobalMeshData()
Destructor.
label nGlobalPoints() const
Return number of globally shared points.
faGlobalMeshData(const faGlobalMeshData &)=delete
No copy construct.
static void combineReduce(T &value, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) applying cop to inplace combine value from different processors...
const globalMeshData & globalData() const
Return parallel info (demand-driven)
label find(const T &val) const
Find index of the first occurrence of the value.
Determines/represents processor-processor connection. After instantiation contains the processor-proc...
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Define the processor-processor connection table by walking a list of patches and detecting the proces...
void updateMesh()
Change global mesh data given a topological change.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points list.
Inter-processor communications stream.
const polyMesh & mesh() const noexcept
Return the mesh reference.
static constexpr const zero Zero
Global zero (0)