Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
Metis Class Reference#include <Metis.h>
Inheritance diagram for Metis::
List of all members.
Public Methods |
| Metis (int numParts=1) |
| Metis (int Ptype, int Mtype, int coarsenTo, int Rtype, int IPtype, int numParts=1) |
| ~Metis () |
bool | setOptions (int Ptype, int Mtype, int coarsenTo, int Rtype, int IPtype) |
bool | setDefaultOptions (void) |
int | partition (Graph &theGraph, int numPart) |
const ID& | number (Graph &theGraph, int lastVertex=-1) |
| the follwing methods are if the object is to be used as a numberer. More...
|
const ID& | number (Graph &theGraph, const ID &lastVertices) |
int | sendSelf (int commitTag, Channel &theChannel) |
int | recvSelf (int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker) |
Detailed Description
Metis is a GraphPartitioner. The Metis graph partitioner calls procedures defined in the METIS library to partition the graph. METIS is currently being developed by G.~Karypis and V.~Kumar at the University of Minnesota. At the present time the Graph to be partitioned MUST have the vertices labeled
through
. \
The METIS library uses two integer arrays to represent the graph, {xadj} and {adjncy}.
stores the location in {adjncy} of the start of the
'th Vertices adjacent Vertices. {adjncy} contains the tags of all the adjacent vertices. For example, the graph which is represented by the following matrix
:
A = \left[ \begin{array}{ccccc} 1 & 0 & 1 & 1 & 0 \ 1 & 1 & 0 & 0 & 0 \ 0 & 1 & 1 & 0 & 0 \ 0 & 0 & 0 & 1 & 1 \ 1 & 1 & 0 & 0 & 1 \end{array} \right]
is represented by:
xadj = \left[ \begin{array}{cccccccccccccc} 0 & 2 & 3 & 4 & 5 & 7 \end{array} \right]
and
adjncy = \left[ \begin{array}{cccccccccccccc} 2 & 3 & 0 & 1 & 4 & 0 & 1 \end{array} \right]
note that there is no space allocated for the diagonal components. \
Definition at line 106 of file Metis.h.
Constructor & Destructor Documentation
Metis::Metis (
|
int numParts = 1 )
|
|
|
To construct a Metis object which will use the default settings when partitioning.
Definition at line 74 of file Metis.cpp. |
Metis::Metis (
|
int Ptype,
|
|
int Mtype,
|
|
int coarsenTo,
|
|
int Rtype,
|
|
int IPtype,
|
|
int numParts = 1 )
|
|
|
To construct a Metis object which will use the setting passed into the constructor as options to metis's {PMETIS()} routine. {checkOptions()} is invoked to ensure the settings are valid.
Definition at line 82 of file Metis.cpp. |
|
{\bf Public Methods }
Definition at line 97 of file Metis.cpp. |
Member Function Documentation
const ID & Metis::number (
|
Graph & theGraph,
|
|
const ID & lastVertices ) [virtual]
|
|
|
This is the method invoked to perform the graph numbering, that is to assign a unique integer
through {numVertex}, to each Vertex in the Graph. Returns an ordered ID containing the vertex references in the order of the numbering, i.e.
contains the integer reference for the vertex assigned the number 1,
contains the integer reference for the vertex assigned the number 2 and so on. A side effect of the numbering is that the {Tmp} variable of each vertex is set to the number assigned to that vertex. {lastVertices} is used as a hint to indicate that these Vertices should be numbered last (they do not have to be though THIS MAY CHANGE).
Reimplemented from GraphNumberer.
Definition at line 457 of file Metis.cpp. |
const ID & Metis::number (
|
Graph & theGraph,
|
|
int lastVertex = -1 ) [virtual]
|
|
|
the follwing methods are if the object is to be used as a numberer.
Reimplemented from GraphNumberer.
Definition at line 322 of file Metis.cpp.
Referenced by number().
|
int Metis::partition (
|
Graph & theGraph,
|
|
int numPart ) [virtual]
|
|
|
This is the method invoked to partition the graph into {numPart} partitions. On completion of the routine each vertex will be assigned a color
through {numPart}, the color assigned indicating the partition to which the vertex belongs. Returns a
if successful, a negative number if not; the value depending on the subclass.
Reimplemented from GraphPartitioner.
Definition at line 207 of file Metis.cpp. |
|
This is a pure virtual method, one must be written for each instantiable subclass of MovableObject. Each object has to receive the data needed to be able to recreate itself in the new process after it has been sent through {theChannel}. If the object is an aggregation containing other objects, new objects of the correct type can be constructed using {theBroker}. To return
if successful or a
if not.
Reimplemented from MovableObject.
Definition at line 469 of file Metis.cpp. |
int Metis::sendSelf (
|
int commitTag,
|
|
Channel & theChannel ) [virtual]
|
|
|
This is a pure virtual method, one must be written for each instantiable subclass of MovableObject. Each object has to send the data needed to be able to reproduce that object in a remote process. The object uses the methods provided by {theChannel} object to send the data to another channel at the remote actor, the address of the channel is set before this method is called. An object of similar type at the remote actor is invoked with a {receiveSelf()} to receive the data. Returns
if successful (successful in that the data got to the channel), or a
if no data was sent.
Reimplemented from MovableObject.
Definition at line 463 of file Metis.cpp. |
bool Metis::setDefaultOptions (
|
void )
|
|
bool Metis::setOptions (
|
int Ptype,
|
|
int Mtype,
|
|
int coarsenTo,
|
|
int Rtype,
|
|
int IPtype )
|
|
|
Sets the options for the partitioning to those passed as arguments. Then invokes {checkOptions()} to see if the options are valid. HOW ABOUT REFERRINGR TO MANUAL TO SEE WHAT OPTIONS MEAN.
Definition at line 103 of file Metis.cpp. |
The documentation for this class was generated from the following files:
|