EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Friends | List of all members
EBGeometry::ConnectedComponents< T > Class Template Reference

The connected components of the regions of a tape, or of groups of them (see connectedComponents()): how many each has, and for each its volume, box, a point in it, whether it reaches the box searched, and the components it touches. More...

#include <EBGeometry_ConnectedComponents.hpp>

Public Member Functions

uint32_t getNumComponents () const noexcept
 How many components there are.
 
const ConnectedComponent< T > & component (uint32_t a_component) const
 A component.
 
uint32_t getNumGroups () const noexcept
 How many groups there are: the regions of the tape, or the groups given (one more than the largest).
 
std::vector< uint32_t > componentsOf (uint32_t a_group) const
 The components of a group, those reaching the box first, then by decreasing volume.
 
const std::vector< uint32_t > & neighbors (uint32_t a_component) const
 The components that touch a component (they share a face of the search's cells), in increasing order: components of other groups.
 
uint32_t componentAt (const Vec3T< T > &a_point) const noexcept
 The component holding a point: that of the search's cell holding it. Within h of a surface, where the cells are smallest, it can be the component across that surface.
 
T resolution () const noexcept
 The resolution searched with (ComponentOptions::m_resolution).
 
const BoundingVolumes::AABBT< T > & box () const noexcept
 The box searched, grown to a whole number of cells.
 
uint64_t getNumCells () const noexcept
 How many cells the search kept (its cost: one evaluation of every region's function per cell, and about a seventh more for the cells refined).
 

Static Public Attributes

static constexpr uint32_t None = 0xFFFFFFFFU
 What componentAt() gives for a point outside the box searched.
 

Friends

template<class U >
ConnectedComponents< U > ComponentsDetail::label (const std::shared_ptr< const ComponentsDetail::Cells< U > > &a_cells, const std::vector< uint32_t > &a_groupOf, uint32_t a_numGroups)
 

Detailed Description

template<class T>
class EBGeometry::ConnectedComponents< T >

The connected components of the regions of a tape, or of groups of them (see connectedComponents()): how many each has, and for each its volume, box, a point in it, whether it reaches the box searched, and the components it touches.

Components are numbered by group, and within a group those reaching the box first, then by decreasing volume. A host-only value, which holds no reference to the tape.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ box()

template<class T >
const BoundingVolumes::AABBT< T > & EBGeometry::ConnectedComponents< T >::box ( ) const
noexcept

The box searched, grown to a whole number of cells.

Returns
The box.

◆ component()

template<class T >
const ConnectedComponent< T > & EBGeometry::ConnectedComponents< T >::component ( uint32_t  a_component) const

A component.

Parameters
[in]a_componentThe component (below getNumComponents()); aborts with a message otherwise, in every build.
Returns
It.

◆ componentAt()

template<class T >
uint32_t EBGeometry::ConnectedComponents< T >::componentAt ( const Vec3T< T > &  a_point) const
noexcept

The component holding a point: that of the search's cell holding it. Within h of a surface, where the cells are smallest, it can be the component across that surface.

Parameters
[in]a_pointThe point.
Returns
The component, or None for a point outside the box searched.

◆ componentsOf()

template<class T >
std::vector< uint32_t > EBGeometry::ConnectedComponents< T >::componentsOf ( uint32_t  a_group) const

The components of a group, those reaching the box first, then by decreasing volume.

Parameters
[in]a_groupThe group (below getNumGroups()); aborts with a message otherwise, in every build.
Returns
The components, none for a group found nowhere in the box.

◆ getNumCells()

template<class T >
uint64_t EBGeometry::ConnectedComponents< T >::getNumCells ( ) const
noexcept

How many cells the search kept (its cost: one evaluation of every region's function per cell, and about a seventh more for the cells refined).

Returns
The count.

◆ getNumComponents()

template<class T >
uint32_t EBGeometry::ConnectedComponents< T >::getNumComponents ( ) const
noexcept

How many components there are.

Returns
The count.

◆ getNumGroups()

template<class T >
uint32_t EBGeometry::ConnectedComponents< T >::getNumGroups ( ) const
noexcept

How many groups there are: the regions of the tape, or the groups given (one more than the largest).

Returns
The count.

◆ neighbors()

template<class T >
const std::vector< uint32_t > & EBGeometry::ConnectedComponents< T >::neighbors ( uint32_t  a_component) const

The components that touch a component (they share a face of the search's cells), in increasing order: components of other groups.

Parameters
[in]a_componentThe component (below getNumComponents()); aborts with a message otherwise, in every build.
Returns
Its neighbors.

◆ resolution()

template<class T >
T EBGeometry::ConnectedComponents< T >::resolution ( ) const
noexcept

The resolution searched with (ComponentOptions::m_resolution).

Returns
h.

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