36Foam::label Foam::advancingFrontAMI::calcOverlappingProcs
38 const List<treeBoundBoxList>& procBb,
39 const treeBoundBox& bb,
43 overlaps.setSize(procBb.size());
52 for (
const treeBoundBox& tbb: bbp)
56 overlaps[proci] =
true;
67void Foam::advancingFrontAMI::distributePatches
85 const labelList& sendElems = map.subMap()[domain];
87 if (sendElems.empty())
90 faces[domain].clear();
92 faceIDs[domain].clear();
101 Pout<<
"distributePatches: to processor " << domain
102 <<
" sending faces " << subPatch.faceCentres() <<
endl;
109 faces[domain] = subPatch.localFaces();
110 points[domain] = subPatch.localPoints();
119 << subPatch.localFaces()
120 << subPatch.localPoints()
126 pBufs.finishedSends();
132 const labelList& recvElems = map.constructMap()[domain];
146void Foam::advancingFrontAMI::distributeAndMergePatches
160 distributePatches(map, tgtPatch, gi, allFaces, allPoints, allTgtFaceIDs);
167 nFaces += allFaces[proci].size();
171 tgtFaces.setSize(nFaces);
173 tgtFaceIDs.setSize(nFaces);
184 for (
const face&
f : fcs)
186 face& newF = tgtFaces[nFaces++];
207 const labelList& faceIDs = allTgtFaceIDs[proci];
210 const faceList& fcs = allFaces[proci];
211 for (
const face&
f : fcs)
213 face& newF = tgtFaces[nFaces++];
243 Pout<<
"Merged from " << oldToNew.size()
244 <<
" down to " << tgtPoints.size() <<
" points" <<
endl;
247 for (
face&
f : tgtFaces)
255Foam::autoPtr<Foam::mapDistribute> Foam::advancingFrontAMI::calcProcMap
276 srcPatch.localFaces(),
277 srcPatch.localPoints(),
290 Info<<
"Determining extent of srcPatch per processor:" <<
nl
291 <<
"\tproc\tbb" <<
endl;
294 Info<<
'\t' << proci <<
'\t' << procBb[proci] <<
endl;
299 const faceList& faces = tgtPatch.localFaces();
313 if (faces[facei].size())
318 calcOverlappingProcs(procBb, faceBb, procBbOverlaps);
320 forAll(procBbOverlaps, proci)
322 if (procBbOverlaps[proci])
324 dynSendMap[proci].append(facei);
334 sendMap[proci].transfer(dynSendMap[proci]);
341 Pout<<
"Of my " << faces.size() <<
" I need to send to:" <<
nl
342 <<
"\tproc\tfaces" <<
endl;
345 Pout<<
'\t' << proci <<
'\t' << sendMap[proci].size() <<
endl;
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Templated tree of axis-aligned bounding boxes (AABB).
const List< treeBoundBox > & boundBoxes() const noexcept
Return the bounding boxes making up the tree.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
void clear()
Clear the list, i.e. set size to zero.
const Field< point_type > & points() const noexcept
Return reference to global points.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
static void allGatherList(UList< T > &values, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Gather data, but keep individual values separate. Uses MPI_Allgather or manual communication.
A non-owning sub-view of a List (allocated or unallocated storage).
Input inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
A List with indirect addressing. Like IndirectList but does not store addressing.
void size(const label n)
Older name for setAddressableSize.
Output inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static int & msgType() noexcept
Message tag of standard messages.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
static rangeType allProcs(const label communicator=worldComm)
Range of process indices for all processes.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
A face is a list of labels corresponding to mesh vertices.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
Class containing processor-to-processor mapping information.
Standard boundBox with extra functionality for use in octree.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Geometric merging of points. See below.
Namespace for handling debugging switches.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
List< treeBoundBox > treeBoundBoxList
A List of treeBoundBox.
messageStream Info
Information stream (stdout output on master, null elsewhere).
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
List< face > faceList
List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
vector point
Point is a vector.
List< bool > boolList
A List of bools.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
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...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.