-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmesh_graph.h
More file actions
43 lines (33 loc) · 809 Bytes
/
mesh_graph.h
File metadata and controls
43 lines (33 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef __MESH3D__MESH_GRAPH_H__
#define __MESH3D__MESH_GRAPH_H__
#include "graph.h"
#ifdef USE_METIS
#include <vector>
#include <map>
namespace mesh3d {
class mesh;
/** A class representing a nodal graph of a mesh */
class nodal_graph : public graph {
public:
/** Construct nodal graph from mesh */
nodal_graph(const mesh &m);
};
/** A class representing a tet graph of a mesh */
class tet_graph : public graph {
public:
typedef std::vector<std::map<index, index> > global_to_local;
private:
const mesh &m;
global_to_local subvert;
public:
/** Construct mesh graph from mesh */
tet_graph(const mesh &m);
bool partition(index num_parts);
/** Return mapping between global vertex indices and local indices */
const global_to_local &mapping() const {
return subvert;
}
};
}
#endif
#endif