Go to the documentation of this file.
58 std::map<label, labelLongList> exchangeData;
61 exchangeData.insert(std::make_pair(neiProcs[i],
labelLongList()));
73 const label bpI = selNodes[i];
75 selectedNode[bpI] =
true;
79 const label neiProc = bpAtProcs(bpI, procI);
83 exchangeData[neiProc].append(globalPointLabel[bpI]);
93 if( !selectedNode[globalToLocal[receivedData[i]]] )
95 selectedNode[globalToLocal[receivedData[i]]] =
true;
98 globalToLocal[receivedData[i]]
109 std::map<label, LongList<parMapperHelper> > exchangeData;
127 const label bpI = parN[i].globalLabel();
128 bpToList.insert(bpI, i);
132 const label neiProc = bpAtProcs(bpI, procI);
136 exchangeData[neiProc].append
141 parN[i].movingDistance(),
142 globalPointLabel[bpI],
204 Info <<
"Mapping vertices onto surface" <<
endl;
212 Info <<
"Finished mapping vertices onto surface" <<
endl;
229 # pragma omp parallel for if( size > 1000 ) shared(parallelBndNodes) \
230 schedule(dynamic, Foam::max(1, size / (3 * omp_get_max_threads())))
234 const label bpI = nodesToMap[i];
237 Info <<
nl <<
"Mapping vertex " << bpI <<
" with coordinates "
251 points[boundaryPoints[bpI]]
256 if( bpAtProcsPtr && bpAtProcsPtr->
sizeOfRow(bpI) )
259 # pragma omp critical
287 Info <<
"Mapping vertices with respect to surface patches" <<
endl;
295 Info <<
"Finished mapping vertices with respect to surface patches" <<
endl;
308 boolList treatedPoint(surfaceEngine_.boundaryPoints().size(),
false);
314 if( cornerPoints.
found(nodesToMap[i]) )
316 treatedPoint[nodesToMap[i]] =
true;
317 selectedCorners.
append(nodesToMap[i]);
319 else if( edgePoints.
found(nodesToMap[i]) )
321 treatedPoint[nodesToMap[i]] =
true;
322 selectedEdges.
append(nodesToMap[i]);
327 const labelList& bPoints = surfaceEngine_.boundaryPoints();
332 bpAtProcsPtr = &surfaceEngine_.bpAtProcs();
339 # pragma omp parallel for if( size > 1000 ) shared(parallelBndNodes) \
340 schedule(dynamic, Foam::max(1, size / (3 * omp_get_max_threads())))
344 const label bpI = nodesToMap[nI];
346 if( treatedPoint[bpI] )
353 meshOctree_.findNearestSurfacePointInRegion
358 pointPatches(bpI, 0),
364 if( bpAtProcsPtr && bpAtProcsPtr->
sizeOfRow(bpI) )
367 # pragma omp critical
390 mapToSmallestDistance(parallelBndNodes);
396 mapEdgeNodes(selectedEdges);
399 mapCorners(selectedCorners);
const VRWGraph & bpAtProcs() const
processors which contain the vertex
void append(const T &e)
Append an element at the end of the list.
const meshSurfaceEngine & surfaceEngine_
mesh surface
label globalLabel() const
return global label
#define forAll(list, i)
Loop across all elements in list.
const labelList & globalBoundaryPointLabel() const
global boundary point label
Template functions to aid in the implementation of demand driven data.
void findNearestSurfacePoint(point &nearest, scalar &distSq, label &nearestTriangle, label ®ion, const point &p) const
find nearest surface point for vertex and its region
static bool & parRun()
Is this a parallel run?
const DynList< label > & bpNeiProcs() const
communication matrix for sending point data
Ostream & endl(Ostream &os)
Add newline and flush stream.
label size() const
Size of the active part of the list.
Basic pointPatch represents a set of points from the mesh.
const VRWGraph & pointPatches() const
const scalar & movingDistance() const
return moving distance
void mapToSmallestDistance(LongList< parMapperHelper > &)
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 moveBoundaryVertexNoUpdate(const label bpI, const point &newP)
relocate the selected boundary vertex
void mapNodeToPatch(const label bpI, const label patchI=-1)
label size() const
Returns the number of rows.
#define forAllRow(graph, rowI, index)
void moveBoundaryVertex(const label bpI, const point &newP)
relocate the selected boundary vertex and update geometry data
const pointFieldPMG & points() const
PtrList< coordinateSystem > coordinates(solidRegions.size())
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
bool found(const Key &) const
Return true if hashedEntry is found in table.
void mapVerticesOntoSurfacePatches()
void updateGeometry(const labelLongList &)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
const point & coordinates() const
return point coordinates
const labelHashSet & edgePoints() const
return labels of edge points (from the list of boundary points)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void selectNodesAtParallelBnd(const labelLongList &)
check if nodes at parallel boundaries are selected at all processors
void exchangeMap(const std::map< label, ListType > &m, LongList< T > &data, const Pstream::commsTypes commsType)
const labelList & boundaryPoints() const
void mapVerticesOntoSurface()
const Map< label > & globalToLocalBndPointAddressing() const
global point label to local label. Only for processors points
void size(const label)
Override size to be inconsistent with allocated storage.
void findNearestSurfacePointInRegion(point &nearest, scalar &distSq, label &nearestTriangle, const label region, const point &p) const
find nearest surface point for vertex in a given region
const labelHashSet & corners() const
return labels of corner points (from the list of boundary points)
LongList< label > labelLongList
const meshOctree & meshOctree_
reference to the octree