Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::BVH< MeshEntityType > Class Template Referenceabstract

BVH base class. More...

+ Inheritance diagram for Feel::BVH< MeshEntityType >:
+ Collaboration diagram for Feel::BVH< MeshEntityType >:

Classes

struct  BVHPrimitiveInfo
 Information on the primitive (mesh entity, bounding box, centroid) More...
 
struct  BVHRayIntersectionResult
 Data returned after apply an intersection with a ray. More...
 
struct  TlasHit
 

Public Types

using index_type = typename mesh_entity_type::index_type
 
using IntersectContext = BvhIntersectContext
 
using mesh_entity_type = std::decay_t< MeshEntityType >
 
using primitiveinfo_type = BVHPrimitiveInfo
 
using ray_type = BVHRay< nRealDim >
 
using rayintersection_result_type = BVHRayIntersectionResult
 
using value_type = double
 
using vector_realdim_type = Eigen::Matrix< value_type, nRealDim, 1 >
 

Public Member Functions

 BVH (BVH &&)=default
 
 BVH (BVH const &)=default
 
 BVH (BVHEnum::Quality quality=BVHEnum::Quality::High, worldcomm_ptr_t worldComm=Environment::worldCommPtr())
 
template<typename... Ts>
auto intersect (Ts &&... v)
 compute intersection(s) with a ray from the BVH built and return a vector of intersection result
 
template<IntersectContext Ctx, bool useRobustTraversal, typename RayType >
std::vector< std::vector< rayintersection_result_type > > intersectGenericImpl (RayType const &ray, value_type tolerance, bool parallel)
 
template<typename BVH< MeshEntityType >::IntersectContext Ctx, bool useRobustTraversal, typename RayType >
std::vector< std::vector< typename BVH< MeshEntityType >::rayintersection_result_type > > intersectGenericImpl (RayType const &ray, value_type tolerance, bool parallel)
 
std::vector< BVHPrimitiveInfo > const & primitiveInfo () const noexcept
 return all primitive info
 
BVHPrimitiveInfo const & primitiveInfo (index_type i) const
 return primitive info at index i
 
- Public Member Functions inherited from Feel::CommObject
WorldComm const & comm () const
 
 CommObject (CommObject &&)=default
 
 CommObject (CommObject const &)=default
 
 CommObject (worldcomm_ptr_t &w)
 
 CommObject (worldcomm_ptr_t const &w)
 
bool hasWorldComm () const
 returns true if worldcomm is allocated, false othewise
 
CommObject & operator= (CommObject &&)=default
 
CommObject & operator= (CommObject const &)=default
 
virtual void setWorldComm (worldcomm_ptr_t const &w)
 
virtual void setWorldComm (worldcomm_t &w)
 
worldcomm_ptr_t & subWorldCommSeqPtr ()
 
worldcomm_ptr_t const & subWorldCommSeqPtr () const
 
WorldComm & worldComm ()
 
WorldComm const & worldComm () const
 
worldcomm_ptr_t & worldCommPtr ()
 
worldcomm_ptr_t const & worldCommPtr () const
 

Static Public Attributes

static constexpr uint16_type nDim = mesh_entity_type::nDim
 
static constexpr uint16_type nRealDim = mesh_entity_type::nRealDim
 

Protected Member Functions

virtual std::vector< TlasHit > getHitPartitions (ray_type const &ray) const
 Returns a list of MPI ranks whose bounding boxes intersect the ray (using TLAS)
 
virtual std::vector< rayintersection_result_type > intersectSequential (ray_type const &rayon, value_type tolerance, bool useRobustTraversal=true)=0
 
template<typename RangeType >
void updateForUse (RangeType const &range)
 

Protected Attributes

std::vector< BVHPrimitiveInfo > M_primitiveInfo
 
BVHEnum::Quality M_quality = BVHEnum::Quality::High
 

Detailed Description

template<typename MeshEntityType>
class Feel::BVH< MeshEntityType >

BVH base class.