Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
PartitionerBase< T > Class Template Referenceabstract

#include <PartitionerBase.hpp>

+ Inheritance diagram for PartitionerBase< T >:
+ Collaboration diagram for PartitionerBase< T >:

Public Member Functions

 PartitionerBase (Interface *impl=NULL, const bool use_coords=false)
 
virtual ~PartitionerBase ()
 
virtual ErrorCode partition_mesh_and_geometry (const double part_geom_mesh_size, const 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)=0
 
virtual ErrorCode partition_mesh (const 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)=0
 
virtual ErrorCode write_partition (const T nparts, Range &elems, const T *assignment, const bool write_as_sets, const bool write_as_tags)=0
 
virtual ErrorCode include_closure ()=0
 
Rangepart_sets ()
 
const Rangepart_sets () const
 
void set_global_id_option (bool id_opt)
 
bool get_global_id_option ()
 

Protected Attributes

InterfacembImpl
 
bool useCoords
 
bool newComm
 
bool assign_global_ids
 
Range partSets
 

Detailed Description

template<typename T>
class PartitionerBase< T >

Definition at line 39 of file PartitionerBase.hpp.

Constructor & Destructor Documentation

◆ PartitionerBase()

template<typename T >
PartitionerBase< T >::PartitionerBase ( Interface impl = NULL,
const bool  use_coords = false 
)
inline

Definition at line 119 of file PartitionerBase.hpp.

126  : mbImpl( impl )
127 #ifdef MOAB_HAVE_MPI
128  ,
129  mbpc( parcomm )
130 #endif
131  ,
132  useCoords( use_coords ), newComm( false ), assign_global_ids( false )
133 {
134 #ifdef MOAB_HAVE_MPI
135  if( !mbpc )
136  {
137  mbpc = ParallelComm::get_pcomm( mbImpl, 0 );
138  if( !mbpc )
139  {
140  mbpc = new ParallelComm( impl, MPI_COMM_WORLD, 0 );
141  newComm = true;
142  }
143  }
144 #endif
145 }

References PartitionerBase< T >::mbImpl, and PartitionerBase< T >::newComm.

◆ ~PartitionerBase()

template<typename T >
PartitionerBase< T >::~PartitionerBase
inlinevirtual

Definition at line 148 of file PartitionerBase.hpp.

149 {
150 #ifdef MOAB_HAVE_MPI
151  if( newComm ) delete mbpc;
152 #endif
153  mbImpl = NULL;
154 }

Member Function Documentation

◆ get_global_id_option()

template<typename T >
bool PartitionerBase< T >::get_global_id_option ( )
inline

Definition at line 101 of file PartitionerBase.hpp.

102  {
103  return assign_global_ids;
104  }

◆ include_closure()

template<typename T >
virtual ErrorCode PartitionerBase< T >::include_closure ( )
pure virtual

Implemented in ZoltanPartitioner, and MetisPartitioner.

◆ part_sets() [1/2]

template<typename T >
Range& PartitionerBase< T >::part_sets ( )
inline

Definition at line 86 of file PartitionerBase.hpp.

87  {
88  return partSets;
89  };

◆ part_sets() [2/2]

template<typename T >
const Range& PartitionerBase< T >::part_sets ( ) const
inline

Definition at line 91 of file PartitionerBase.hpp.

92  {
93  return partSets;
94  };

◆ partition_mesh()

template<typename T >
virtual ErrorCode PartitionerBase< T >::partition_mesh ( const 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 
)
pure virtual

Implemented in ZoltanPartitioner, and MetisPartitioner.

◆ partition_mesh_and_geometry()

template<typename T >
virtual ErrorCode PartitionerBase< T >::partition_mesh_and_geometry ( const double  part_geom_mesh_size,
const 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 
)
pure virtual

Implemented in ZoltanPartitioner, and MetisPartitioner.

◆ set_global_id_option()

template<typename T >
void PartitionerBase< T >::set_global_id_option ( bool  id_opt)
inline

Definition at line 96 of file PartitionerBase.hpp.

97  {
98  assign_global_ids = id_opt;
99  }

Referenced by main().

◆ write_partition()

template<typename T >
virtual ErrorCode PartitionerBase< T >::write_partition ( const T  nparts,
Range elems,
const T *  assignment,
const bool  write_as_sets,
const bool  write_as_tags 
)
pure virtual

Member Data Documentation

◆ assign_global_ids

template<typename T >
bool PartitionerBase< T >::assign_global_ids
protected

Definition at line 113 of file PartitionerBase.hpp.

◆ mbImpl

template<typename T >
Interface* PartitionerBase< T >::mbImpl
protected

Definition at line 107 of file PartitionerBase.hpp.

Referenced by PartitionerBase< T >::PartitionerBase().

◆ newComm

template<typename T >
bool PartitionerBase< T >::newComm
protected

Definition at line 112 of file PartitionerBase.hpp.

Referenced by PartitionerBase< T >::PartitionerBase().

◆ partSets

template<typename T >
Range PartitionerBase< T >::partSets
protected

Definition at line 115 of file PartitionerBase.hpp.

◆ useCoords

template<typename T >
bool PartitionerBase< T >::useCoords
protected

Definition at line 111 of file PartitionerBase.hpp.


The documentation for this class was generated from the following file: