libMesh
Public Member Functions | List of all members
libMesh::MeshTools::SidesToElemMap::HashFunction Struct Reference

Public Member Functions

std::size_t operator() (const Key &vertex_ids) const
 The "Hash" template argument. More...
 
bool operator() (const Key &lhs, const Key &rhs) const
 The "KeyEqual" template argument. More...
 

Detailed Description

Definition at line 93 of file sides_to_elem_map.h.

Member Function Documentation

◆ operator()() [1/2]

std::size_t libMesh::MeshTools::SidesToElemMap::HashFunction::operator() ( const Key vertex_ids) const
inline

The "Hash" template argument.

We just use the same Utility::hashword() function that is used by the various Elem::compute_key() implementations, although here we can assume the sorting has already been done for us. This will be a 32-bit hash when dof_id_type is 32-bits and a 64-bit hash when dof_id_type is 64 bits.

Definition at line 105 of file sides_to_elem_map.h.

References libMesh::Utility::hashword().

106  {
107  return cast_int<std::size_t>(Utility::hashword(vertex_ids));
108  }
uint32_t hashword(const uint32_t *k, size_t length, uint32_t initval=0)
The hashword function takes an array of uint32_t&#39;s of length &#39;length&#39; and computes a single key from ...
Definition: hashword.h:158

◆ operator()() [2/2]

bool libMesh::MeshTools::SidesToElemMap::HashFunction::operator() ( const Key lhs,
const Key rhs 
) const
inline

The "KeyEqual" template argument.

Calls std::vector::operator==()

Definition at line 114 of file sides_to_elem_map.h.

115  {
116  return lhs == rhs;
117  }

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