std::map-like data structure using hashed Points for keys. More...
#include <location_maps.h>
Public Member Functions | |
void | init (MeshBase &) |
void | clear () |
void | insert (T &) |
bool | empty () const |
T * | find (const Point &, const Real tol=TOLERANCE) |
Point | point_of (const T &) const |
template<> | |
Point | point_of (const Node &node) const |
template<> | |
Point | point_of (const Elem &elem) const |
Protected Member Functions | |
unsigned int | key (const Point &) |
void | fill (MeshBase &) |
template<> | |
void | fill (MeshBase &mesh) |
template<> | |
void | fill (MeshBase &mesh) |
Private Types | |
typedef std::unordered_multimap< unsigned int, T * > | map_type |
Private Attributes | |
map_type | _map |
std::vector< Real > | _lower_bound |
std::vector< Real > | _upper_bound |
std::map-like data structure using hashed Points for keys.
Data structures that enable location-based lookups The key is a hash of the Point location. For efficiency we will use a hashed multimap if it is available, otherwise a regular multimap.
Definition at line 53 of file location_maps.h.
|
private |
Definition at line 55 of file location_maps.h.
|
inline |
|
inline |
Definition at line 63 of file location_maps.h.
References libMesh::LocationMap< T >::_map.
Referenced by libMesh::Parallel::sync_dofobject_data_by_xyz().
|
protected |
|
protected |
Definition at line 183 of file location_maps.C.
References mesh, and libMesh::MeshBase::node_ptr_range().
|
protected |
Definition at line 193 of file location_maps.C.
References libMesh::MeshBase::active_element_ptr_range(), and mesh.
T * libMesh::LocationMap< T >::find | ( | const Point & | p, |
const Real | tol = TOLERANCE |
||
) |
Definition at line 111 of file location_maps.C.
References libMesh::TypeVector< T >::absolute_fuzzy_equals(), and libMesh::as_range().
Referenced by libMesh::Parallel::sync_dofobject_data_by_xyz().
void libMesh::LocationMap< T >::init | ( | MeshBase & | mesh | ) |
Definition at line 46 of file location_maps.C.
References libMesh::ParallelObject::comm(), libMesh::MeshBase::is_serial(), std::max(), libMesh::Parallel::Communicator::max(), mesh, std::min(), libMesh::Parallel::Communicator::min(), and libMesh::MeshBase::node_ptr_range().
void libMesh::LocationMap< T >::insert | ( | T & | t | ) |
Definition at line 87 of file location_maps.C.
|
protected |
Definition at line 148 of file location_maps.C.
References std::abs(), libMesh::Real, and libMesh::TOLERANCE.
Point libMesh::LocationMap< T >::point_of | ( | const T & | ) | const |
Referenced by libMesh::Parallel::sync_dofobject_data_by_xyz().
Point libMesh::LocationMap< Node >::point_of | ( | const Node & | node | ) | const |
Definition at line 95 of file location_maps.C.
Point libMesh::LocationMap< Elem >::point_of | ( | const Elem & | elem | ) | const |
Definition at line 103 of file location_maps.C.
References libMesh::Elem::centroid().
|
private |
Definition at line 77 of file location_maps.h.
|
private |
Definition at line 76 of file location_maps.h.
Referenced by libMesh::LocationMap< T >::clear(), and libMesh::LocationMap< T >::empty().
|
private |
Definition at line 78 of file location_maps.h.