libMesh
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
libMesh::TopologyMap Class Reference

Data structures that enable topology-based lookups of nodes created by mesh refinement. 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)
 Add a node to the map, between each pair of specified bracketing nodes. More...
 
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, myhashmap_type
 

Private Attributes

map_type _map
 

Detailed Description

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.

Author
Roy Stogner
Date
2015 Enables topology-based lookups of nodes.

Definition at line 69 of file topology_map.h.

Member Typedef Documentation

◆ map_type

typedef std::unordered_map<std::pair<dof_id_type, dof_id_type>, dof_id_type, myhash> libMesh::TopologyMap::map_type
private

Definition at line 72 of file topology_map.h.

Member Function Documentation

◆ add_node()

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.

◆ clear()

void libMesh::TopologyMap::clear ( )

Definition at line 76 of file topology_map.h.

References _map.

76 { _map.clear(); }

◆ empty()

bool libMesh::TopologyMap::empty ( ) const

Definition at line 87 of file topology_map.h.

References _map.

87 { return _map.empty(); }

◆ fill()

void libMesh::TopologyMap::fill ( const MeshBase )
protected

◆ find() [1/2]

dof_id_type libMesh::TopologyMap::find ( dof_id_type  bracket_node1,
dof_id_type  bracket_node2 
) const

◆ find() [2/2]

dof_id_type libMesh::TopologyMap::find ( const std::vector< std::pair< dof_id_type, dof_id_type >> &  bracketing_nodes) const

◆ init()

void libMesh::TopologyMap::init ( MeshBase )

Member Data Documentation

◆ _map

map_type libMesh::TopologyMap::_map
private

Definition at line 100 of file topology_map.h.

Referenced by clear(), and empty().


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