libMesh::BuildProjectionList Class Reference

Public Member Functions

 BuildProjectionList (const System &system_in)
 
 BuildProjectionList (BuildProjectionList &other, Threads::split)
 
void unique ()
 
void operator() (const ConstElemRange &range)
 
void join (const BuildProjectionList &other)
 

Public Attributes

std::vector< dof_id_typesend_list
 

Private Attributes

const Systemsystem
 

Detailed Description

This class builds the send_list of old dof indices whose coefficients are needed to perform a projection. This may be executed in parallel on multiple threads. The end result is a send_list vector which is unsorted and may contain duplicate elements. The unique() method can be used to sort and create a unique list.

Definition at line 81 of file system_projection.C.

Constructor & Destructor Documentation

libMesh::BuildProjectionList::BuildProjectionList ( const System system_in)
inline

Definition at line 87 of file system_projection.C.

87  :
88  system(system_in),
89  send_list()
90  {}
libMesh::BuildProjectionList::BuildProjectionList ( BuildProjectionList other,
Threads::split   
)
inline

Definition at line 92 of file system_projection.C.

92  :
93  system(other.system),
94  send_list()
95  {}

Member Function Documentation

void libMesh::BuildProjectionList::join ( const BuildProjectionList other)

Definition at line 1243 of file system_projection.C.

References send_list.

1244 {
1245  // Joining simply requires I add the dof indices from the other object
1246  this->send_list.insert(this->send_list.end(),
1247  other.send_list.begin(),
1248  other.send_list.end());
1249 }
void libMesh::BuildProjectionList::operator() ( const ConstElemRange range)

Definition at line 1166 of file system_projection.C.

1167 {
1168  libmesh_error();
1169 }
void libMesh::BuildProjectionList::unique ( )

Definition at line 1145 of file system_projection.C.

References send_list, and swap().

Referenced by libMesh::System::project_vector().

1146 {
1147  // Sort the send list. After this duplicated
1148  // elements will be adjacent in the vector
1149  std::sort(this->send_list.begin(),
1150  this->send_list.end());
1151 
1152  // Now use std::unique to remove duplicate entries
1153  std::vector<dof_id_type>::iterator new_end =
1154  std::unique (this->send_list.begin(),
1155  this->send_list.end());
1156 
1157  // Remove the end of the send_list. Use the "swap trick"
1158  // from Effective STL
1159  std::vector<dof_id_type>
1160  (this->send_list.begin(), new_end).swap (this->send_list);
1161 }

Member Data Documentation

std::vector<dof_id_type> libMesh::BuildProjectionList::send_list

Definition at line 100 of file system_projection.C.

Referenced by join(), libMesh::System::project_vector(), and unique().

const System& libMesh::BuildProjectionList::system
private

Definition at line 84 of file system_projection.C.


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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:08 UTC

Hosted By:
SourceForge.net Logo