cellBox Class Reference

Creates the parallel distribution map by describing the source and target objects using box shapes. More...

Inheritance diagram for cellBox:
Collaboration diagram for cellBox:

Public Member Functions

 TypeName ("box")
 Runtime type information. More...
 
 cellBox (const cellList &srcCells, const faceList &srcFaces, const UList< point > &srcPoints, const cellList &tgtCells, const faceList &tgtFaces, const UList< point > &tgtPoints, const label maxObjectsPerLeaf, const label nObjectsOfType, const label nRefineIterMax=100)
 Construct from list of points/faces/cells for source and target. More...
 
virtual ~cellBox ()=default
 Destructor. More...
 
virtual autoPtr< mapDistributemap (const mapDistributeBase::layoutTypes constructLayout)
 Return the parallel distribution map (usually linear construct order) More...
 
- Public Member Functions inherited from faceBox
 TypeName ("box")
 Runtime type information. More...
 
 faceBox (const faceList &srcFaces, const UList< point > &srcPoints, const faceList &tgtFaces, const UList< point > &tgtPoints, const label maxObjectsPerLeaf, const label nObjectsOfType, const label nRefineIterMax=100)
 Construct from list of points/faces for source and target. More...
 
virtual ~faceBox ()=default
 Destructor. More...
 
- Public Member Functions inherited from box
 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 for source and target. 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) noexcept
 Construct from components. More...
 
virtual ~processorLOD ()=default
 Destructor. More...
 

Protected Member Functions

virtual treeBoundBox calcSrcBox (const label srcObji) const
 The local boundBox associated with given source object. More...
 
virtual treeBoundBox calcTgtBox (const label tgtObji) const
 The local boundBox associated with given target object. More...
 
- Protected Member Functions inherited from box
void writeBoxes (const List< DynamicList< treeBoundBox >> &fixedBoxes, const label iter) const
 Helper function to write the boxes in OBJ format. More...
 
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< mapDistributecreateMap (const label nSrcElems, const label nTgtElems, const mapDistributeBase::layoutTypes constructLayout)
 Return the parallel distribution map (often linear construct order) More...
 

Protected Attributes

const cellListsrcCells_
 Reference to the source cell list. More...
 
const cellListtgtCells_
 Reference to the target cell list. More...
 
- Protected Attributes inherited from faceBox
const faceListsrcFaces_
 Reference to the source face list. More...
 
const faceListtgtFaces_
 Reference to the target face list. More...
 
- Protected Attributes inherited from box
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< labelListnewToOld_
 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_
 Number of objects of this type. e.g. number of faces/cells on this processor. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from box
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...
 

Detailed Description

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.

Definition at line 51 of file cellBox.H.

Constructor & Destructor Documentation

◆ cellBox()

cellBox ( const cellList srcCells,
const faceList srcFaces,
const UList< point > &  srcPoints,
const cellList tgtCells,
const faceList tgtFaces,
const UList< point > &  tgtPoints,
const label  maxObjectsPerLeaf,
const label  nObjectsOfType,
const label  nRefineIterMax = 100 
)

Construct from list of points/faces/cells for source and target.

Definition at line 70 of file cellBox.C.

◆ ~cellBox()

virtual ~cellBox ( )
virtualdefault

Destructor.

Member Function Documentation

◆ calcSrcBox()

Foam::treeBoundBox calcSrcBox ( const label  srcObji) const
protectedvirtual

The local boundBox associated with given source object.

Reimplemented from faceBox.

Definition at line 36 of file cellBox.C.

References boundBox::add().

Here is the call graph for this function:

◆ calcTgtBox()

Foam::treeBoundBox calcTgtBox ( const label  tgtObji) const
protectedvirtual

The local boundBox associated with given target object.

Reimplemented from faceBox.

Definition at line 52 of file cellBox.C.

References boundBox::add().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "box"  )

Runtime type information.

◆ map()

Foam::autoPtr< Foam::mapDistribute > map ( const mapDistributeBase::layoutTypes  constructLayout)
virtual

Return the parallel distribution map (usually linear construct order)

Reimplemented from faceBox.

Definition at line 101 of file cellBox.C.

Member Data Documentation

◆ srcCells_

const cellList& srcCells_
protected

Reference to the source cell list.

Definition at line 62 of file cellBox.H.

◆ tgtCells_

const cellList& tgtCells_
protected

Reference to the target cell list.

Definition at line 67 of file cellBox.H.


The documentation for this class was generated from the following files: