Isorropia: Partitioning, Load Balancing and more
|
An implementation of the Partitioner interface that operates on Epetra matrices and linear systems. More...
#include <Isorropia_EpetraOperator.hpp>
Public Member Functions | |
Operator (Teuchos::RCP< const Epetra_CrsGraph > input_graph, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_CrsGraph object. More... | |
Operator (Teuchos::RCP< const Epetra_BlockMap > input_map, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_BlockMap object. More... | |
Operator (Teuchos::RCP< const Epetra_CrsGraph > input_graph, Teuchos::RCP< const Epetra_MultiVector > input_coords, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_CrsGraph object and an Epetra_MultiVector object of coordinates. More... | |
Operator (Teuchos::RCP< const Epetra_CrsGraph > input_graph, Teuchos::RCP< CostDescriber > costs, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_CrsGraph object, a CostDescriber, an Epetra_MultiVector object of coordinates, and an Epetra_MultiVector object of coordinate weights. More... | |
Operator (Teuchos::RCP< const Epetra_CrsGraph > input_graph, Teuchos::RCP< CostDescriber > costs, Teuchos::RCP< const Epetra_MultiVector > coords, Teuchos::RCP< const Epetra_MultiVector > weights, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_CrsGraph object, a CostDescriber, an Epetra_MultiVector object of coordinates, and an Epetra_MultiVector object of coordinate weights. More... | |
Operator (Teuchos::RCP< const Epetra_RowMatrix > input_matrix, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_RowMatrix object. More... | |
Operator (Teuchos::RCP< const Epetra_RowMatrix > input_matrix, Teuchos::RCP< const Epetra_MultiVector > coords, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_RowMatrix object and an Epetra_MultiVector object of coordinates. More... | |
Operator (Teuchos::RCP< const Epetra_RowMatrix > input_matrix, Teuchos::RCP< CostDescriber > costs, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_RowMatrix object and a CostDescriber. More... | |
Operator (Teuchos::RCP< const Epetra_RowMatrix > input_matrix, Teuchos::RCP< CostDescriber > costs, Teuchos::RCP< const Epetra_MultiVector > coords, Teuchos::RCP< const Epetra_MultiVector > weights, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_RowMatrix object, a CostDescriber, an Epetra_MultiVector object of coordinates, and an Epetra_MultiVector object of coordinate weights. More... | |
Operator (Teuchos::RCP< const Epetra_MultiVector > coords, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_MultiVector object and a ParameterList. More... | |
Operator (Teuchos::RCP< const Epetra_MultiVector > coords, Teuchos::RCP< const Epetra_MultiVector > weights, const Teuchos::ParameterList ¶mlist, int base) | |
Constructor that accepts an Epetra_MultiVector object and a ParameterList. More... | |
virtual | ~Operator () |
Destructor. More... | |
void | setParameters (const Teuchos::ParameterList ¶mlist) |
setParameters() is an internal method which handles the parameters from a Teuchos::ParameterList object. More... | |
Teuchos::RCP < Isorropia::Epetra::CostDescriber > & | getCosts () |
Get the cost object. More... | |
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. More... | |
bool | alreadyComputed () const |
Query whether compute_operation() has already been called. More... | |
int | numProperties () const |
Return the number of different values used for "properties". More... | |
int | numLocalProperties () const |
Return the number of different values used for "properties" for this process only. More... | |
virtual const int & | operator[] (int myElem) const |
Return the new partition ID for a given element that resided locally in the old operation. More... | |
virtual int | numElemsWithProperty (int property) const |
Return the number of elements in a given partition. More... | |
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. More... | |
virtual int | extractPropertiesCopy (int len, int &size, int *array) const |
Copy a part of the property array. More... | |
virtual int | extractPropertiesView (int &size, const int *&array) const |
Give access of the property array that is owned by the current processor. More... | |
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< const Epetra_MultiVector > | input_coords_ |
Teuchos::RCP < Isorropia::Epetra::CostDescriber > | costs_ |
Teuchos::RCP< const Epetra_MultiVector > | 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< Library > | lib_ |
int | base_ |
Private Member Functions | |
void | paramsToUpper (Teuchos::ParameterList &, int &changed, bool rmUnderscore=true) |
void | stringToUpper (std::string &s, int &changed, bool rmUnderscore=false) |
Private Attributes | |
int | numberOfProperties_ |
int | localNumberOfProperties_ |
std::vector< int > | numberElemsByProperties_ |
An implementation of the Partitioner interface that operates on Epetra matrices and linear systems.
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_CrsGraph > | input_graph, |
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_CrsGraph object.
input_graph | Matrix-graph object for which a new operation is to be computed. | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | index base |
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan.
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_BlockMap > | input_map, |
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_BlockMap object.
[in] | input_map | BlockMap object for which a new operation is to be computed. |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. |
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_CrsGraph > | input_graph, |
Teuchos::RCP< const Epetra_MultiVector > | input_coords, | ||
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_CrsGraph object and an Epetra_MultiVector object of coordinates.
input_graph | Matrix-graph object for which a new operation is to be computed. | |
[in] | input_coords | The input geometric coordinates (represented in a multivector) |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. |
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_CrsGraph > | input_graph, |
Teuchos::RCP< CostDescriber > | costs, | ||
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_CrsGraph object, a CostDescriber, an Epetra_MultiVector object of coordinates, and an Epetra_MultiVector object of coordinate weights.
input_graph | Matrix-graph object for which a new operation is to be computed. | |
costs | CostDescriber object which allows for user-specified weights | |
paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. | |
[in] | base | If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. |
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_CrsGraph > | input_graph, |
Teuchos::RCP< CostDescriber > | costs, | ||
Teuchos::RCP< const Epetra_MultiVector > | coords, | ||
Teuchos::RCP< const Epetra_MultiVector > | weights, | ||
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_CrsGraph object, a CostDescriber, an Epetra_MultiVector object of coordinates, and an Epetra_MultiVector object of coordinate weights.
input_graph | Matrix-graph object for which a new operation is to be computed. | |
costs | CostDescriber object which allows for user-specified weights | |
coords | The input geometric coordinates (represented in a multivector) | |
weights | A one or more dimensional weight for each of the The input geometric coordinates | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. |
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_RowMatrix > | input_matrix, |
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_RowMatrix object.
input_matrix | Matrix object for which a new operation is to be computed. | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | Index base |
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan.
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_RowMatrix > | input_matrix, |
Teuchos::RCP< const Epetra_MultiVector > | coords, | ||
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_RowMatrix object and an Epetra_MultiVector object of coordinates.
input_matrix | Matrix object for which a new operation is to be computed. | |
coords | The input geometric coordinates (represented in a multivector) | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. |
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_RowMatrix > | input_matrix, |
Teuchos::RCP< CostDescriber > | costs, | ||
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_RowMatrix object and a CostDescriber.
input_matrix | Matrix object for which a new operation is to be computed. | |
costs | CostDescriber object which allows for user-specified weights | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. |
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_RowMatrix > | input_matrix, |
Teuchos::RCP< CostDescriber > | costs, | ||
Teuchos::RCP< const Epetra_MultiVector > | coords, | ||
Teuchos::RCP< const Epetra_MultiVector > | weights, | ||
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_RowMatrix object, a CostDescriber, an Epetra_MultiVector object of coordinates, and an Epetra_MultiVector object of coordinate weights.
input_matrix | Matrix object for which a new operation is to be computed. | |
costs | CostDescriber object which allows for user-specified weights | |
coords | The input geometric coordinates (represented in a multivector) | |
weights | A one or more dimensional weight for each of the The input geometric coordinates | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan. |
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_MultiVector > | coords, |
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_MultiVector object and a ParameterList.
coords | The input geometric coordinates (represented in a multivector) | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | index base |
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan.
Isorropia::Epetra::Operator::Operator | ( | Teuchos::RCP< const Epetra_MultiVector > | coords, |
Teuchos::RCP< const Epetra_MultiVector > | weights, | ||
const Teuchos::ParameterList & | paramlist, | ||
int | base | ||
) |
Constructor that accepts an Epetra_MultiVector object and a ParameterList.
coords | The input geometric coordinates (represented in a multivector) | |
weights | A one or more dimensional weight for each of the The input geometric coordinates | |
[in] | paramlist | Teuchos::ParameterList which will be copied to an internal ParameterList attribute. |
[in] | base | index base |
If the ParameterList object contains a sublist named "Zoltan", then the Zoltan library is used to perform the operation. Also, any parameters in the "Zoltan" sublist will be relayed directly to Zoltan.
|
virtual |
Destructor.
Reimplemented from Isorropia::Operator.
|
virtual |
setParameters() is an internal method which handles the parameters from a Teuchos::ParameterList object.
Implements Isorropia::Operator.
|
inline |
Get the cost object.
|
pure virtual |
Method which does the work of computing a new partitioning/coloring/ordering, depending on the child class used.
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::Partitioner, Isorropia::Epetra::Colorer, Isorropia::Epetra::Partitioner2D, Isorropia::Epetra::Orderer, and Isorropia::Epetra::LevelScheduler.
|
inlinevirtual |
Query whether compute_operation() has already been called.
Implements Isorropia::Operator.
|
inlinevirtual |
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.
Implements Isorropia::Operator.
|
inlinevirtual |
Return the number of different values used for "properties" for this process only.
Implements Isorropia::Operator.
|
virtual |
Return the new partition ID for a given element that resided locally in the old operation.
Implements Isorropia::Operator.
|
virtual |
Return the number of elements in a given partition.
Implements Isorropia::Operator.
|
virtual |
Fill user-allocated list (of length len) with the global element ids to be located in the given partition.
Implements Isorropia::Operator.
|
virtual |
Copy a part of the property array.
[in] | len | of the array given by the user. |
[out] | size | Number of elements in the array. |
[out] | array | Array of properties. Allocated by the user with a size of at least len elements. |
Implements Isorropia::Operator.
|
virtual |
Give access of the property array that is owned by the current processor.
[out] | size | Number of elements in the array. |
[out] | array | Pointer to the the properties array inside the object. |
Implements Isorropia::Operator.
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |