Creates the parallel distribution map by describing the source and target objects using box shapes. More...
Public Member Functions | |
TypeName ("box") | |
Runtime type information. More... | |
box (const UList< point > &srcPoints, const UList< point > &tgtPoints, const label maxObjectsPerLeaf, const label nObjectsOfType, const label nRefineIterMax=100) | |
Construct from list of points. More... | |
virtual | ~box ()=default |
Destructor. More... | |
Public Member Functions inherited from processorLOD | |
TypeName ("processorLOD") | |
Runtime type information. More... | |
processorLOD (const label maxObjectsPerLeaf, const label nObjectsOfType) | |
Construct from components. More... | |
virtual | ~processorLOD ()=default |
Destructor. More... | |
virtual autoPtr< mapDistribute > | map ()=0 |
Return the parallel distribution map. More... | |
Protected Member Functions | |
void | writeBoxes (const List< DynamicList< treeBoundBox >> &fixedBoxes, const label iter) const |
Helper function to write the boxes in OBJ format. More... | |
virtual boundBox | calcSrcBox (const label srcObji) const =0 |
virtual boundBox | calcTgtBox (const label tgtObji) const =0 |
void | setRefineFlags (const label refineIter, const label nTgtObjects, List< labelHashSet > &fixedSendElems, List< List< labelList >> &localTgtElems, List< labelList > &refineFlags, labelList &nElems) const |
Set the box refinement flags. More... | |
void | refineBox (const label boxi, const label refineIter, const label nSrcElem, const treeBoundBox &origBox, DynamicList< treeBoundBox > &procBoxes, DynamicList< labelList > &procBoxElems, DynamicList< label > &procNewToOld) const |
void | refineBox (const label boxi, const labelList &srcAddr, const treeBoundBox &origBox, DynamicList< treeBoundBox > &procBoxes, DynamicList< labelList > &procBoxElems, DynamicList< label > &procNewToOld) const |
bool | doRefineBoxes (const label refineIter, const label nSrcFaces, const List< labelList > &refineFlags, List< DynamicList< treeBoundBox >> &fixedBoxes) |
Apply the box refinements. More... | |
autoPtr< mapDistribute > | createMap (const label nSrcElems, const label nTgtElems) |
autoPtr< mapDistribute > | createLODMap (List< labelList > &sendElems) const |
Use the current list of send elements to create the mapDistribute. More... | |
Protected Attributes | |
const UList< point > & | srcPoints_ |
Reference to the source points. More... | |
const UList< point > & | tgtPoints_ |
Reference to the target points. More... | |
List< List< treeBoundBox > > | boxes_ |
Per processor, the list of src bound boxes. More... | |
label | nRefineIterMax_ |
Maximum number of refinement iterations. More... | |
List< labelList > | newToOld_ |
Addressing per proc of new to old bound boxes. More... | |
List< List< labelList > > | boxSrcElems_ |
Indices of elements in the src boxes. More... | |
Protected Attributes inherited from processorLOD | |
label | maxObjectsPerLeaf_ |
Maximum number of objects per leaf. More... | |
label | nObjectsOfType_ |
Static Protected Attributes | |
static const label | DROP = 0 |
Drop/discard. More... | |
static const label | REFINE = 1 |
Refine. More... | |
static const label | FIXED = 2 |
Fixed - do not touch. More... | |
static const label | nStartUpIter = 2 |
Number of iterations before element indices are cached. More... | |
Creates the parallel distribution map by describing the source and target objects using box shapes.
A single box is created for the source object, which is then split using 2x2x2 refinement based on the number of remote target objects that overlap. The refinement is local between communicating processor pairs, where the refinement continues until a threshold number of remote target objects per source box is achieved.
box | ( | const UList< point > & | srcPoints, |
const UList< point > & | tgtPoints, | ||
const label | maxObjectsPerLeaf, | ||
const label | nObjectsOfType, | ||
const label | nRefineIterMax = 100 |
||
) |
Construct from list of points.
Definition at line 596 of file box.C.
References DynamicList< T, SizeMin >::append(), forAll, boundBox::inflate(), and List< T >::transfer().
|
virtualdefault |
Destructor.
|
protected |
Helper function to write the boxes in OBJ format.
Definition at line 49 of file box.C.
References f(), treeBoundBox::faces, forAll, Foam::name(), Foam::nl, os(), p, treeBoundBox::points(), and Foam::meshTools::writeOBJ().
|
protectedpure virtual |
Implemented in faceBox.
|
protectedpure virtual |
Implemented in faceBox.
|
protected |
Set the box refinement flags.
Definition at line 102 of file box.C.
References DynamicList< T, SizeMin >::append(), PstreamBuffers::finishedSends(), forAll, Foam::identity(), Foam::readLabel(), List< T >::setSize(), and List< T >::transfer().
|
protected |
Definition at line 224 of file box.C.
References DynamicList< T, SizeMin >::append(), and treeBoundBox::subBbox().
|
protected |
Definition at line 282 of file box.C.
References DynamicList< T, SizeMin >::append(), and treeBoundBox::subBbox().
|
protected |
Apply the box refinements.
Definition at line 319 of file box.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, PstreamBuffers::finishedSends(), forAll, and Foam::returnReduce().
|
protected |
Definition at line 424 of file box.C.
References List< T >::append(), List< T >::clear(), Foam::expressions::patchExpr::debug, Foam::endl(), forAll, Foam::identity(), HashSet< Key, Hash >::insert(), Foam::nl, Foam::Pout, Foam::tab, and Foam::Zero.
Referenced by faceBox::map().
|
protected |
Use the current list of send elements to create the mapDistribute.
Definition at line 541 of file box.C.
References forAll, Foam::identity(), and List< T >::setSize().
TypeName | ( | "box" | ) |
Runtime type information.
|
staticprotected |
|
protected |
Per processor, the list of src bound boxes.
Note: using treeBoundBox to take advantage of subBbox() method
|
protected |
|
staticprotected |