libMesh::SyncNodalPositions Struct Reference

#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) const
 
void act_on_data (const std::vector< dof_id_type > &ids, std::vector< datum > &data) const
 

Public Attributes

MeshBasemesh
 

Detailed Description

Definition at line 714 of file parallel_ghost_sync.h.

Member Typedef Documentation

Constructor & Destructor Documentation

libMesh::SyncNodalPositions::SyncNodalPositions ( MeshBase m)
explicit

Definition at line 25 of file parallel_ghost_sync.C.

26  : mesh(m)
27 {}

Member Function Documentation

void libMesh::SyncNodalPositions::act_on_data ( const std::vector< dof_id_type > &  ids,
std::vector< datum > &  data 
) const

Definition at line 50 of file parallel_ghost_sync.C.

References mesh, and libMesh::MeshBase::node_ref().

52 {
53  for (std::size_t i=0; i<ids.size(); ++i)
54  {
55 
56  // Get a pointer to the node whose position is to be updated.
57  Node & node = mesh.node_ref(ids[i]);
58 
59  // Update this node's position. Should call Point::op=
60  node = data[i];
61  } // end for
62 } // act_on_data()
virtual const Node & node_ref(const dof_id_type i) const
Definition: mesh_base.h:417
IterBase * data
void libMesh::SyncNodalPositions::gather_data ( const std::vector< dof_id_type > &  ids,
std::vector< datum > &  data 
) const

Definition at line 31 of file parallel_ghost_sync.C.

References mesh, and libMesh::MeshBase::point().

33 {
34  data.resize(ids.size());
35 
36  // Gather (x,y,z) data for all node IDs in the ids vector
37  for (std::size_t i=0; i<ids.size(); ++i)
38  {
39  // Look for this node in the mesh
40  const Point & pt = mesh.point(ids[i]);
41 
42  // Store this node's position in the data array.
43  // This should call Point::op=
44  data[i] = pt;
45  } // end for
46 } // gather_data()
virtual const Point & point(const dof_id_type i) const =0
IterBase * data

Member Data Documentation

MeshBase& libMesh::SyncNodalPositions::mesh

Definition at line 734 of file parallel_ghost_sync.h.

Referenced by act_on_data(), and gather_data().


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