COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Partitioner.hpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #ifndef cf3_mesh_zoltan_Partitioner_hpp
8 #define cf3_mesh_zoltan_Partitioner_hpp
9 
11 
12 #include "mesh/MeshPartitioner.hpp"
14 
15 namespace cf3 {
16 namespace common { template <typename KEY, typename DATA> class Map;}
17 namespace mesh {
18 namespace zoltan {
19 
21 
26 
27 public: // typedefs
28 
30 
32 
33 
34 public: // functions
35 
38  Partitioner ( const std::string& name );
39 
41  virtual ~Partitioner();
42 
44  static std::string type_name () { return "Partitioner"; }
45 
47 
48  virtual void build_graph() { /* Does nothing, as partition_graph() will use call-back functions to construct the graph */ }
49 
50  virtual void partition_graph();
51 
52 private: // functions
53 
56  Zoltan& zoltan_handle();
57 
58  void set_partitioning_params();
59 
60  // query function
61  static int query_nb_of_objects(void *data, int *ierr);
62 
63  static void query_list_of_objects(void *data, int sizeGID, int sizeLID,
64  ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID,
65  int wgt_dim, float *obj_wgts, int *ierr);
66 
67  static void query_nb_connected_objects(void *data, int sizeGID, int sizeLID, int num_obj,
68  ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID,
69  int *numEdges, int *ierr);
70 
71  static void query_list_of_connected_objects(void *data, int sizeGID, int sizeLID, int num_obj,
72  ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID,
73  int *num_edges,
74  ZOLTAN_ID_PTR nborGID, int *nborProc,
75  int wgt_dim, float *ewgts, int *ierr);
76 
77 
78 
79 
80 private: // data
81 
83  int changes;
86  int numImport;
87  ZOLTAN_ID_PTR importGlobalIds;
88  ZOLTAN_ID_PTR importLocalIds;
91  int numExport;
92  ZOLTAN_ID_PTR exportGlobalIds;
93  ZOLTAN_ID_PTR exportLocalIds;
96 
97  boost::shared_ptr<Zoltan> m_zz;
99 };
100 
102 
103 } // zoltan
104 } // mesh
105 } // cf3
106 
108 
109 #endif // cf3_mesh_zoltan_Partitioner_hpp
std::string name(ComponentWrapper &self)
virtual void build_graph()
Partitioning functions.
Definition: Partitioner.hpp:48
Top-level namespace for coolfluid.
Definition: Action.cpp:18
#define mesh_zoltan_API
Definition: LibZoltan.hpp:25
boost::shared_ptr< Zoltan > m_zz
Definition: Partitioner.hpp:97
static std::string type_name()
Get the class name.
Definition: Partitioner.hpp:44
Send comments to:
COOLFluiD Web Admin