41 #ifndef Foam_processorLODs_box 42 #define Foam_processorLODs_box 52 namespace processorLODs
76 static const label
FIXED;
124 const label refineIter,
125 const label nTgtObjects,
135 const label refineIter,
136 const label nSrcElem,
158 const label refineIter,
159 const label nSrcFaces,
168 const label nSrcElems,
169 const label nTgtElems,
186 const label maxObjectsPerLeaf,
187 const label nObjectsOfType,
188 const label nRefineIterMax = 100
193 virtual ~box() =
default;
void writeBoxes(const List< DynamicList< treeBoundBox >> &fixedBoxes, const label iter) const
Helper function to write the boxes in OBJ format.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label nRefineIterMax_
Maximum number of refinement iterations.
TypeName("box")
Runtime type information.
virtual treeBoundBox calcSrcBox(const label srcObji) const =0
The local boundBox associated with given source object.
List< labelList > newToOld_
Addressing per proc of new to old bound boxes.
List< List< treeBoundBox > > boxes_
Per processor, the list of src bound boxes.
static const label REFINE
Refine.
virtual ~box()=default
Destructor.
Base class to generate a parallel distribution map for sending sufficient target objects to cover a d...
bool doRefineBoxes(const label refineIter, const label nSrcFaces, const List< labelList > &refineFlags, List< DynamicList< treeBoundBox >> &fixedBoxes)
Apply the box refinements.
layoutTypes
The map layout (eg, of the constructMap)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
static const label nStartUpIter
Number of iterations before element indices are cached.
box(const UList< point > &srcPoints, const UList< point > &tgtPoints, const label maxObjectsPerLeaf, const label nObjectsOfType, const label nRefineIterMax=100)
Construct from list of points for source and target.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Creates the parallel distribution map by describing the source and target objects using box shapes...
void refineBox(const label boxi, const label refineIter, const label nSrcElem, const treeBoundBox &origBox, DynamicList< treeBoundBox > &procBoxes, DynamicList< labelList > &procBoxElems, DynamicList< label > &procNewToOld) const
List< List< labelList > > boxSrcElems_
Indices of elements in the src boxes.
const UList< point > & srcPoints_
Reference to the source points.
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.
autoPtr< mapDistribute > createMap(const label nSrcElems, const label nTgtElems, const mapDistributeBase::layoutTypes constructLayout)
Return the parallel distribution map (often linear construct order)
Standard boundBox with extra functionality for use in octree.
static const label FIXED
Fixed - do not touch.
static const label DROP
Drop/discard.
virtual treeBoundBox calcTgtBox(const label tgtObji) const =0
The local boundBox associated with given target object.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
const UList< point > & tgtPoints_
Reference to the target points.