-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.cpp
55 lines (53 loc) · 2.24 KB
/
config.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
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "ISOP2P1.h"
void ISOP2P1::config(std::string _config_file)
{
std::string trash;
std::ifstream input(_config_file.c_str());
input >> trash >> trash >> mesh_file;
input >> trash >> trash >> l_tol;
input >> trash >> trash >> l_Euler_tol;
input >> trash >> trash >> n_tol;
input >> trash >> trash >> viscosity;
input >> trash >> trash >> t0;
input >> trash >> trash >> t1;
input >> trash >> trash >> t;
input >> trash >> trash >> dt;
input >> trash >> trash >> CFL;
input >> trash >> trash >> n_method;
input >> trash >> trash >> time_step_control;
input >> trash >> trash >> Stokes_init;
input >> trash >> trash >> NS_init;
input >> trash >> trash >> isMoving;
input >> trash >> trash >> alpha;
input >> trash >> trash >> beta;
input >> trash >> trash >> scale;
input >> trash >> trash >> scheme;
input >> trash >> trash >> body_force;
input >> trash >> trash >> angle;
input >> trash >> trash >> G_refine;
input.close();
std::cout << "mesh_file = " << mesh_file << std::endl;
std::cout << "l_tol = " << l_tol << std::endl;
std::cout << "l_Euler_tol = " << l_Euler_tol << std::endl;
std::cout << "n_tol = " << n_tol << std::endl;
std::cout << "viscosity = " << viscosity << std::endl;
std::cout << "t0 = " << t0 << std::endl;
std::cout << "t1 = " << t1 << std::endl;
std::cout << "t = " << t << std::endl;
std::cout << "dt = " << dt << std::endl;
std::cout << "CFL = " << CFL << std::endl;
std::cout << "n_method = " << n_method << std::endl;
std::cout << "time_step_control = " << time_step_control << std::endl;
std::cout << "Stokes_init = " << Stokes_init << std::endl;
std::cout << "NS_init = " << NS_init << std::endl;
std::cout << "isMoving =" << isMoving << std::endl;
std::cout << "alpha = " << alpha << std::endl;
std::cout << "beta = " << beta << std::endl;
std::cout << "scale = " << scale << std::endl;
std::cout << "scheme = " << scheme << std::endl;
std::cout << "body_force = " << body_force << std::endl;
std::cout << "angle = " << angle << std::endl;
std::cout << "G_refine = " << G_refine << std::endl;
std::cout << "Check the input values." << std::endl;
getchar();
};