EnGPar
Partitioning using the N-Graph
 All Classes Files Pages
apfGraph.h
1 
2 #ifndef APF_MESH
3 #define APF_MESH
4 
5 #include "ngraph.h"
6 #include <apfMesh2.h>
7 #include <map>
8 namespace agi {
9 
15  Ngraph* createAPFGraph(apf::Mesh* m, const char* name, int primary_dimension,int secondary_dimension);
22  Ngraph* createAPFGraph(apf::Mesh* m, const char* name, int primary_dimension,int* secondary_dimensions,
23  int num_dimensions);
27 class apfGraph : public Ngraph {
28  private:
29  apf::Mesh* m;
30  const char* name;
31  apf::GlobalNumbering* global_nums;
32  apf::GlobalNumbering* edge_nums[MAX_TYPES];
33  std::vector<gid_t> ghosts;
34  std::vector<part_t> owns;
35 
36  public:
37  // \cond INTERFACE
38  apfGraph(apf::Mesh*, const char* name, int primary_dimension, int secondary_dimension);
39  apfGraph(apf::Mesh*, const char* name, int primary_dimension, int* secondary_dimensions,int n);
40  ~apfGraph();
41 
42  //Utility
43  void migrate(std::map<GraphVertex*,int>&) {};
44  // \endcond
45  private:
46  void checkDims(int dim,int primary,int second);
47  void setupPrimary(int primary);
48  etype setupSecondary(int second);
49  void connectToEdges(int primary,int second, etype type);
50  void connectToPins(int primary,int second, etype type);
51  void constructGhostVerts();
52 };
53 
54 }//agi namespace
55 
56 #endif
An extension of the N-Graph for SCOREC meshes.
Definition: apfGraph.h:27
The N-Graph interface.