| FEAT 3
    Finite Element Analysis Toolbox | 
Zoltan hypergraph partitioner backend. More...
#include <parti_zoltan.hpp>
| Classes | |
| class | Hypergraph | 
| internal data class to be used by callback functions  More... | |
| Public Member Functions | |
| PartiZoltan (const Dist::Comm &comm, Index min_elems=1000u, int max_procs=1000) | |
| Constructor.  More... | |
| virtual | ~PartiZoltan () | 
| virtual destructor | |
| Adjacency::Graph | build_elems_at_rank () const | 
| Builds and returns the elements-at-rank graph representing the partitioning.  More... | |
| bool | execute (const Adjacency::Graph &faces_at_elem, const Index num_parts, const std::vector< Real > &weights) | 
| Executes the Zoltan partitioner.  More... | |
| template<int n_> | |
| bool | execute (const IndexSet< n_ > &faces_at_elem, const Index num_parts, const std::vector< Real > &weights) | 
| Executes the Zoltan partitioner.  More... | |
| int | get_sub_comm_size () const | 
| Returns the size of the internal sub-communicator.  More... | |
| Protected Member Functions | |
| bool | _apply_zoltan () | 
| auxiliary function: applies Zoltan onto the hypergraph | |
| bool | _broadcast_coloring (bool zoltan_ok) | 
| auxiliary function: broadcasts the coloring from the root process | |
| void | _create_hypergraph (const Adjacency::Graph &faces_at_elem, const std::vector< Real > &weights) | 
| auxiliary function: builds a hypergraph from the adjacency graph | |
| bool | _gather_coloring (const int num_export, const int *export_parts) | 
| auxiliary function: gathers the partitioned coloring onto the root process | |
| Private Attributes | |
| Adjacency::Coloring | _coloring | 
| the element coloring  More... | |
| const Dist::Comm & | _comm | 
| our main communicator  More... | |
| Hypergraph | _hypergraph | 
| our hypergraph structure  More... | |
| int | _max_procs | 
| maximum number of MPI processes to use  More... | |
| Index | _min_elems | 
| minimum number of elements per MPI process  More... | |
| Index | _num_elems | 
| the total number of elements  More... | |
| Index | _num_parts | 
| the desired number of partitions  More... | |
| Dist::Comm | _zoltan_comm | 
| a sub-communicator for the partitioner  More... | |
| void * | _zz | 
| zoltan internal data  More... | |
Zoltan hypergraph partitioner backend.
This class implements a backend for the Zoltan partitioner from the Sandia National Laboratories. This class only makes use for Zoltan's homebrew Hypergraph partitioners and does not use any of its other partitioning methods, although these could be integrated into this class later, if desired/required. This class is used by the Control::Domain::PartiDomainControl class and its functionality can be used by specifying the tag zoltan as a parameter to the –parti-type command line option.
Note that this class is only available if FEAT is configured and linked against the Zoltan third-party library, of course.
figure out max_procs/min_elems
allow the user to configure more Zoltan parameters
Definition at line 38 of file parti_zoltan.hpp.
| 
 | explicit | 
Constructor.
| [in] | comm | A resident reference to the communicator to be used by the partitioner. In a recursive partitioning setting, this has to be the progeny communicator. | 
Note that this class might create a sub-communicator of comm internally if there are too many ranks in the communicator for the given number of mesh elements or desired number of partitions to improve the computation vs communication trade-off. 
| 
 | inline | 
Builds and returns the elements-at-rank graph representing the partitioning.
Definition at line 145 of file parti_zoltan.hpp.
References _coloring, and FEAT::Adjacency::Coloring::create_partition_graph().
Referenced by FEAT::Control::Domain::PartiDomainControlBase< DomainLevel_ >::_apply_parti_zoltan().
| bool FEAT::Geometry::PartiZoltan::execute | ( | const Adjacency::Graph & | faces_at_elem, | 
| const Index | num_parts, | ||
| const std::vector< Real > & | weights | ||
| ) | 
Executes the Zoltan partitioner.
| [in] | faces_at_elem | A transient reference to the faces-at-element adjacency graph of the mesh that is to be partitioned. The face-dimension of the graph can be chosen freely, but typically in the finite element case this is the vertices-at-element index set of the mesh. | 
| [in] | num_parts | The desired number of partitions to create. Must be > 0, but it does not necessarily need to be equal to the number of processes in the communicator. | 
| [in] | weights | A vector containing the distribution weights for each element. May be empty if all elements are to be weighted equally. | 
true, if the partitioning was successful, or false, if some error occurred. | 
 | inline | 
Executes the Zoltan partitioner.
| [in] | faces_at_elem | A transient reference to the faces-at-element index set of the mesh that is to be partitioned. The face-dimension of the index set can be chosen freely, but typically in the finite element case this is the vertices-at-element index set of the mesh. | 
| [in] | num_parts | The desired number of partitions to create. Must be > 0, but it does not necessarily need to be equal to the number of processes in the communicator. | 
| [in] | weights | A vector containing the distribution weights for each element. May be empty if all elements are to be weighted equally. | 
true, if the partitioning was successful, or false, if some error occurred. Definition at line 116 of file parti_zoltan.hpp.
References FEAT::Adjacency::as_is, and execute().
Referenced by FEAT::Control::Domain::PartiDomainControlBase< DomainLevel_ >::_apply_parti_zoltan(), and execute().
| 
 | inline | 
Returns the size of the internal sub-communicator.
This only gives useful results after the execute() function has been called.
Definition at line 155 of file parti_zoltan.hpp.
References _zoltan_comm, and FEAT::Dist::Comm::size().
| 
 | private | 
the element coloring
Definition at line 76 of file parti_zoltan.hpp.
Referenced by build_elems_at_rank().
| 
 | private | 
our main communicator
Definition at line 62 of file parti_zoltan.hpp.
| 
 | private | 
our hypergraph structure
Definition at line 74 of file parti_zoltan.hpp.
| 
 | private | 
maximum number of MPI processes to use
Definition at line 66 of file parti_zoltan.hpp.
| 
 | private | 
minimum number of elements per MPI process
Definition at line 68 of file parti_zoltan.hpp.
| 
 | private | 
the total number of elements
Definition at line 70 of file parti_zoltan.hpp.
| 
 | private | 
the desired number of partitions
Definition at line 72 of file parti_zoltan.hpp.
| 
 | private | 
a sub-communicator for the partitioner
Definition at line 64 of file parti_zoltan.hpp.
Referenced by get_sub_comm_size().
| 
 | private | 
zoltan internal data
Definition at line 78 of file parti_zoltan.hpp.