MetisNumberer.hGo 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/numberer/MetisNumberer.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 00047 #ifndef _bool_h 00048 #include <bool.h> 00049 #endif 00050 00051 class Metis : public GraphPartitioner 00052 { 00053 public: 00054 Metis(); 00055 Metis(int Ptype, 00056 int Mtype, 00057 int coarsenTo, 00058 int Rtype, 00059 int IPtype); 00060 ~Metis(); 00061 00062 bool setOptions(int Ptype, 00063 int Mtype, 00064 int coarsenTo, 00065 int Rtype, 00066 int IPtype); 00067 00068 bool setDefaultOptions(void); 00069 00070 int partition(Graph &theGraph, int numPart); 00071 00072 00073 protected: 00074 00075 private: 00076 bool checkOptions(void); 00077 00078 int myPtype ; // package type: 00079 // pmetis = 1 00080 // kmetis = 2 00081 00082 int myMtype; // type of matching scheme: 00083 // random = 1 00084 // heavy edge = 2 00085 // light edge = 3 00086 // heavy clique = 4 00087 // modified heavy edge = 5 00088 // sorted random = 11 00089 // sorted heavy edge =21 00090 // sorted modified heavy edge = 51 00091 00092 int myCoarsenTo; // the number of vertices the graph is coarsened down to 00093 // if pmetis default is 100 00094 // if kmetis default is 2000 00095 00096 int myRtype; // type of refinement policy: 00097 // greedy = 1 00098 // kernighan-lin = 2 00099 // combo greedy and K-L = 3 00100 // boundary greedy = 11 00101 // boundary K-L = 12 00102 // combo of boundary greedy and boundary K-L = 13, 00103 // no-refinement = 20 00104 00105 int myIPtype; // type of bisection algo: 00106 // graph growing partition = 1, 00107 // greedy graph growing partition = 2, 00108 // spectral bisection = 3, 00109 // graph growing followed by K-L = 4 00110 00111 bool defaultOptions; 00112 }; 00113 00114 #endif 00115 |