Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Metis.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.1.1.1 $
00022 // $Date: 2000/09/15 08:23:21 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/graph/partitioner/Metis.h,v $
00024                                                                         
00025                                                                         
00026 // File: ~/graph/partitioner/Metis.h
00027 // 
00028 // Written: fmk 
00029 // Created: Sun Sept 15 11:47:47: 1996
00030 // Revision: A
00031 //
00032 // Description: This file contains the class definition for Metis.
00033 // Metis is a type of GraphPartitioner which uses 'METIS - Unstructured
00034 // Graph Partitioning And Sparse Matrix Ordering System', developed by
00035 // G. Karypis and V. Kumar at the University of Minnesota. The metis
00036 // files are found in metis-2.0 which were downloaded.
00037 //     This class provides the C++ interface for metis which will allow
00038 // it to fit seamlessly into our system.
00039 //
00040 // What: "@(#) Metis.h, revA"
00041 
00042 #ifndef Metis_h
00043 #define Metis_h
00044 
00045 #include <GraphPartitioner.h>
00046 #include <GraphNumberer.h>
00047 
00048 #ifndef _bool_h
00049 #include <bool.h>
00050 #endif
00051 
00106 class Metis : public GraphPartitioner, public GraphNumberer
00107 {
00108   public:
00113     Metis(int numParts =1);
00114 
00120     Metis(int Ptype, 
00121 
00122    int Mtype, 
00123    int coarsenTo,
00124    int Rtype, 
00125    int IPtype,
00126    int numParts =1);
00131     ~Metis();
00132 
00133 
00139     bool setOptions(int Ptype, 
00140 
00141       int Mtype,
00142       int coarsenTo,
00143       int Rtype, 
00144       int IPtype);
00145 
00147     bool setDefaultOptions(void);
00148 
00149     
00151     int partition(Graph &theGraph, int numPart);
00152 
00154     const ID &number(Graph &theGraph, int lastVertex = -1);
00156     const ID &number(Graph &theGraph, const ID &lastVertices);
00157 
00159     int sendSelf(int commitTag, 
00160    Channel &theChannel);
00162     int recvSelf(int commitTag, Channel &theChannel, 
00163    FEM_ObjectBroker &theBroker);
00164 
00165     
00166   protected:
00167 
00168   private:
00170     bool checkOptions(void);
00171     
00173     int myPtype ;  // package type: 
00174                         // pmetis = 1
00176 
00177     int myMtype;      // type of matching scheme: 
00178    // random = 1
00179    //   heavy edge = 2
00180    //     light edge = 3
00181    // heavy clique = 4
00182    // modified heavy edge = 5
00183    //     sorted random = 11
00184    // sorted heavy edge =21
00186    
00187    int myCoarsenTo;  // the number of vertices the graph is coarsened down to
00188                         //    if pmetis default is 100
00190  
00191     int myRtype;      // type of refinement policy:  
00192    // greedy = 1
00193    // kernighan-lin = 2
00194    //     combo greedy and K-L = 3
00195    //  boundary greedy = 11
00196    //     boundary K-L = 12
00197    // combo of boundary greedy and boundary K-L = 13,
00199 
00200     int myIPtype;  // type of bisection algo:  
00201                  //     graph growing partition = 1,
00202    //     greedy graph growing partition = 2,
00203    //     spectral bisection = 3,
00205  
00206     bool defaultOptions;       
00207     
00209     int   numPartitions; 
00210     ID    *theRefResult;
00211 };
00212 
00213 #endif
00214 
Copyright Contact Us