#include <ZoltanPartitioner.hpp>
Inheritance diagram for ZoltanPartitioner:
Collaboration diagram for ZoltanPartitioner:Public Member Functions | |
| ZoltanPartitioner (Interface *impl=NULL, const bool use_coords=false, int argc=0, char **argv=NULL) | |
| virtual | ~ZoltanPartitioner () |
| ErrorCode | balance_mesh (const char *zmethod, const char *other_method, const bool write_as_sets=true, const bool write_as_tags=false) |
| virtual ErrorCode | partition_mesh_and_geometry (const double part_geom_mesh_size, const int nparts, const char *zmethod, const char *other_method, double imbal_tol, const int part_dim=3, const bool write_as_sets=true, const bool write_as_tags=false, const int obj_weight=0, const int edge_weight=0, const int projection_type=0, const bool recompute_rcb_box=false, const bool print_time=false) |
| virtual ErrorCode | partition_mesh (const int nparts, const char *method, const int part_dim=3, const bool write_as_sets=true, const bool write_as_tags=false, const bool partition_tagged_sets=false, const bool partition_tagged_ents=false, const char *aggregating_tag=NULL, const bool print_time=false) |
| ErrorCode | partition_inferred_mesh (EntityHandle sfileset, size_t num_parts, int part_dim=3, const bool write_as_sets=true, int projection_type=0) |
| virtual ErrorCode | write_partition (const int nparts, Range &elems, const int *assignment, const bool write_as_sets, const bool write_as_tags) |
| ErrorCode | repartition (std::vector< double > &x, std::vector< double > &y, std::vector< double > &z, int StartID, const char *zmethod, Range &localGIDs) |
| ErrorCode | repartition_to_procs (std::vector< double > &x, std::vector< double > &y, std::vector< double > &z, std::vector< int > &gids, const char *zmethod, std::vector< int > &dest) |
| ErrorCode | partition_owned_cells (Range &owned, std::multimap< int, int > &extraGraphEdges, std::map< int, int > procs, int &numNewPartitions, std::map< int, Range > &distribution, int met) |
| ErrorCode | include_closure () |
| void | SetOCTPART_Parameters (const char *oct_method) |
| void | SetPARMETIS_Parameters (const char *parmetis_method) |
| void | SetHypergraph_Parameters (const char *phg_method) |
| void | SetHSFC_Parameters () |
| void | SetRIB_Parameters () |
| void | SetRCB_Parameters (const bool recompute_rcb_box=false) |
Public Member Functions inherited from PartitionerBase< int > | |
| PartitionerBase (Interface *impl=NULL, const bool use_coords=false) | |
| virtual | ~PartitionerBase () |
| virtual ErrorCode | write_partition (const int nparts, Range &elems, const int *assignment, const bool write_as_sets, const bool write_as_tags)=0 |
| Range & | part_sets () |
| const Range & | part_sets () const |
| void | set_global_id_option (bool id_opt) |
| bool | get_global_id_option () |
Private Member Functions | |
| int | mbGlobalSuccess (int rc) |
| void | mbPrintGlobalResult (const char *s, int begin, int import, int exp, int change) |
| void | mbShowError (int val, const char *s) |
| ErrorCode | assemble_graph (const int dimension, std::vector< double > &coords, std::vector< int > &moab_ids, std::vector< int > &adjacencies, std::vector< int > &length, Range &elems, bool part_geom=false, const int projection_type=0) |
| void | mbFinalizePoints (int npts, int numExport, ZOLTAN_ID_PTR exportLocalIDs, int *exportProcs, int **assignment) |
| int | mbInitializePoints (int npts, double *pts, int *ids, int *adjs, int *length, double *obj_weights=NULL, double *edge_weights=NULL, int *parts=NULL, bool part_geom=false) |
Private Attributes | |
| Zoltan * | myZZ |
| Range | partSets |
| int | myNumPts |
| int | argcArg |
| char ** | argvArg |
Additional Inherited Members | |
Protected Attributes inherited from PartitionerBase< int > | |
| Interface * | mbImpl |
| bool | useCoords |
| bool | newComm |
| bool | assign_global_ids |
| Range | partSets |
Definition at line 102 of file ZoltanPartitioner.hpp.
| ZoltanPartitioner::ZoltanPartitioner | ( | Interface * | impl = NULL, |
| const bool | use_coords = false, |
||
| int | argc = 0, |
||
| char ** | argv = NULL |
||
| ) |
Definition at line 56 of file ZoltanPartitioner.cpp.
|
virtual |
Definition at line 74 of file ZoltanPartitioner.cpp.
References myZZ.
|
private |
Definition at line 839 of file ZoltanPartitioner.cpp.
References PartitionerBase< int >::assign_global_ids, moab::Range::begin(), moab::Range::clear(), debug, moab::Range::empty(), moab::Range::end(), ErrorCode, moab::MeshTopoUtil::get_average_position(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Interface::get_entities_by_dimension(), moab::Interface::globalId_tag(), length(), moab::MAX_SUB_ENTITIES, MB_SUCCESS, PartitionerBase< int >::mbImpl, RR, moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by balance_mesh(), and partition_mesh_and_geometry().
| ErrorCode ZoltanPartitioner::balance_mesh | ( | const char * | zmethod, |
| const char * | other_method, | ||
| const bool | write_as_sets = true, |
||
| const bool | write_as_tags = false |
||
| ) |
Definition at line 79 of file ZoltanPartitioner.cpp.
References argcArg, argvArg, assemble_graph(), ErrorCode, length(), MB_SUCCESS, mbFinalizePoints(), mbGetEdgeList(), mbGetNumberOfAssignedObjects(), mbGetNumberOfEdges(), mbGetObject(), mbGetObjectList(), mbGetObjectSize(), mbGlobalSuccess(), mbInitializePoints(), mbPrintGlobalResult(), myNumPts, myZZ, RR, SetHSFC_Parameters(), SetHypergraph_Parameters(), SetOCTPART_Parameters(), SetPARMETIS_Parameters(), SetRCB_Parameters(), SetRIB_Parameters(), and write_partition().
|
virtual |
Implements PartitionerBase< int >.
Definition at line 771 of file ZoltanPartitioner.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::Range::clear(), moab::Interface::dimension_from_handle(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Range::find(), moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_handle(), moab::Interface::get_entities_by_type(), moab::intersect(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, PartitionerBase< int >::mbImpl, partSets, RR, moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by main().
|
private |
Definition at line 1246 of file ZoltanPartitioner.cpp.
References NumPoints.
Referenced by balance_mesh().
|
private |
Definition at line 1293 of file ZoltanPartitioner.cpp.
References fail(), and mbShowError().
Referenced by balance_mesh().
|
private |
Definition at line 1126 of file ZoltanPartitioner.cpp.
References EdgeWeights, GlobalIds, length(), NborGlobalId, NborProcs, NumEdges, NumPoints, ObjWeights, Parts, Points, and moab::sum().
Referenced by balance_mesh(), and partition_mesh_and_geometry().
|
private |
|
private |
| ErrorCode ZoltanPartitioner::partition_inferred_mesh | ( | EntityHandle | sfileset, |
| size_t | num_parts, | ||
| int | part_dim = 3, |
||
| const bool | write_as_sets = true, |
||
| int | projection_type = 0 |
||
| ) |
Definition at line 435 of file ZoltanPartitioner.cpp.
References moab::Interface::add_entities(), moab::Interface::add_parent_child(), moab::Interface::create_meshset(), ErrorCode, moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type_and_tag(), MB_SUCCESS, MBENTITYSET, PartitionerBase< int >::mbImpl, MESHSET_SET, myZZ, moab::Interface::remove_entities(), RR, moab::Range::size(), and moab::Interface::tag_set_data().
Referenced by main().
|
inlinevirtual |
Implements PartitionerBase< int >.
Definition at line 244 of file ZoltanPartitioner.hpp.
References nparts, and print_time().
|
virtual |
Implements PartitionerBase< int >.
Definition at line 522 of file ZoltanPartitioner.cpp.
References argcArg, argvArg, assemble_graph(), moab::Range::empty(), ErrorCode, moab::Interface::get_entities_by_dimension(), length(), MB_CHK_SET_ERR, MB_SUCCESS, mbGetEdgeList(), mbGetNumberOfAssignedObjects(), mbGetNumberOfEdges(), mbGetObject(), mbGetObjectList(), mbGetObjectSize(), mbGetPart(), PartitionerBase< int >::mbImpl, mbInitializePoints(), myNumPts, myZZ, nparts, print_time(), RR, SetHSFC_Parameters(), SetHypergraph_Parameters(), SetOCTPART_Parameters(), SetPARMETIS_Parameters(), SetRCB_Parameters(), SetRIB_Parameters(), moab::Range::size(), and write_partition().
Referenced by main().
| ErrorCode ZoltanPartitioner::partition_owned_cells | ( | Range & | owned, |
| std::multimap< int, int > & | extraGraphEdges, | ||
| std::map< int, int > | procs, | ||
| int & | numNewPartitions, | ||
| std::map< int, Range > & | distribution, | ||
| int | met | ||
| ) |
Definition at line 1544 of file ZoltanPartitioner.cpp.
References argcArg, argvArg, moab::Range::begin(), moab::Range::clear(), moab::Interface::dimension_from_handle(), EdgeWeights, moab::Range::empty(), moab::Range::end(), moab::MeshTopoUtil::get_average_position(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Interface::get_coords(), moab::Interface::globalId_tag(), GlobalIds, moab::Range::insert(), length(), moab::MAX_SUB_ENTITIES, MB_CHK_ERR, MB_SUCCESS, mbGetEdgeList(), mbGetNumberOfAssignedObjects(), mbGetNumberOfEdges(), mbGetObject(), mbGetObjectList(), mbGetObjectSize(), PartitionerBase< int >::mbImpl, MBVERTEX, myZZ, NborGlobalId, NborProcs, NumEdges, NumPoints, ObjWeights, Parts, Points, moab::Range::rbegin(), SetHypergraph_Parameters(), SetRCB_Parameters(), moab::Range::size(), moab::Interface::tag_get_data(), and moab::TYPE_FROM_HANDLE().
Referenced by moab::ParCommGraph::compute_partition().
| ErrorCode ZoltanPartitioner::repartition | ( | std::vector< double > & | x, |
| std::vector< double > & | y, | ||
| std::vector< double > & | z, | ||
| int | StartID, | ||
| const char * | zmethod, | ||
| Range & | localGIDs | ||
| ) |
Definition at line 322 of file ZoltanPartitioner.cpp.
References argcArg, argvArg, EdgeWeights, GlobalIds, MB_SUCCESS, mbGetEdgeList(), mbGetNumberOfAssignedObjects(), mbGetNumberOfEdges(), mbGetObject(), mbGetObjectList(), mbGetObjectSize(), myZZ, NborGlobalId, NborProcs, NumEdges, NumPoints, ObjWeights, Parts, Points, SetHSFC_Parameters(), SetRCB_Parameters(), SetRIB_Parameters(), moab::subtract(), and moab::unite().
| ErrorCode ZoltanPartitioner::repartition_to_procs | ( | std::vector< double > & | x, |
| std::vector< double > & | y, | ||
| std::vector< double > & | z, | ||
| std::vector< int > & | gids, | ||
| const char * | zmethod, | ||
| std::vector< int > & | dest | ||
| ) |
Definition at line 217 of file ZoltanPartitioner.cpp.
References argcArg, argvArg, EdgeWeights, GlobalIds, MB_SUCCESS, mbGetEdgeList(), mbGetNumberOfAssignedObjects(), mbGetNumberOfEdges(), mbGetObject(), mbGetObjectList(), mbGetObjectSize(), myZZ, NborGlobalId, NborProcs, NumEdges, NumPoints, ObjWeights, Parts, Points, SetHSFC_Parameters(), SetRCB_Parameters(), and SetRIB_Parameters().
| void ZoltanPartitioner::SetHSFC_Parameters | ( | ) |
Definition at line 1073 of file ZoltanPartitioner.cpp.
References myZZ.
Referenced by balance_mesh(), partition_mesh_and_geometry(), repartition(), and repartition_to_procs().
| void ZoltanPartitioner::SetHypergraph_Parameters | ( | const char * | phg_method | ) |
Definition at line 1086 of file ZoltanPartitioner.cpp.
References myZZ.
Referenced by balance_mesh(), partition_mesh_and_geometry(), and partition_owned_cells().
| void ZoltanPartitioner::SetOCTPART_Parameters | ( | const char * | oct_method | ) |
Definition at line 1112 of file ZoltanPartitioner.cpp.
References myZZ.
Referenced by balance_mesh(), and partition_mesh_and_geometry().
| void ZoltanPartitioner::SetPARMETIS_Parameters | ( | const char * | parmetis_method | ) |
Definition at line 1099 of file ZoltanPartitioner.cpp.
References myZZ.
Referenced by balance_mesh(), and partition_mesh_and_geometry().
| void ZoltanPartitioner::SetRCB_Parameters | ( | const bool | recompute_rcb_box = false | ) |
Definition at line 1043 of file ZoltanPartitioner.cpp.
References myZZ.
Referenced by balance_mesh(), partition_mesh_and_geometry(), partition_owned_cells(), repartition(), and repartition_to_procs().
| void ZoltanPartitioner::SetRIB_Parameters | ( | ) |
Definition at line 1059 of file ZoltanPartitioner.cpp.
References myZZ.
Referenced by balance_mesh(), partition_mesh_and_geometry(), repartition(), and repartition_to_procs().
|
virtual |
Definition at line 929 of file ZoltanPartitioner.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::Range::clear(), moab::Interface::clear_meshset(), moab::Interface::create_meshset(), moab::Interface::delete_entities(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_type_and_tag(), moab::Interface::get_number_entities_by_handle(), moab::Range::insert(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, PartitionerBase< int >::mbImpl, MESHSET_SET, nparts, partSets, moab::Range::pop_back(), RR, moab::Range::size(), moab::Range::swap(), moab::Interface::tag_delete_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by balance_mesh(), and partition_mesh_and_geometry().
|
private |
Definition at line 210 of file ZoltanPartitioner.hpp.
Referenced by balance_mesh(), partition_mesh_and_geometry(), partition_owned_cells(), repartition(), and repartition_to_procs().
|
private |
Definition at line 212 of file ZoltanPartitioner.hpp.
Referenced by balance_mesh(), partition_mesh_and_geometry(), partition_owned_cells(), repartition(), and repartition_to_procs().
|
private |
Definition at line 208 of file ZoltanPartitioner.hpp.
Referenced by balance_mesh(), and partition_mesh_and_geometry().
|
private |
Definition at line 204 of file ZoltanPartitioner.hpp.
Referenced by balance_mesh(), partition_inferred_mesh(), partition_mesh_and_geometry(), partition_owned_cells(), repartition(), repartition_to_procs(), SetHSFC_Parameters(), SetHypergraph_Parameters(), SetOCTPART_Parameters(), SetPARMETIS_Parameters(), SetRCB_Parameters(), SetRIB_Parameters(), and ~ZoltanPartitioner().
|
private |
Definition at line 206 of file ZoltanPartitioner.hpp.
Referenced by include_closure(), and write_partition().