Enables topology-based lookups of nodes. More...
#include <topology_map.h>
Public Member Functions | |
void | init (MeshBase &) |
void | clear () |
void | add_node (const Node &mid_node, const std::vector< std::pair< dof_id_type, dof_id_type >> &bracketing_nodes) |
bool | empty () const |
dof_id_type | find (dof_id_type bracket_node1, dof_id_type bracket_node2) const |
dof_id_type | find (const std::vector< std::pair< dof_id_type, dof_id_type >> &bracketing_nodes) const |
Protected Member Functions | |
void | fill (const MeshBase &) |
Private Types | |
typedef std::unordered_map< std::pair< dof_id_type, dof_id_type >, dof_id_type, myhash > | map_type |
Private Attributes | |
map_type | _map |
Enables topology-based lookups of nodes.
Data structures that enable topology-based lookups of nodes created by mesh refinement.
The key is a pair of node ids for two nodes bracketing the new node, sorted lowest id first.
A node created in the middle of a cell's quad face will be the value of two keys, one for each node pair bracketing it.
For efficiency we will use a hashed map if it is available, otherwise a regular map.
Definition at line 69 of file topology_map.h.
|
private |
Definition at line 72 of file topology_map.h.
void libMesh::TopologyMap::add_node | ( | const Node & | mid_node, |
const std::vector< std::pair< dof_id_type, dof_id_type >> & | bracketing_nodes | ||
) |
Add a node to the map, between each pair of specified bracketing nodes.
Definition at line 52 of file topology_map.C.
References _map, libMesh::DofObject::id(), libMesh::DofObject::invalid_id, std::max(), and std::min().
Referenced by libMesh::MeshRefinement::add_node(), and fill().
|
inline |
Definition at line 76 of file topology_map.h.
References _map.
Referenced by libMesh::MeshRefinement::clear().
|
inline |
|
protected |
Definition at line 139 of file topology_map.C.
References add_node(), libMesh::Elem::bracketing_nodes(), libMesh::Elem::child_ptr(), mesh, libMesh::Elem::node_ref(), and libMesh::remote_elem.
Referenced by init().
dof_id_type libMesh::TopologyMap::find | ( | dof_id_type | bracket_node1, |
dof_id_type | bracket_node2 | ||
) | const |
Definition at line 118 of file topology_map.C.
References _map, libMesh::DofObject::invalid_id, std::max(), and std::min().
Referenced by libMesh::MeshRefinement::add_node(), and find().
dof_id_type libMesh::TopologyMap::find | ( | const std::vector< std::pair< dof_id_type, dof_id_type >> & | bracketing_nodes | ) | const |
Definition at line 82 of file topology_map.C.
References find(), libMesh::DofObject::invalid_id, std::max(), and std::min().
void libMesh::TopologyMap::init | ( | MeshBase & | mesh | ) |
Definition at line 35 of file topology_map.C.
References _map, fill(), and mesh.
Referenced by libMesh::MeshRefinement::update_nodes_map().
|
private |
Definition at line 100 of file topology_map.h.
Referenced by add_node(), clear(), empty(), find(), and init().