Go to the documentation of this file.
41 #ifndef processorLODs_box
42 #define processorLODs_box
53 namespace processorLODs
71 static const label
DROP;
77 static const label
FIXED;
122 const label refineIter,
123 const label nTgtObjects,
133 const label refineIter,
134 const label nSrcElem,
156 const label refineIter,
157 const label nSrcFaces,
164 const label nSrcElems,
165 const label nTgtElems
185 const label maxObjectsPerLeaf,
186 const label nObjectsOfType,
187 const label nRefineIterMax = 100
191 virtual ~box() =
default;
box(const UList< point > &srcPoints, const UList< point > &tgtPoints, const label maxObjectsPerLeaf, const label nObjectsOfType, const label nRefineIterMax=100)
Construct from list of points.
static const label nStartUpIter
Number of iterations before element indices are cached.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
virtual boundBox calcTgtBox(const label tgtObji) const =0
Standard boundBox with extra functionality for use in octree.
virtual boundBox calcSrcBox(const label srcObji) const =0
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.
static const label DROP
Drop/discard.
static const label FIXED
Fixed - do not touch.
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.
Creates the parallel distribution map by describing the source and target objects using box shapes.
const UList< point > & tgtPoints_
Reference to the target points.
autoPtr< mapDistribute > createMap(const label nSrcElems, const label nTgtElems)
Base class to generate a parallel distribution map for sending sufficient target objects to cover a d...
void writeBoxes(const List< DynamicList< treeBoundBox >> &fixedBoxes, const label iter) const
Helper function to write the boxes in OBJ format.
List< List< treeBoundBox > > boxes_
Per processor, the list of src bound boxes.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
label nRefineIterMax_
Maximum number of refinement iterations.
TypeName("box")
Runtime type information.
static const label REFINE
Refine.
List< labelList > newToOld_
Addressing per proc of new to old bound boxes.
virtual ~box()=default
Destructor.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A bounding box defined in terms of min/max extrema points.
bool doRefineBoxes(const label refineIter, const label nSrcFaces, const List< labelList > &refineFlags, List< DynamicList< treeBoundBox >> &fixedBoxes)
Apply the box refinements.
autoPtr< mapDistribute > createLODMap(List< labelList > &sendElems) const
Use the current list of send elements to create the mapDistribute.