Flow123d
jenkins-Flow123d-linux-release-multijob-198
|
Class for the mesh partitioning. This should provide: More...
#include <partitioning.hh>
Public Member Functions | |
Partitioning (Mesh *mesh, Input::Record in) | |
const Distribution * | get_init_distr () const |
const int * | get_loc_part () const |
shared_ptr< vector< int > > | subdomain_id_field_data () |
void | id_maps (int n_ids, int *id_4_old, Distribution *&new_ds, int *&id_4_loc, int *&new_4_id) |
~Partitioning () | |
Destructor. More... | |
Static Public Member Functions | |
static void | id_maps (int n_ids, int *id_4_old, const Distribution &old_ds, int *loc_part, Distribution *&new_ds, int *&id_4_loc, int *&new_4_id) |
Static Public Attributes | |
static Input::Type::Selection | graph_type_sel |
Input specification objects. More... | |
static Input::Type::Selection | tool_sel |
static Input::Type::Record | input_type |
Private Types | |
enum | PartitionTool { PETSc, METIS } |
enum | PartitionGraphType { any_neighboring, any_weight_lower_dim_cuts, same_dimension_neighboring } |
Private Member Functions | |
void | make_element_connection_graph () |
void | make_partition () |
Private Attributes | |
Mesh * | mesh_ |
The input mesh. More... | |
Input::Record | in_ |
Input Record accessor. More... | |
SparseGraph * | graph_ |
Graph used to partitioning the mesh. More... | |
int * | loc_part_ |
Partition numbers for local elements in original distribution of elements given be init_el_ds_ . More... | |
Distribution * | init_el_ds_ |
Original distribution of elements. Depends on type of partitioner. More... | |
shared_ptr< vector< int > > | seq_part_ |
Sequential partitioning for output. More... | |
Class for the mesh partitioning. This should provide:
Definition at line 29 of file partitioning.hh.
|
private |
Types of weights used for element partitioning.
Definition at line 82 of file partitioning.hh.
|
private |
Types of partitioning algorithms.
Enumerator | |
---|---|
PETSc |
Use PETSc interface to various partitioing tools. |
METIS |
Use direct interface to Metis. |
Definition at line 74 of file partitioning.hh.
Partitioning::Partitioning | ( | Mesh * | mesh, |
Input::Record | in | ||
) |
Constructor. A pointer to the mesh and accessor to an input record have to be provided.
Definition at line 41 of file partitioning.cc.
Partitioning::~Partitioning | ( | ) |
Destructor.
Definition at line 49 of file partitioning.cc.
const Distribution * Partitioning::get_init_distr | ( | ) | const |
Get initial distribution.
Definition at line 58 of file partitioning.cc.
const int * Partitioning::get_loc_part | ( | ) | const |
Get local part of mesh partition.
Definition at line 65 of file partitioning.cc.
void Partitioning::id_maps | ( | int | n_ids, |
int * | id_4_old, | ||
Distribution *& | new_ds, | ||
int *& | id_4_loc, | ||
int *& | new_4_id | ||
) |
Obsolete see source file for doc.
Definition at line 201 of file partitioning.cc.
|
static |
Old UGLY, PETSC dependent method for getting new numbering after partitioning.
n_ids - given maximal ID used in id_4_old id_4_old - given array of size init_el_ds_.size() - assign ID to an old index
new_ds - new distribution of elements according to current distributed partitioning loc_part_ id_4_loc - IDs for local elements in new distribution, has size new_ds->lsize() new_4_id - for given ID, the new index, -1 for unknown IDs
Definition at line 157 of file partitioning.cc.
|
private |
Creates sparse parallel graph from the mesh (using algorithm given by the key "graph_type" of the input record accessor in_
Definition at line 72 of file partitioning.cc.
|
private |
Creates sparse parallel graph from the mesh (using algorithm given by the key "graph_type" of the input record accessor in_
) calls partitioning tool given by the key "tool" of the input record accessor in_
) result is local part of the partitioning. Can be retrieved by get_loc_part()
.
Definition at line 122 of file partitioning.cc.
shared_ptr< vector< int > > Partitioning::subdomain_id_field_data | ( | ) |
Creates and returns vector with element partitioning for output.
Definition at line 207 of file partitioning.cc.
|
private |
Graph used to partitioning the mesh.
Definition at line 94 of file partitioning.hh.
|
static |
Input specification objects.
Definition at line 33 of file partitioning.hh.
|
private |
Input Record accessor.
Definition at line 91 of file partitioning.hh.
|
private |
Original distribution of elements. Depends on type of partitioner.
Definition at line 98 of file partitioning.hh.
|
static |
Definition at line 35 of file partitioning.hh.
|
private |
Partition numbers for local elements in original distribution of elements given be init_el_ds_
.
Definition at line 96 of file partitioning.hh.
|
private |
The input mesh.
Definition at line 89 of file partitioning.hh.
|
private |
Sequential partitioning for output.
Definition at line 100 of file partitioning.hh.
|
static |
Definition at line 34 of file partitioning.hh.