![]()  | 
  
    LifeV
    
   | 
 
Class that partitions the graph associated with a mesh. More...
#include <GraphCutterZoltan.hpp>
 Inheritance diagram for GraphCutterZoltan< MeshType >:
 Collaboration diagram for GraphCutterZoltan< MeshType >:Private Member Functions | |
| GraphCutterZoltan (const GraphCutterZoltan &) | |
| GraphCutterZoltan & | operator= (const GraphCutterZoltan &) | 
Private Attributes | |
| commPtr_Type | M_comm | 
| Int | M_myPID | 
| Int | M_numProcessors | 
| Int | M_numParts | 
| Int | M_numPartsPerProcessor | 
| Int | M_myFirstPart | 
| Int | M_myLastPart | 
| std::vector< Int > | M_indexBounds | 
| pList_Type | M_parameters | 
| meshPtr_Type | M_mesh | 
| table_Type | M_partitionTable | 
| table_Type | M_graph | 
| std::vector< Int > | M_elementList | 
| std::vector< Int > | M_elementParts | 
| struct Zoltan_Struct * | M_zoltanStruct | 
Public Types | |
| typedef Teuchos::ParameterList | pList_Type | 
| typedef std::shared_ptr< Epetra_Comm > | commPtr_Type | 
| typedef MeshType | mesh_Type | 
| typedef std::shared_ptr< mesh_Type > | meshPtr_Type | 
| typedef std::map< Int, idListPtr_Type > | table_Type | 
Constructor & Destructor | |
Constructor taking the original mesh, the MPI comm and parameters  | |
| GraphCutterZoltan (meshPtr_Type &mesh, commPtr_Type &comm, pList_Type ¶meters) | |
| virtual | ~GraphCutterZoltan () | 
| Destructor.  More... | |
Public methods | |
| virtual Int | run () | 
| Performs the graph partitioning.  More... | |
Get Methods | |
| virtual const idListPtr_Type & | getPart (const UInt i) const | 
| Get a pointer to one of the parts.  More... | |
| virtual idListPtr_Type & | getPart (const UInt i) | 
| virtual const idTablePtr_Type | getGraph () const | 
| Get the entire partitioned graph, wrapped in a smart pointer.  More... | |
| virtual const UInt | numParts () const | 
| Return the number of parts.  More... | |
| UInt | numStoredElements () const | 
| Get number of stored graph elements.  More... | |
| Int | firstIndex (const Int i) const | 
| First global index that is initially assigned to process i.  More... | |
| Int | lastIndex (const Int i) const | 
| Last global index that is initially assigned to process i.  More... | |
| const table_Type & | graph () const | 
| The internally stored dual graph of the mesh.  More... | |
| const std::vector< Int > & | elementList () const | 
| The vector of stored element GIDs.  More... | |
| std::vector< Int > & | elementList () | 
| The vector of stored element GIDs (non-const)  More... | |
| const std::vector< Int > & | elementParts () const | 
| The vector of stored element partitions.  More... | |
| std::vector< Int > & | elementParts () | 
| The vector of stored element partitions (non-const)  More... | |
| Int | myPID () const | 
| The PID of the process.  More... | |
| Int | numProcessors () const | 
| The number of processes in the comm.  More... | |
Static methods | |
| static int | getNumElements (void *data, int *ierr) | 
| static void | getElementList (void *data, int sizeGID, int sizeLID, ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID, int wgt_dim, float *obj_wgts, int *ierr) | 
| static void | getNumNeighboursList (void *data, int sizeGID, int sizeLID, int num_obj, ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID, int *numEdges, int *ierr) | 
| static void | getNeighbourList (void *data, int sizeGID, int sizeLID, int num_obj, ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID, int *num_edges, ZOLTAN_ID_PTR nborGID, int *nborProc, int wgt_dim, float *ewgts, int *ierr) | 
| static void | getTransferObjectSizes (void *data, int num_gid_entries, int num_lid_entries, int num_ids, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int *sizes, int *ierr) | 
| static void | packObjects (void *data, int num_gid_entries, int num_lid_entries, int num_ids, ZOLTAN_ID_PTR global_ids, ZOLTAN_ID_PTR local_ids, int *dest, int *sizes, int *idx, char *buf, int *ierr) | 
| static void | unpackObjects (void *data, int num_gid_entries, int num_ids, ZOLTAN_ID_PTR global_ids, int *sizes, int *idx, char *buf, int *ierr) | 
Private Methods | |
| virtual void | setParameters (pList_Type ¶meters) | 
| Set values for all the parameters, with default values where needed.  More... | |
| void | distributePartitions () | 
| Distribute the partitions among available processors.  More... | |
| void | buildGraph () | 
| Build the dual graph of the unpartitioned mesh.  More... | |
| void | localMigrate (int numExport, ZOLTAN_ID_PTR exportLocalGids, int *exportProcs, int *exportToPart) | 
| Migrate elements between locally stored partitions.  More... | |
| void | buildPartitionTable () | 
| Build the partition table that can be exported to the mesh builder.  More... | |
| void | partitionGraph () | 
| Partition the graph.  More... | |
Additional Inherited Members | |
  Public Types inherited from GraphCutterBase< MeshType > | |
| typedef Teuchos::ParameterList | pList_Type | 
  Public Member Functions inherited from GraphCutterBase< MeshType > | |
| GraphCutterBase () | |
| Default constructor.  More... | |
| virtual | ~GraphCutterBase () | 
| Destructor.  More... | |
Class that partitions the graph associated with a mesh.
This class uses the Zoltan package to partition the graph associated with a mesh. This class builds the dual graph of the mesh, partitions it according to a set of parameters and the stores the partitioning in a table (vector of vectors). At the end of the partition process, each vector will contain the GID of the elements in a part.
While this class can be used stand-alone, it is used automatically by the MeshPartitionTool class during the mesh partition process.
More on class functionality to follow. Stay tuned...
Definition at line 91 of file GraphCutterZoltan.hpp.
| typedef Teuchos::ParameterList pList_Type | 
Definition at line 96 of file GraphCutterZoltan.hpp.
| typedef std::shared_ptr<Epetra_Comm> commPtr_Type | 
Definition at line 97 of file GraphCutterZoltan.hpp.
Definition at line 98 of file GraphCutterZoltan.hpp.
| typedef std::shared_ptr<mesh_Type> meshPtr_Type | 
Definition at line 99 of file GraphCutterZoltan.hpp.
| typedef std::map<Int, idListPtr_Type > table_Type | 
Definition at line 101 of file GraphCutterZoltan.hpp.
| GraphCutterZoltan | ( | meshPtr_Type & | mesh, | 
| commPtr_Type & | comm, | ||
| pList_Type & | parameters | ||
| ) | 
This constructor can be used to build the object and perform the graph partitioning in one shot.
| mesh | The original mesh whose graph this object will partition | 
| comm | The Epetra MPI comm object which contains the processes which participate | 
| parameters | The Teuchos parameter list which contains the partitioning parameters | 
Definition at line 313 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  inlinevirtual | 
Destructor.
Definition at line 121 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
      
  | 
  virtual | 
Performs the graph partitioning.
Implements GraphCutterBase< MeshType >.
Definition at line 353 of file GraphCutterZoltan.hpp.
      
  | 
  inlinevirtual | 
Get a pointer to one of the parts.
Implements GraphCutterBase< MeshType >.
Definition at line 133 of file GraphCutterZoltan.hpp.
      
  | 
  inlinevirtual | 
Implements GraphCutterBase< MeshType >.
Definition at line 137 of file GraphCutterZoltan.hpp.
      
  | 
  inlinevirtual | 
Get the entire partitioned graph, wrapped in a smart pointer.
Implements GraphCutterBase< MeshType >.
Definition at line 143 of file GraphCutterZoltan.hpp.
      
  | 
  inlinevirtual | 
Return the number of parts.
Implements GraphCutterBase< MeshType >.
Definition at line 154 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  inline | 
Get number of stored graph elements.
Definition at line 160 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:First global index that is initially assigned to process i.
Definition at line 166 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:Last global index that is initially assigned to process i.
Definition at line 172 of file GraphCutterZoltan.hpp.
      
  | 
  inline | 
The internally stored dual graph of the mesh.
Definition at line 178 of file GraphCutterZoltan.hpp.
      
  | 
  inline | 
The vector of stored element GIDs.
Definition at line 184 of file GraphCutterZoltan.hpp.
      
  | 
  inline | 
The vector of stored element GIDs (non-const)
Definition at line 190 of file GraphCutterZoltan.hpp.
      
  | 
  inline | 
The vector of stored element partitions.
Definition at line 196 of file GraphCutterZoltan.hpp.
      
  | 
  inline | 
The vector of stored element partitions (non-const)
Definition at line 202 of file GraphCutterZoltan.hpp.
      
  | 
  inline | 
The PID of the process.
Definition at line 208 of file GraphCutterZoltan.hpp.
      
  | 
  inline | 
The number of processes in the comm.
Definition at line 214 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  static | 
      
  | 
  static | 
Definition at line 376 of file GraphCutterZoltan.hpp.
      
  | 
  static | 
Definition at line 399 of file GraphCutterZoltan.hpp.
      
  | 
  static | 
Definition at line 420 of file GraphCutterZoltan.hpp.
      
  | 
  static | 
Definition at line 465 of file GraphCutterZoltan.hpp.
      
  | 
  static | 
Definition at line 480 of file GraphCutterZoltan.hpp.
      
  | 
  static | 
Definition at line 511 of file GraphCutterZoltan.hpp.
      
  | 
  privatevirtual | 
Set values for all the parameters, with default values where needed.
Implements GraphCutterBase< MeshType >.
Definition at line 331 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  private | 
      
  | 
  private | 
Distribute the partitions among available processors.
Definition at line 538 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  private | 
Build the dual graph of the unpartitioned mesh.
Definition at line 554 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  private | 
Migrate elements between locally stored partitions.
Definition at line 642 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Build the partition table that can be exported to the mesh builder.
Definition at line 661 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  private | 
Partition the graph.
Definition at line 706 of file GraphCutterZoltan.hpp.
 Here is the caller graph for this function:
      
  | 
  private | 
Definition at line 282 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 283 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 284 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 285 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 286 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 287 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 288 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 289 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 290 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 291 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 292 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 293 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 298 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 299 of file GraphCutterZoltan.hpp.
      
  | 
  private | 
Definition at line 301 of file GraphCutterZoltan.hpp.