libMesh
Public Types | Public Member Functions | Public Attributes | List of all members
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 1041 of file partitioner.C.

Member Typedef Documentation

◆ datum

Definition at line 1043 of file partitioner.C.

◆ map_type

Definition at line 1045 of file partitioner.C.

Constructor & Destructor Documentation

◆ SyncLocalIDs()

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

Definition at line 1047 of file partitioner.C.

1047 : 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 1060 of file partitioner.C.

References id_map, and libMesh::index_range().

1062  {
1063  for (auto i : index_range(local_ids))
1064  id_map[ids[i]] = local_ids[i];
1065  }
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:117

◆ gather_data()

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

Definition at line 1051 of file partitioner.C.

References id_map, and libMesh::index_range().

1053  {
1054  local_ids.resize(ids.size());
1055 
1056  for (auto i : index_range(ids))
1057  local_ids[i] = id_map[ids[i]];
1058  }
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
Definition: int_range.h:117

Member Data Documentation

◆ id_map

map_type& libMesh::SyncLocalIDs::id_map

Definition at line 1049 of file partitioner.C.

Referenced by act_on_data(), and gather_data().


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