MOAB: Mesh Oriented datABase  (version 5.4.1)
PartitionerBase< T > Class Template Reference

#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 bool part_surf=false, const bool ghost=false, 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

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

Definition at line 119 of file PartitionerBase.hpp.

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

    : mbImpl( impl ), useCoords( use_coords )
#ifdef MOAB_HAVE_MPI
    , mbpc(parcomm)
#endif
, newComm( false ), assign_global_ids(false)
{
#ifdef MOAB_HAVE_MPI
    if(!mbpc)
    {
        mbpc = ParallelComm::get_pcomm( mbImpl, 0 );
        if( !mbpc )
        {
            mbpc    = new ParallelComm( impl, MPI_COMM_WORLD, 0 );
            newComm = true;
        }
    }
#endif
}
template<typename T >
PartitionerBase< T >::~PartitionerBase ( ) [inline, virtual]

Definition at line 145 of file PartitionerBase.hpp.

References mbpc.

{
#ifdef MOAB_HAVE_MPI
    if( newComm ) delete mbpc;
#endif
    mbImpl = NULL;
}

Member Function Documentation

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

Definition at line 101 of file PartitionerBase.hpp.

    {
        return assign_global_ids;
    }
template<typename T>
virtual ErrorCode PartitionerBase< T >::include_closure ( ) [pure virtual]

Implemented in ZoltanPartitioner, and MetisPartitioner.

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

Definition at line 86 of file PartitionerBase.hpp.

    {
        return partSets;
    };
template<typename T>
const Range& PartitionerBase< T >::part_sets ( ) const [inline]

Definition at line 91 of file PartitionerBase.hpp.

    {
        return partSets;
    };
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.

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 bool  part_surf = false,
const bool  ghost = false,
const int  projection_type = 0,
const bool  recompute_rcb_box = false,
const bool  print_time = false 
) [pure virtual]

Implemented in ZoltanPartitioner, and MetisPartitioner.

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

Definition at line 96 of file PartitionerBase.hpp.

Referenced by main().

    {
        assign_global_ids = id_opt;
    }
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

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

Definition at line 113 of file PartitionerBase.hpp.

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

Definition at line 107 of file PartitionerBase.hpp.

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

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

Definition at line 112 of file PartitionerBase.hpp.

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

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

Reimplemented in ZoltanPartitioner.

Definition at line 115 of file PartitionerBase.hpp.

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

Definition at line 111 of file PartitionerBase.hpp.

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines