libMesh::SyncLocalIDs Struct Reference

Public Types

typedef dof_id_type datum
 
typedef std::unordered_map< dof_id_type, dof_id_typemap_type
 

Public Member Functions

 SyncLocalIDs (map_type &_id_map)
 
void gather_data (const std::vector< dof_id_type > &ids, std::vector< datum > &local_ids) const
 
void act_on_data (const std::vector< dof_id_type > &ids, const std::vector< datum > &local_ids)
 

Public Attributes

map_typeid_map
 

Detailed Description

Definition at line 880 of file partitioner.C.

Member Typedef Documentation

◆ datum

Definition at line 882 of file partitioner.C.

◆ map_type

Definition at line 884 of file partitioner.C.

Constructor & Destructor Documentation

◆ SyncLocalIDs()

libMesh::SyncLocalIDs::SyncLocalIDs ( map_type _id_map)
inline

Definition at line 886 of file partitioner.C.

886 : id_map(_id_map) {}

Member Function Documentation

◆ act_on_data()

void libMesh::SyncLocalIDs::act_on_data ( const std::vector< dof_id_type > &  ids,
const std::vector< datum > &  local_ids 
)
inline

Definition at line 899 of file partitioner.C.

References id_map.

901  {
902  for (std::size_t i=0, imax = local_ids.size(); i != imax; ++i)
903  id_map[ids[i]] = local_ids[i];
904  }

◆ gather_data()

void libMesh::SyncLocalIDs::gather_data ( const std::vector< dof_id_type > &  ids,
std::vector< datum > &  local_ids 
) const
inline

Definition at line 890 of file partitioner.C.

References id_map.

892  {
893  local_ids.resize(ids.size());
894 
895  for (std::size_t i=0, imax = ids.size(); i != imax; ++i)
896  local_ids[i] = id_map[ids[i]];
897  }

Member Data Documentation

◆ id_map

map_type& libMesh::SyncLocalIDs::id_map

Definition at line 888 of file partitioner.C.

Referenced by act_on_data(), and gather_data().


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