-
Notifications
You must be signed in to change notification settings - Fork 3
/
gmsh.h
62 lines (44 loc) · 1015 Bytes
/
gmsh.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef GMSH_H_
#define GMSH_H_
#include <vector>
#include <string>
#include <array>
#include <map>
#include "eigen.h"
struct msh_segment {
std::array<int, 2> node_number_list;
int physical_tag;
int geometrical_tag;
};
struct msh_triang {
std::array<int, 3> node_number_list;
int physical_tag;
int geometrical_tag;
};
struct msh_tetrah {
std::array<int, 4> node_number_list;
int physical_tag;
int geometrical_tag;
};
struct medium_property {
double epsilon;
double sigma;
double mu;
};
struct mesh_data {
int triang_num;
int tetrah_num;
int segment_num;
int node_num;
std::vector<Vector3d> node;
std::vector<msh_segment> segment;
std::vector<msh_triang> triang;
std::vector<msh_tetrah> tetrah;
};
extern mesh_data mesh;
extern std::map<int, medium_property> medium_conf;
void load_gmsh_file(std::string filename);
inline Vector3d get_node(int n) {
return mesh.node[n];
}
#endif /* defined(GMSH_H_) */