libMesh::BuildProjectionList Class Reference

List of all members.

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.

00087                                                   :
00088       system(system_in),
00089       send_list()
00090     {}

libMesh::BuildProjectionList::BuildProjectionList ( BuildProjectionList other,
Threads::split   
) [inline]

Definition at line 92 of file system_projection.C.

00092                                                                    :
00093       system(other.system),
00094       send_list()
00095     {}


Member Function Documentation

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

Definition at line 1241 of file system_projection.C.

References send_list.

01242 {
01243   // Joining simply requires I add the dof indices from the other object
01244   this->send_list.insert(this->send_list.end(),
01245                          other.send_list.begin(),
01246                          other.send_list.end());
01247 }

void libMesh::BuildProjectionList::operator() ( const ConstElemRange range  ) 

Definition at line 1164 of file system_projection.C.

01165 {
01166   libmesh_error();
01167 }

void libMesh::BuildProjectionList::unique (  ) 

Definition at line 1143 of file system_projection.C.

References send_list, and swap().

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

01144 {
01145   // Sort the send list.  After this duplicated
01146   // elements will be adjacent in the vector
01147   std::sort(this->send_list.begin(),
01148             this->send_list.end());
01149 
01150   // Now use std::unique to remove duplicate entries
01151   std::vector<dof_id_type>::iterator new_end =
01152     std::unique (this->send_list.begin(),
01153                  this->send_list.end());
01154 
01155   // Remove the end of the send_list.  Use the "swap trick"
01156   // from Effective STL
01157   std::vector<dof_id_type>
01158     (this->send_list.begin(), new_end).swap (this->send_list);
01159 }


Member Data Documentation

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 05 2013 19:55:06 UTC

Hosted By:
SourceForge.net Logo