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 673 of file parallel_ghost_sync.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Definition at line 6 of file parallel_ghost_sync.C.

7  : mesh(m)
8 {}

Member Function Documentation

void libMesh::SyncNodalPositions::act_on_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::node_ref().

33 {
34  for (std::size_t i=0; i<ids.size(); ++i)
35  {
36 
37  // Get a pointer to the node whose position is to be updated.
38  Node & node = mesh.node_ref(ids[i]);
39 
40  // Update this node's position. Should call Point::op=
41  node = data[i];
42  } // end for
43 } // act_on_data()
virtual const Node & node_ref(const dof_id_type i) const
Definition: mesh_base.h:385
IterBase * data
void libMesh::SyncNodalPositions::gather_data ( const std::vector< dof_id_type > &  ids,
std::vector< datum > &  data 
) const

Definition at line 12 of file parallel_ghost_sync.C.

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

14 {
15  data.resize(ids.size());
16 
17  // Gather (x,y,z) data for all node IDs in the ids vector
18  for (std::size_t i=0; i<ids.size(); ++i)
19  {
20  // Look for this node in the mesh
21  const Point & pt = mesh.point(ids[i]);
22 
23  // Store this node's position in the data array.
24  // This should call Point::op=
25  data[i] = pt;
26  } // end for
27 } // 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 693 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: