Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

Isorropia::Partitioner Class Reference

Interface (abstract base class) for computing a new partitioning and describing the layout of elements in the new partitions. More...

#include <Isorropia_Partitioner.hpp>

Inheritance diagram for Isorropia::Partitioner:

List of all members.

Public Member Functions

virtual ~Partitioner ()
virtual void setParameters (const Teuchos::ParameterList &paramlist)=0
 Set parameters for the Partitioner instance.
virtual void compute_partitioning (bool force_repartitioning=false)=0
 Method which does the work of computing a new partitioning.
virtual bool partitioning_already_computed () const =0
 Query whether compute_partitioning() has already been called.
virtual int newPartitionNumber (int myElem) const =0
 Return the new partition ID for a given element that resided locally in the old partitioning.
virtual int numElemsInPartition (int partition) const =0
 Return the number of elements in a given partition.
virtual void elemsInPartition (int partition, int *elementList, int len) const =0
 Fill user-allocated list (of length len) with the global element ids to be located in the given partition.

Detailed Description

Interface (abstract base class) for computing a new partitioning and describing the layout of elements in the new partitions.

If the methods which describe the new partitioning (e.g., newPartitionNumber(), etc.) are called before compute_partitioning() has been called, behavior is not well defined. Implementations will either return empty/erroneous data, or throw an exception. In most cases, implementations will probably call compute_partitioning() internally in a constructor or factory method, so this won't usually be an issue.

Member Function Documentation

virtual void Isorropia::Partitioner::setParameters const Teuchos::ParameterList &  paramlist  )  [pure virtual]

Set parameters for the Partitioner instance.

The contents of the input paramlist object are copied into an internal ParameterList attribute. Instances of this interface should not retain a reference to the input ParameterList after this method returns.

Implemented in Isorropia::Epetra::Partitioner.

virtual void Isorropia::Partitioner::compute_partitioning bool  force_repartitioning = false  )  [pure virtual]

Method which does the work of computing a new partitioning.

Implementations of this interface will typically be constructed with an object or information describing the existing ('old') partitioning. This method computes a 'new' rebalanced partitioning for that input data.

force_repartitioning Optional argument defaults to false. Depending on the implementation, compute_partitioning() should only perform a repartitioning the first time it is called, and subsequent repeated calls are no-ops. If the user's intent is to re-compute the partitioning (e.g., if parameters or other inputs have been changed), then setting this flag to true will force a new partitioning to be computed.

Implemented in Isorropia::Epetra::Partitioner.

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