libMesh
parmetis_helper.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #ifndef LIBMESH_PARMETIS_HELPER_H
19 #define LIBMESH_PARMETIS_HELPER_H
20 
21 // Local Includes
22 #include "libmesh/libmesh_config.h"
23 
24 // C++ Includes
25 #include <vector>
26 
27 // Include the ParMETIS header files. We need this so we can use
28 // ParMetis' idx_t and real_t types directly.
29 #ifdef LIBMESH_HAVE_PARMETIS
30 namespace Parmetis {
31 extern "C" {
32 # include "libmesh/ignore_warnings.h"
33 # include "parmetis.h"
34 # include "libmesh/restore_warnings.h"
35 }
36 }
37 #endif // LIBMESH_HAVE_PARMETIS
38 
39 
40 namespace libMesh
41 {
42 
55 {
56 public:
61 
62 #ifdef LIBMESH_HAVE_PARMETIS
63 
68  std::vector<Parmetis::idx_t> vtxdist;
69  std::vector<Parmetis::idx_t> xadj;
70  std::vector<Parmetis::idx_t> adjncy;
71  std::vector<Parmetis::idx_t> part;
72  std::vector<Parmetis::real_t> tpwgts;
73  std::vector<Parmetis::real_t> ubvec;
74  std::vector<Parmetis::idx_t> options;
75  std::vector<Parmetis::idx_t> vwgt;
76 
77  Parmetis::idx_t wgtflag;
78  Parmetis::idx_t ncon;
79  Parmetis::idx_t numflag;
80  Parmetis::idx_t nparts;
81  Parmetis::idx_t edgecut;
82 
83 #endif // LIBMESH_HAVE_PARMETIS
84 };
85 
86 } // namespace libMesh
87 
88 #endif // LIBMESH_PARMETIS_HELPER_H
ParmetisHelper()
Constructor.
std::vector< Parmetis::idx_t > xadj
The ParmetisHelper class allows us to use a &#39;pimpl&#39; strategy in the ParmetisPartitioner class...
std::vector< Parmetis::idx_t > vwgt
The libMesh namespace provides an interface to certain functionality in the library.
Parmetis::idx_t wgtflag
std::vector< Parmetis::idx_t > vtxdist
Data structures used by ParMETIS to describe the connectivity graph of the mesh.
std::vector< Parmetis::idx_t > options
Parmetis::idx_t edgecut
std::vector< Parmetis::idx_t > adjncy
std::vector< Parmetis::real_t > ubvec
std::vector< Parmetis::idx_t > part
std::vector< Parmetis::real_t > tpwgts
Parmetis::idx_t nparts
Parmetis::idx_t numflag