XC Open source finite element analysis program
MetisNumberer.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.1.1.1 $
48 // $Date: 2000/09/15 08:23:21 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/graph/numberer/MetisNumberer.h,v $
50 
51 
52 // File: ~/graph/partitioner/Metis.h
53 //
54 // Written: fmk
55 // Created: Sun Sept 15 11:47:47: 1996
56 // Revision: A
57 //
58 // Description: This file contains the class definition for Metis.
59 // Metis is a type of GraphPartitioner which uses 'METIS - Unstructured
60 // Graph Partitioning And Sparse Matrix Ordering System', developed by
61 // G. Karypis and V. Kumar at the University of Minnesota. The metis
62 // files are found in metis-2.0 which were downloaded.
63 // This class provides the C++ interface for metis which will allow
64 // it to fit seamlessly into our system.
65 //
66 // What: "@(#) Metis.h, revA"
67 
68 #ifndef Metis_h
69 #define Metis_h
70 
71 #include <GraphPartitioner.h>
72 
73 namespace XC {
75 //
80 class Metis : public GraphPartitioner
81  {
82  private:
83  bool checkOptions(void);
84 
85  int myPtype ; // package type:
86  // pmetis = 1
87  // kmetis = 2
88 
89  int myMtype; // type of matching scheme:
90  // random = 1
91  // heavy edge = 2
92  // light edge = 3
93  // heavy clique = 4
94  // modified heavy edge = 5
95  // sorted random = 11
96  // sorted heavy edge =21
97  // sorted modified heavy edge = 51
98 
99  int myCoarsenTo; // the number of vertices the graph is coarsened down to
100  // if pmetis default is 100
101  // if kmetis default is 2000
102 
103  int myRtype; // type of refinement policy:
104  // greedy = 1
105  // kernighan-lin = 2
106  // combo greedy and K-L = 3
107  // boundary greedy = 11
108  // boundary K-L = 12
109  // combo of boundary greedy and boundary K-L = 13,
110  // no-refinement = 20
111 
112  int myIPtype; // type of bisection algo:
113  // graph growing partition = 1,
114  // greedy graph growing partition = 2,
115  // spectral bisection = 3,
116  // graph growing followed by K-L = 4
117 
118  bool defaultOptions;
119  protected:
120  friend class DOF_Numberer;
121  Metis(void);
122  Metis(int Ptype, int Mtype, int coarsenTo, int Rtype, int IPtype);
123  GraphNumberer *getCopy(void) const;
124  public:
125  bool setOptions(int Ptype,
126  int Mtype,
127  int coarsenTo,
128  int Rtype,
129  int IPtype);
130 
131  bool setDefaultOptions(void);
132 
133  int partition(Graph &theGraph, int numPart);
134  };
135 } // end of XC namespace
136 
137 #endif
138 
Base class for DOF numbererers.
Definition: DOF_Numberer.h:84
GraphPartitioner is an abstract base class. Its subtypes are responsible for partioning the vertices ...
Definition: GraphPartitioner.h:80
type of GraphPartitioner which uses &#39;METIS - Unstructured Graph Partitioning And Sparse Matrix Orderi...
Definition: MetisNumberer.h:80
Numberer for problem&#39;s degrees of freedom.
Definition: GraphNumberer.h:78
The Graph class provides the abstraction of a graph, a collection of vertices and edges...
Definition: Graph.h:84
int partition(Graph &theGraph, int numPart)
Method to partition the graph. It first creates the arrays needed by the metis lib and then invokes a...
Definition: MetisNumberer.cpp:221
================================================================================
Definition: ContinuaReprComponent.h:34