-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
executable file
·41 lines (31 loc) · 1.08 KB
/
main.cpp
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
#include "global.hpp"
#include "pre_process/initialization.hpp"
#include "pre_process/airfoil.hpp"
#include "grid_generator/o_grid_main.hpp"
#include "grid_generator/c_grid_main.hpp"
#include "misc/post_process.hpp"
int main() {
Parameters pars;
Airfoil_Parameters airfoil_pars;
Grid_Parameters grid_pars;
Initialization init(pars);
Airfoil airfoil(airfoil_pars);
Post_Process post_process;
//make local vars of grid
//calculate the grid depends on the input.
//grid_type = 0 -> O grid; grid_type = 1 -> C grid.
if (pars.grid_type == 0) {
O_Grid_Main o_grid(airfoil_pars, pars);
grid_pars = o_grid.o_grid_boundary(pars);
grid_pars = o_grid.o_grid_internal(grid_pars, pars);
//post_process
grid_pars = post_process.cell_aspect_ratio_computation(grid_pars, pars);
grid_pars = post_process.cell_area_computation(grid_pars, pars);
//print the output
post_process.grid_output(grid_pars, pars);
} else if (pars.grid_type == 1) {
//this is meant to be using the C grid type airfoil.
} else {
std::cout << "grid type is wrong, please change grid type and run again.";
}
}