$extrastylesheet
libMesh::SyncNodalPositions Struct Reference

#include <parallel_ghost_sync.h>

List of all members.

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

MeshBasemesh

Detailed Description

Definition at line 623 of file parallel_ghost_sync.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Definition at line 6 of file parallel_ghost_sync.C.

  : mesh(m)
{}

Member Function Documentation

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()

Member Data Documentation


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