-
Notifications
You must be signed in to change notification settings - Fork 3
/
boundary.h
62 lines (41 loc) · 1.06 KB
/
boundary.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 BOUNDARY_H_
#define BOUNDARY_H_
#include "eigen.h"
#include <array>
#include <vector>
extern const int BDY_GROUP_TAG;
struct bdy_element {
int bdy_element_index;
std::array<int, 3> basis_global_index;
double area;
double epsilon;
double sigma;
double mu;
std::array<Vector2d, 3> vertex;
Matrix3d coef_matrix;
static bdy_element creat_boundary_element(int n);
double a(int i) {
return coef_matrix(i-1, 2);
}
double b(int i) {
return coef_matrix(i-1, 0);
}
double c(int i) {
return coef_matrix(i-1, 1);
}
double p(int i, int j) {
return b(i) * b(j) + c(i) * c(j);
}
double b_1_Jin() {
return (vertex[1](1) - vertex[2](1)) / (2 * area);
}
double l(int e);
double F(int i, int j);
double W(int i, int j);
double Y() {
return sqrt(epsilon / mu);
}
int simplex_index(int e, int i);
};
//extern std::vector<bdy_element> bdy_element;
#endif /* BOUNDARY_H_ */