-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBLMeshModule.h
More file actions
94 lines (92 loc) · 2.8 KB
/
Copy pathBLMeshModule.h
File metadata and controls
94 lines (92 loc) · 2.8 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#ifndef BLMESHMODULE_H
#define BLMESHMODULE_H
#include "MeshRegions.h"
#include <memory>
#include <vector>
class BLMeshModule;
typedef std::shared_ptr<BLMeshModule> BLMeshModuleShPtr;
class BLMeshModule {
public:
BLMeshModule() {}
BLMeshModule(std::map<std::string, double> &doubleparams,
std::map<std::string, int> &intparams) {
p = doubleparams;
q = intparams;
}
virtual void Initialise() {}
virtual int MeshGen(MeshRegions &combinedReg, std::vector<void *> &BLedge) {
return 0;
}
virtual int DefineBCs(MeshRegions &combinedReg, int offset,
std::vector<void *> &BLedge) {
return 0;
}
virtual int MeshGenUpper(MeshRegions &combinedReg,
std::vector<void *> &BLedge) {
return 0;
}
virtual int MeshGenLower(MeshRegions &combinedReg,
std::vector<void *> &BLedge) {
return 0;
}
virtual int MeshGenLEdge(MeshRegions &combinedReg,
std::vector<void *> &BLedge) {
return 0;
}
virtual int MeshGenTEdge(MeshRegions &combinedReg,
std::vector<void *> &BLedge) {
return 0;
}
virtual std::vector<double> edge0(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge1(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge2(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge3(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge4(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge5(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge6(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge7(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge8(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge9(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge10(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge11(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> edge12(double s) {
return std::vector<double>(3, 0.);
}
virtual std::vector<double> MapFunc(std::vector<double> p) { return p; }
std::map<std::string, double> p;
std::map<std::string, int> q;
std::vector<double> Transform(std::vector<double> pt) {
double x = pt[0], y = pt[1];
pt[0] = x * cos(p["AoA"]) + y * sin(p["AoA"]) + p["Tx0"];
pt[1] = -x * sin(p["AoA"]) + y * cos(p["AoA"]) + p["Ty0"];
return pt;
}
void TransformMesh(MeshRegions &combinedReg) {
combinedReg.transformation(p["AoA"], p["Tx0"], p["Ty0"]);
}
};
#endif