Isorropia::Epetra::Operator Class Reference

An implementation of the Partitioner interface that operates on Epetra matrices and linear systems. More...

#include <Isorropia_EpetraOperator.hpp>

Inheritance diagram for Isorropia::Epetra::Operator:

Inheritance graph
[legend]
Collaboration diagram for Isorropia::Epetra::Operator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Operator (Teuchos::RCP< const Epetra_CrsGraph > input_graph, const Teuchos::ParameterList &paramlist)
 Constructor that accepts an Epetra_CrsGraph object, called by API function create_partitioner().
 Operator (Teuchos::RCP< const Epetra_CrsGraph > input_graph, Teuchos::RCP< CostDescriber > costs, const Teuchos::ParameterList &paramlist)
 Constructor that accepts an Epetra_CrsGraph object and a CostDescriber, called by API function create_partitioner().
 Operator (Teuchos::RCP< const Epetra_RowMatrix > input_matrix, const Teuchos::ParameterList &paramlist)
 Constructor that accepts an Epetra_RowMatrix object, called by API function create_partitioner().
 Operator (Teuchos::RCP< const Epetra_RowMatrix > input_matrix, Teuchos::RCP< CostDescriber > costs, const Teuchos::ParameterList &paramlist)
 Constructor that accepts an Epetra_RowMatrix object and a CostDescriber, called by API function create_partitioner().
virtual ~Operator ()
 Destructor.
void setParameters (const Teuchos::ParameterList &paramlist)
 setParameters() is an internal Partitioner method which handles the parameters from a Teuchos::ParameterList object.
virtual void compute (bool force_compute)=0
 Method which does the work of computing a new partitioning/coloring/ordering, depending on the child class used.
bool alreadyComputed () const
 Query whether compute_partitioning() has already been called.
int numProperties () const
 Return the number of different values used for "properties".
virtual const int & operator[] (int myElem) const
 Return the new partition ID for a given element that resided locally in the old partitioning.
virtual int numElemsWithProperty (int property) const
 Return the number of elements in a given partition.
virtual void elemsWithProperty (int property, int *elementList, int len) const
 Fill user-allocated list (of length len) with the global element ids to be located in the given partition.

Protected Member Functions

void computeNumberOfProperties ()

Protected Attributes

Teuchos::RCP< const Epetra_BlockMap > input_map_
Teuchos::RCP< const Epetra_CrsGraph > input_graph_
Teuchos::RCP< const Epetra_RowMatrix > input_matrix_
Teuchos::RCP< Isorropia::Epetra::CostDescribercosts_
Teuchos::RCP< Epetra_Vector > weights_
Teuchos::ParameterList paramlist_
int exportsSize_
std::vector< int > imports_
std::vector< int > properties_
bool operation_already_computed_
int global_num_vertex_weights_
int global_num_graph_edge_weights_
int global_num_hg_edge_weights_
Teuchos::RCP< Librarylib_

Private Member Functions

void paramsToUpper (Teuchos::ParameterList &, int &changed)
void stringToUpper (std::string &s, int &changed)

Private Attributes

int numberOfProperties_
std::vector< int > numberElemsByProperties_

Detailed Description

An implementation of the Partitioner interface that operates on Epetra matrices and linear systems.


Constructor & Destructor Documentation

Isorropia::Epetra::Operator::Operator ( Teuchos::RCP< const Epetra_CrsGraph >  input_graph,
const Teuchos::ParameterList &  paramlist 
)

Constructor that accepts an Epetra_CrsGraph object, called by API function create_partitioner().

Parameters:
input_graph Matrix-graph object for which a new partitioning is to be computed. A Teuchos::RCP is used here because a reference to the input object may be held by this object after this constructor completes and returns.
paramlist Teuchos::ParameterList which will be copied to an internal ParameterList attribute. No reference to this input object is held after this constructor completes.
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the balancing. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. Refer to the Zoltan users guide for specific parameters that Zoltan recognizes. A couple of important ones are "LB_METHOD" (valid values include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are 0 to 10, default is 1), etc.
compute_partitioning_now Optional argument defaults to true. If true, the method compute_partitioning() will be called before this constructor returns.

Isorropia::Epetra::Operator::Operator ( Teuchos::RCP< const Epetra_CrsGraph >  input_graph,
Teuchos::RCP< CostDescriber costs,
const Teuchos::ParameterList &  paramlist 
)

Constructor that accepts an Epetra_CrsGraph object and a CostDescriber, called by API function create_partitioner().

Parameters:
input_graph Matrix-graph object for which a new partitioning is to be computed. A Teuchos::RCP is used here because a reference to the input object may be held by this object after this constructor completes and returns.
costs CostDescriber object which allows for user-specified weights of varying types to be provided to the partitioner.
paramlist Teuchos::ParameterList which will be copied to an internal ParameterList attribute. No reference to this input object is held after this constructor completes.
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the balancing. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. Refer to the Zoltan users guide for specific parameters that Zoltan recognizes. A couple of important ones are "LB_METHOD" (valid values include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are 0 to 10, default is 1), etc.
compute_partitioning_now Optional argument defaults to true. If true, the method compute_partitioning() will be called before this constructor returns.

Isorropia::Epetra::Operator::Operator ( Teuchos::RCP< const Epetra_RowMatrix >  input_matrix,
const Teuchos::ParameterList &  paramlist 
)

Constructor that accepts an Epetra_RowMatrix object, called by API function create_partitioner().

Parameters:
input_matrix Matrix object for which a new partitioning is to be computed. A Teuchos::RCP is used here because a reference to the input object may be held by this object after this constructor completes and returns.
paramlist Teuchos::ParameterList which will be copied to an internal ParameterList attribute. No reference to this input object is held after this constructor completes.
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the balancing. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. Refer to the Zoltan users guide for specific parameters that Zoltan recognizes. A couple of important ones are "LB_METHOD" (valid values include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are 0 to 10, default is 1), etc.
compute_partitioning_now Optional argument defaults to true. If true, the method compute_partitioning() will be called before this constructor returns.

Isorropia::Epetra::Operator::Operator ( Teuchos::RCP< const Epetra_RowMatrix >  input_matrix,
Teuchos::RCP< CostDescriber costs,
const Teuchos::ParameterList &  paramlist 
)

Constructor that accepts an Epetra_RowMatrix object and a CostDescriber, called by API function create_partitioner().

Parameters:
input_matrix Matrix object for which a new partitioning is to be computed. A Teuchos::RCP is used here because a reference to the input object may be held by this object after this constructor completes and returns.
costs CostDescriber object which allows for user-specified weights of varying types to be provided to the partitioner.
paramlist Teuchos::ParameterList which will be copied to an internal ParameterList attribute. No reference to this input object is held after this constructor completes.
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the balancing. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. Refer to the Zoltan users guide for specific parameters that Zoltan recognizes. A couple of important ones are "LB_METHOD" (valid values include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are 0 to 10, default is 1), etc.
compute_partitioning_now Optional argument defaults to true. If true, the method compute_partitioning() will be called before this constructor returns.

virtual Isorropia::Epetra::Operator::~Operator (  )  [virtual]

Destructor.

Reimplemented from Isorropia::Operator.


Member Function Documentation

void Isorropia::Epetra::Operator::setParameters ( const Teuchos::ParameterList &  paramlist  )  [virtual]

setParameters() is an internal Partitioner method which handles the parameters from a Teuchos::ParameterList object.

The input ParameterList object is copied into an internal ParameterList attribute, and no reference to the input object is held after this function returns. (Thus, the input paramlist object may be altered or destroyed as soon as this method returns.)
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the balancing. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. Refer to the Zoltan users guide for specific parameters that Zoltan recognizes. A couple of important ones are "LB_METHOD" (valid values include "GRAPH", "HYPERGRAPH"), "DEBUG_LEVEL" (valid values are 0 to 10, default is 1), etc.

Implements Isorropia::Operator.

virtual void Isorropia::Epetra::Operator::compute ( bool  force_compute  )  [pure virtual]

Method which does the work of computing a new partitioning/coloring/ordering, depending on the child class used.

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

Implements Isorropia::Operator.

Implemented in Isorropia::Epetra::Colorer, Isorropia::Epetra::Orderer, and Isorropia::Epetra::Partitioner.

bool Isorropia::Epetra::Operator::alreadyComputed (  )  const [inline, virtual]

Query whether compute_partitioning() has already been called.

Implements Isorropia::Operator.

int Isorropia::Epetra::Operator::numProperties (  )  const [inline, virtual]

Return the number of different values used for "properties".

For example, the number of colors or the number of parts used for the overall graph/matrix.

Returns:
Global number of values for properties
Remarks:
Infact, it returns the upper bound of the interval of taken values. For example, for the colors "1,2,4"" , it will return "4"

Implements Isorropia::Operator.

virtual const int& Isorropia::Epetra::Operator::operator[] ( int  myElem  )  const [virtual]

Return the new partition ID for a given element that resided locally in the old partitioning.

Implements Isorropia::Operator.

virtual int Isorropia::Epetra::Operator::numElemsWithProperty ( int  property  )  const [virtual]

Return the number of elements in a given partition.

Implements Isorropia::Operator.

virtual void Isorropia::Epetra::Operator::elemsWithProperty ( int  property,
int *  elementList,
int  len 
) const [virtual]

Fill user-allocated list (of length len) with the global element ids to be located in the given partition.

Implements Isorropia::Operator.

void Isorropia::Epetra::Operator::paramsToUpper ( Teuchos::ParameterList &  ,
int &  changed 
) [private]

void Isorropia::Epetra::Operator::stringToUpper ( std::string &  s,
int &  changed 
) [private]

void Isorropia::Epetra::Operator::computeNumberOfProperties (  )  [protected]


Member Data Documentation

int Isorropia::Epetra::Operator::numberOfProperties_ [private]

std::vector<int> Isorropia::Epetra::Operator::numberElemsByProperties_ [private]

Teuchos::RCP<const Epetra_BlockMap> Isorropia::Epetra::Operator::input_map_ [protected]

Teuchos::RCP<const Epetra_CrsGraph> Isorropia::Epetra::Operator::input_graph_ [protected]

Teuchos::RCP<const Epetra_RowMatrix> Isorropia::Epetra::Operator::input_matrix_ [protected]

Teuchos::RCP<Isorropia::Epetra::CostDescriber> Isorropia::Epetra::Operator::costs_ [protected]

Teuchos::RCP<Epetra_Vector> Isorropia::Epetra::Operator::weights_ [protected]

Teuchos::ParameterList Isorropia::Epetra::Operator::paramlist_ [protected]

int Isorropia::Epetra::Operator::exportsSize_ [protected]

std::vector<int> Isorropia::Epetra::Operator::imports_ [protected]

std::vector<int> Isorropia::Epetra::Operator::properties_ [protected]

bool Isorropia::Epetra::Operator::operation_already_computed_ [protected]

int Isorropia::Epetra::Operator::global_num_vertex_weights_ [protected]

int Isorropia::Epetra::Operator::global_num_graph_edge_weights_ [protected]

int Isorropia::Epetra::Operator::global_num_hg_edge_weights_ [protected]

Teuchos::RCP<Library> Isorropia::Epetra::Operator::lib_ [protected]


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