#include <MetisPartitioner.hpp>
Public Member Functions | |
MetisPartitioner (Interface *impl=NULL, const bool use_coords=false) | |
virtual | ~MetisPartitioner () |
virtual ErrorCode | partition_mesh_and_geometry (const double part_geom_mesh_size, const idx_t 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 idx_t 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) |
virtual ErrorCode | write_partition (const idx_t nparts, Range &elems, const idx_t *assignment, const bool write_as_sets, const bool write_as_tags) |
ErrorCode | write_aggregationtag_partition (const idx_t nparts, Range &elems, const idx_t *assignment, const bool write_as_sets, const bool write_as_tags) |
virtual ErrorCode | include_closure () |
Public Member Functions inherited from PartitionerBase< idx_t > | |
PartitionerBase (Interface *impl=NULL, const bool use_coords=false) | |
virtual | ~PartitionerBase () |
virtual ErrorCode | write_partition (const idx_t nparts, Range &elems, const idx_t *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 | |
ErrorCode | assemble_graph (const int dimension, std::vector< double > &coords, std::vector< idx_t > &moab_ids, std::vector< idx_t > &adjacencies, std::vector< idx_t > &length, Range &elems) |
ErrorCode | assemble_taggedsets_graph (const int dimension, std::vector< double > &coords, std::vector< idx_t > &moab_ids, std::vector< idx_t > &adjacencies, std::vector< idx_t > &length, Range &elems, const char *aggregating_tag) |
ErrorCode | assemble_taggedents_graph (const int dimension, std::vector< double > &coords, std::vector< idx_t > &moab_ids, std::vector< idx_t > &adjacencies, std::vector< idx_t > &length, Range &elems, const char *aggregating_tag) |
Additional Inherited Members | |
Protected Attributes inherited from PartitionerBase< idx_t > | |
Interface * | mbImpl |
bool | useCoords |
bool | newComm |
bool | assign_global_ids |
Range | partSets |
Definition at line 35 of file MetisPartitioner.hpp.
MetisPartitioner::MetisPartitioner | ( | Interface * | impl = NULL , |
const bool | use_coords = false |
||
) |
Definition at line 39 of file MetisPartitioner.cpp.
|
virtual |
Definition at line 45 of file MetisPartitioner.cpp.
|
private |
Definition at line 373 of file MetisPartitioner.cpp.
References PartitionerBase< idx_t >::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::Range::index(), length(), moab::MAX_SUB_ENTITIES, MB_CHK_ERR, MB_SUCCESS, PartitionerBase< idx_t >::mbImpl, and moab::Range::size().
Referenced by partition_mesh().
|
private |
Definition at line 183 of file MetisPartitioner.cpp.
References moab::Interface::add_entities(), assemble_taggedsets_graph(), moab::Range::begin(), moab::Range::clear(), moab::Interface::create_meshset(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type_and_tag(), length(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, PartitionerBase< idx_t >::mbImpl, MESHSET_SET, moab::Interface::tag_delete(), moab::Interface::tag_delete_data(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_get_type(), moab::Interface::tag_set_data(), and TagType.
Referenced by partition_mesh().
|
private |
Definition at line 248 of file MetisPartitioner.cpp.
References moab::Range::begin(), debug, moab::Interface::delete_entities(), moab::Interface::dimension_from_handle(), moab::Range::empty(), moab::Range::end(), moab::Range::erase(), ErrorCode, moab::Skinner::find_skin(), moab::GeomUtil::first(), moab::MeshTopoUtil::get_average_position(), moab::Interface::get_entities_by_handle(), moab::Interface::get_entities_by_type_and_tag(), moab::intersect(), length(), moab::Range::lower_bound(), MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, PartitionerBase< idx_t >::mbImpl, moab::Range::rbegin(), moab::Range::size(), moab::Interface::tag_delete(), moab::Interface::tag_delete_data(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_get_type(), moab::Interface::tag_set_data(), TagType, and moab::Range::upper_bound().
Referenced by assemble_taggedents_graph(), and partition_mesh().
|
inlinevirtual |
Implements PartitionerBase< idx_t >.
Definition at line 129 of file MetisPartitioner.hpp.
References MB_NOT_IMPLEMENTED.
|
virtual |
Implements PartitionerBase< idx_t >.
Definition at line 47 of file MetisPartitioner.cpp.
References assemble_graph(), assemble_taggedents_graph(), assemble_taggedsets_graph(), PartitionerBase< idx_t >::assign_global_ids, ErrorCode, length(), MB_CHK_ERR, MB_SET_ERR, MB_SUCCESS, nparts, print_time(), write_aggregationtag_partition(), and write_partition().
Referenced by main().
|
inlinevirtual |
Implements PartitionerBase< idx_t >.
Definition at line 111 of file MetisPartitioner.hpp.
References nparts, and print_time().
ErrorCode MetisPartitioner::write_aggregationtag_partition | ( | const idx_t | nparts, |
Range & | elems, | ||
const idx_t * | assignment, | ||
const bool | write_as_sets, | ||
const bool | write_as_tags | ||
) |
Definition at line 460 of file MetisPartitioner.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_handle(), moab::Interface::get_entities_by_type_and_tag(), moab::Interface::get_number_entities_by_handle(), moab::Range::insert(), MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, PartitionerBase< idx_t >::mbImpl, MESHSET_SET, nparts, PartitionerBase< idx_t >::partSets, moab::Range::pop_back(), moab::Range::size(), moab::Range::swap(), moab::Interface::tag_delete_data(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by partition_mesh().
|
virtual |
Definition at line 578 of file MetisPartitioner.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_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, PartitionerBase< idx_t >::mbImpl, MESHSET_SET, nparts, PartitionerBase< idx_t >::partSets, moab::Range::pop_back(), moab::Range::size(), moab::Range::swap(), moab::Interface::tag_delete_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by partition_mesh().