$extrastylesheet
#include <parallel_ghost_sync.h>
Public Types | |
| typedef Point | datum |
Public Member Functions | |
| SyncNodalPositions (MeshBase &m) | |
| void | gather_data (const std::vector< dof_id_type > &ids, std::vector< datum > &data) |
| void | act_on_data (const std::vector< dof_id_type > &ids, std::vector< datum > &data) |
Public Attributes | |
| MeshBase & | mesh |
Definition at line 623 of file parallel_ghost_sync.h.
Definition at line 633 of file parallel_ghost_sync.h.
| libMesh::SyncNodalPositions::SyncNodalPositions | ( | MeshBase & | m | ) | [explicit] |
Definition at line 6 of file parallel_ghost_sync.C.
: mesh(m) {}
| void libMesh::SyncNodalPositions::act_on_data | ( | const std::vector< dof_id_type > & | ids, |
| std::vector< datum > & | data | ||
| ) |
Definition at line 33 of file parallel_ghost_sync.C.
References mesh, and libMesh::MeshBase::node_ptr().
{
for (std::size_t i=0; i<ids.size(); ++i)
{
// Get a pointer to the node whose position is to be updated.
Node* node = mesh.node_ptr(ids[i]);
if (node == NULL)
libmesh_error_msg("Error! Mesh returned a NULL node pointer in SyncNodalPosition::act_on_data().");
// Update this node's position. Should call Point::op=
*node = data[i];
} // end for
} // act_on_data()
| void libMesh::SyncNodalPositions::gather_data | ( | const std::vector< dof_id_type > & | ids, |
| std::vector< datum > & | data | ||
| ) |
Definition at line 12 of file parallel_ghost_sync.C.
References mesh, and libMesh::MeshBase::node_ptr().
{
data.resize(ids.size());
// Gather (x,y,z) data for all node IDs in the ids vector
for (std::size_t i=0; i<ids.size(); ++i)
{
// Look for this node in the mesh
Node *node = mesh.node_ptr(ids[i]);
if (node == NULL)
libmesh_error_msg("Error! Mesh returned a NULL node pointer in SyncNodalPosition::gather_data().");
// Store this node's position in the data array.
// This should call Point::op=
data[i] = *node;
} // end for
} // gather_data()
Definition at line 643 of file parallel_ghost_sync.h.
Referenced by act_on_data(), and gather_data().