Caribou
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
caribou::topology::HashGrid< Element > Class Template Reference

Public Types

using Index = UNSIGNED_INTEGER_TYPE
 
using GridCoordinates = Eigen::Matrix< INTEGER_TYPE, Dimension, 1 >
 
using WorldCoordinates = Eigen::Matrix< FLOATING_POINT_TYPE, Dimension, 1 >
 
using VecFloat = Eigen::Matrix< FLOATING_POINT_TYPE, Dimension, 1 >
 

Public Member Functions

 HashGrid (const FLOATING_POINT_TYPE &cell_size)
 
 HashGrid (const FLOATING_POINT_TYPE &cell_size, const UNSIGNED_INTEGER_TYPE &number_of_elements)
 
void add (const Element &e, const Index &id)
 Add an element's data to the hash grid. More...
 
auto get (const WorldCoordinates &p) const -> std::set< Index >
 Get all the data of all elements that are very close to the point p. More...
 

Static Public Attributes

static constexpr UNSIGNED_INTEGER_TYPE Dimension = caribou::geometry::traits<Element>::Dimension
 

Member Function Documentation

◆ add()

template<typename Element >
void caribou::topology::HashGrid< Element >::add ( const Element &  e,
const Index &  id 
)
inline

Add an element's data to the hash grid.

Parameters
eThe element defined by its nodes.
idThe element's identifier (usually its index within a topology).

◆ get()

template<typename Element >
auto caribou::topology::HashGrid< Element >::get ( const WorldCoordinates &  p) const -> std::set<Index>
inline

Get all the data of all elements that are very close to the point p.

Note that the returned elements do not ensure that the point p resides inside of them. One has to further check each ones of them with an intersection test.


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