voxel Class Reference

Ray search engine based on discretising space into uniform voxels. More...

Inheritance diagram for voxel:
Collaboration diagram for voxel:

Public Member Functions

 TypeName ("voxel")
 Runtime type information. More...
 
 voxel (const fvMesh &mesh, const dictionary &dict)
 Constructor. More...
 
virtual ~voxel ()=default
 Destructor. More...
 
labelVector nijk () const noexcept
 
label nVoxel () const noexcept
 
label voxeli (const labelVector ijk) const noexcept
 
label voxeli (const label i, const label j, const label k) const noexcept
 
labelVector ijk (const label voxeli) const noexcept
 
pointIndexHit hit (const point &origin, const vector &dir) const
 
pointIndexHit hit (const label tri0, const vector &dir) const
 
virtual void shootRays (labelList &rayStartFaceOut, labelList &rayEndFaceOut) const
 Shoot rays; returns lists of ray start and end faces. More...
 
- Public Member Functions inherited from raySearchEngine
 TypeName ("raySearchEngine")
 Run-time type information. More...
 
 declareRunTimeSelectionTable (autoPtr, raySearchEngine, mesh,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
 Selection table. More...
 
 raySearchEngine (const raySearchEngine &)=delete
 No copy construct. More...
 
void operator= (const raySearchEngine &)=delete
 No copy assignment. More...
 
 raySearchEngine (const fvMesh &mesh, const dictionary &dict)
 Constructor. More...
 
virtual ~raySearchEngine ()=default
 Destructor. More...
 
const fvMeshmesh () const noexcept
 Reference to the mesh. More...
 
const mapDistributemap () const
 Parallel map. More...
 
const labelListcompactToGlobal () const noexcept
 Compact to global addressing. More...
 
const globalIndexglobalNumbering () const noexcept
 Global numbering. More...
 
const labelListpatchIDs () const noexcept
 List of participating patch IDs. More...
 
const scalarListpatchAreas () const noexcept
 Patch areas. More...
 
label nParticipatingFaces () const
 Number of participating faces. More...
 
const List< pointField > & allCf () const noexcept
 List of all face centres per processor. More...
 
const List< vectorField > & allSf () const noexcept
 List of all face areas per processor. More...
 
const List< labelField > & allAgg () const noexcept
 List of all face agglomeration index per processor. More...
 
virtual void correct (labelListList &visibleFaceFaces) const
 Correct. More...
 
void compactAddressing (const mapDistribute &map, pointField &compactCf, vectorField &compactSf, List< List< vector >> &compactFineSf, List< List< point >> &compactFineCf, DynamicList< List< point >> &compactPoints, DynamicList< label > &compactPatchId) const
 Create compact addressing. More...
 
template<class Type >
void interpolate (GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< Type >> &values) const
 Interpolate field. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from raySearchEngine
static autoPtr< raySearchEngineNew (const fvMesh &mesh, const dictionary &dict)
 Selector. More...
 
- Static Public Attributes inherited from raySearchEngine
static const label maxDynListLength
 
- Protected Member Functions inherited from raySearchEngine
void createGeometry ()
 Create patch geometry based on the original mesh. More...
 
void createParallelAddressing (labelList &rayEndFace) const
 Create parallel addressing - map, compact-to-global. More...
 
coordSystem::cartesian createCoordSystem (const point &origin, const vector &dir) const
 Create Cartesian co-ordinate system. More...
 
void createAgglomeration (const IOobject &io)
 Create patch geometry based on the agglomerated mesh. More...
 
tmp< pointFieldcreateHemiPoints (const label nRayPerFace) const
 Create a set of points describing a hemisphere. More...
 
- Static Protected Member Functions inherited from raySearchEngine
static void check (const labelList &nVisibleFaceFaces)
 
static label closestPointIndex (const point &p0, const List< point > &pts)
 
- Protected Attributes inherited from raySearchEngine
const fvMeshmesh_
 Reference to the mesh. More...
 
autoPtr< mapDistributemapPtr_
 Parallel map. More...
 
labelList compactToGlobal_
 Compact to global addressing. More...
 
globalIndex globalNumbering_
 Global numbering. More...
 
const word patchGroup_
 Name of patch group to identify participating patches. More...
 
labelList patchIDs_
 List of participating patch IDs. More...
 
scalarList patchAreas_
 Patch areas. More...
 
bool agglomerate_
 Agglomeration flag. More...
 
autoPtr< singleCellFvMeshagglomMeshPtr_
 Agglomerated mesh representation. More...
 
label nFace_
 Number of original faces. More...
 
label nCoarseFace_
 Number of coarse faces. More...
 
List< pointFieldallCf_
 List of all face centres per processor. More...
 
List< vectorFieldallSf_
 List of all face areas per processor. More...
 
List< labelFieldallAgg_
 List of all face agglomeration index per processor. More...
 

Detailed Description

Ray search engine based on discretising space into uniform voxels.

Voxels are refined using 2x2x2 refinement.

The number of rays per face is supplied by the user, whereby rays are issued uniformly across a hemisphere.

Usage
Minimal example by using <constant>/viewFactorsDict:
// Mandatory entries
nRayPerFace        <label>;

// Optional entries
nTriPerVoxelMax     <label>;
depthMax            <label>;

// Inherited entries
...

where the entries mean:

Property Description Type Reqd Deflt
nRayPerFace Number of rays issued per face label yes -
nRayPerFace Target number of triangles per voxel label no 50
depthMax Maximum voxel refinement depth label no 5

The inherited entries are elaborated in:

Source files
See also

Definition at line 110 of file voxelRaySearchEngine.H.

Constructor & Destructor Documentation

◆ voxel()

voxel ( const fvMesh mesh,
const dictionary dict 
)

Constructor.

◆ ~voxel()

virtual ~voxel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "voxel"  )

Runtime type information.

◆ nijk()

Foam::labelVector nijk ( ) const
inlinenoexcept

Definition at line 103 of file voxelRaySearchEngineI.H.

◆ nVoxel()

Foam::label nVoxel ( ) const
inlinenoexcept

Definition at line 109 of file voxelRaySearchEngineI.H.

◆ voxeli() [1/2]

Foam::label voxeli ( const labelVector  ijk) const
inlinenoexcept

Definition at line 116 of file voxelRaySearchEngineI.H.

◆ voxeli() [2/2]

Foam::label voxeli ( const label  i,
const label  j,
const label  k 
) const
inlinenoexcept

Definition at line 125 of file voxelRaySearchEngineI.H.

References k.

◆ ijk()

Foam::labelVector ijk ( const label  voxeli) const
inlinenoexcept

Definition at line 135 of file voxelRaySearchEngineI.H.

References k.

◆ hit() [1/2]

pointIndexHit hit ( const point origin,
const vector dir 
) const

◆ hit() [2/2]

pointIndexHit hit ( const label  tri0,
const vector dir 
) const

◆ shootRays()

virtual void shootRays ( labelList rayStartFaceOut,
labelList rayEndFaceOut 
) const
virtual

Shoot rays; returns lists of ray start and end faces.

Implements raySearchEngine.


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