Namespace for METIS graph partitioning routines. More...
Typedefs | |
typedef void(* | ErrorToWeightFctPt) (const double &spatial_error, const double &max_error, const double &min_error, int &weight) |
Typedef for function pointer to to function that translates spatial error into weight for METIS partitioning. More... | |
Functions | |
void | default_error_to_weight_fct (const double &spatial_error, const double &max_error, const double &min_error, int &weight) |
Default function that translates spatial error into weight for METIS partitioning (unit weight regardless of input). More... | |
void | uniform_partition_mesh (Problem *problem_pt, const unsigned &ndomain, Vector< unsigned > &element_domain) |
Partition mesh uniformly by dividing elements equally over the partitions, in the order in which they are returned by problem. On return, element_domain[ielem] contains the number of the domain [0,1,...,ndomain-1] to which element ielem has been assigned. More... | |
void | partition_mesh (Problem *problem_pt, const unsigned &ndomain, const unsigned &objective, Vector< unsigned > &element_domain) |
Use METIS to assign each element to a domain. On return, element_domain[ielem] contains the number of the domain [0,1,...,ndomain-1] to which element ielem has been assigned. More... | |
void | partition_mesh (OomphCommunicator *comm_pt, Mesh *mesh_pt, const unsigned &ndomain, const unsigned &objective, Vector< unsigned > &element_domain) |
Use METIS to assign each element to a domain. On return, element_domain[ielem] contains the number of the domain [0,1,...,ndomain-1] to which element ielem has been assigned. More... | |
void | partition_distributed_mesh (Problem *problem_pt, const unsigned &objective, Vector< unsigned > &element_domain_on_this_proc, const bool &bypass_metis=false) |
Use METIS to assign each element in an already-distributed mesh to a domain. On return, element_domain_on_this_proc[e] contains the number of the domain [0,1,...,ndomain-1] to which non-halo element e on THE CURRENT PROCESSOR ONLY has been assigned. The order of the non-halo elements is the same as in the Problem's mesh, with the halo elements being skipped. More... | |
Variables | |
ErrorToWeightFctPt | Error_to_weight_fct_pt = &default_error_to_weight_fct |
Function pointer to to function that translates spatial error into weight for METIS partitioning. More... | |
Namespace for METIS graph partitioning routines.
typedef void(* oomph::METIS::ErrorToWeightFctPt) (const double &spatial_error, const double &max_error, const double &min_error, int &weight) |
Typedef for function pointer to to function that translates spatial error into weight for METIS partitioning.
Definition at line 83 of file partitioning.h.
void oomph::METIS::default_error_to_weight_fct | ( | const double & | spatial_error, |
const double & | max_error, | ||
const double & | min_error, | ||
int & | weight | ||
) |
Default function that translates spatial error into weight for METIS partitioning (unit weight regardless of input).
Default function that translates spatial error into weight for METIS partitioning (unit weight regardless of input)
Definition at line 53 of file partitioning.cc.
Referenced by partition_mesh().
void oomph::METIS::partition_distributed_mesh | ( | Problem * | problem_pt, |
const unsigned & | objective, | ||
Vector< unsigned > & | element_domain_on_this_proc, | ||
const bool & | bypass_metis = false |
||
) |
Use METIS to assign each element in an already-distributed mesh to a domain. On return, element_domain_on_this_proc[e] contains the number of the domain [0,1,...,ndomain-1] to which non-halo element e on THE CURRENT PROCESSOR ONLY has been assigned. The order of the non-halo elements is the same as in the Problem's mesh, with the halo elements being skipped.
Use METIS to assign each element in an already-distributed mesh to a domain. On return, element_domain_on_this_proc[e] contains the number of the domain [0,1,...,ndomain-1] to which non-halo element e on THE CURRENT PROCESSOR ONLY has been assigned. The order of the non-halo elements is the same as in the Problem's mesh, with the halo elements being skipped. Objective:
Objective:
The partioning is based on the dof graph of the complete mesh by taking into account which global equation numbers are affected by each element and connecting elements which affect the same global equation number. Partitioning is done such that all elements associated with the same tree root move together. Non-refineable elements are treated as their own root elements. If the optional boolean flag is set to true (it defaults to false) each processor assigns a dumb-but-repeatable equidistribution of its non-halo elements over the domains and outputs the input that would have gone into METIS in the file metis_input_for_validation.dat
The partioning is based on the dof graph of the complete mesh by taking into account which global equation numbers are affected by each element and connecting elements which affect the same global equation number. Partitioning is done such that all elements associated with the same tree root move together. Non-refineable elements are treated as their own root elements. If the optional boolean flag is set to true (it defaults to false) each processor assigns a dumb-but-repeatable equidistribution of its non-halo elements over the domains and outputs the input that would have gone into METIS in the file metis_input_for_validation.dat
Definition at line 589 of file partitioning.cc.
References oomph::Problem::communicator_pt(), e, oomph::Mesh::element_pt(), oomph::Problem::elemental_assembly_time(), oomph::GeneralisedElement::eqn_number(), i, oomph::GeneralisedElement::is_halo(), oomph::Problem::mesh_pt(), oomph::METIS_PartGraphKway(), oomph::METIS_PartGraphVKway(), oomph::GeneralisedElement::ndof(), oomph::Mesh::nelement(), oomph::oomph_info, and oomph::RefineableElement::root_element_pt().
Referenced by oomph::Problem::load_balance().
void oomph::METIS::partition_mesh | ( | OomphCommunicator * | comm_pt, |
Mesh * | mesh_pt, | ||
const unsigned & | ndomain, | ||
const unsigned & | objective, | ||
Vector< unsigned > & | element_domain | ||
) |
Use METIS to assign each element to a domain. On return, element_domain[ielem] contains the number of the domain [0,1,...,ndomain-1] to which element ielem has been assigned.
Partioning is based on nodal graph of mesh.
void oomph::METIS::partition_mesh | ( | Problem * | problem_pt, |
const unsigned & | ndomain, | ||
const unsigned & | objective, | ||
Vector< unsigned > & | element_domain | ||
) |
Use METIS to assign each element to a domain. On return, element_domain[ielem] contains the number of the domain [0,1,...,ndomain-1] to which element ielem has been assigned.
Partioning is based on nodal graph of mesh.
Partioning is based on dual graph of mesh.
Definition at line 116 of file partitioning.cc.
References oomph::Problem::communicator_pt(), default_error_to_weight_fct(), e, oomph::Mesh::element_pt(), oomph::GeneralisedElement::eqn_number(), Error_to_weight_fct_pt, oomph::ErrorEstimator::get_element_errors(), oomph::Problem::mesh_pt(), oomph::METIS_PartGraphKway(), oomph::METIS_PartGraphVKway(), oomph::GeneralisedElement::ndof(), oomph::Mesh::nelement(), oomph::Problem::nsub_mesh(), oomph::oomph_info, oomph::RefineableMeshBase::spatial_error_estimator_pt(), and oomph::CumulativeTimings::start().
Referenced by oomph::Problem::partition_global_mesh().
void oomph::METIS::uniform_partition_mesh | ( | Problem * | problem_pt, |
const unsigned & | ndomain, | ||
Vector< unsigned > & | element_domain | ||
) |
Partition mesh uniformly by dividing elements equally over the partitions, in the order in which they are returned by problem. On return, element_domain[ielem] contains the number of the domain [0,1,...,ndomain-1] to which element ielem has been assigned.
Definition at line 76 of file partitioning.cc.
References oomph::Problem::mesh_pt(), and oomph::Mesh::nelement().
ErrorToWeightFctPt oomph::METIS::Error_to_weight_fct_pt = &default_error_to_weight_fct |
Function pointer to to function that translates spatial error into weight for METIS partitioning.
Definition at line 63 of file partitioning.cc.
Referenced by partition_mesh().