4
4
#include < ctime>
5
5
using namespace std ;
6
6
7
- #define IR 0
8
- #define IU 1
9
- #define IV 2
10
- #define IP 3
11
- #define SMALL 1E-40
12
- #define PI 3.141592653589793238
7
+ #define IR 0
8
+ #define IU 1
9
+ #define IV 2
10
+ #define IP 3
11
+
12
+ #define SMALL 1E-40
13
+ #define PI 3.141592653589793238
13
14
14
15
typedef vector < int > VInt;
15
16
typedef vector < VInt > VInt2D;
@@ -19,23 +20,23 @@ typedef vector < double > VDouble;
19
20
typedef vector < VDouble > VDouble2D;
20
21
typedef vector < VDouble2D > VDouble3D;
21
22
22
- extern int num_of_prim_vars;
23
- extern int current_step, max_num_of_steps;
24
- extern double cfl_num, time_step, physical_time, max_simu_time;
25
- extern int method_of_half_q;
26
- extern int method_of_limiter;
27
- extern int method_of_flux;
28
- extern double muscl_k;
29
- extern double entropy_fix_coeff;
30
- extern char solve_direction;
31
- extern int residual_output_steps;
32
- extern int flow_save_steps;
33
- extern double converge_criterion;
34
- extern bool stop_by_residual;
35
- extern string tec_file_name;
36
- extern int num_of_RK_stages;
37
- extern VDouble2D RK_Coeff;
38
- extern clock_t lastTime, nowTime;
23
+ extern int num_of_prim_vars;
24
+ extern int current_step, max_num_of_steps;
25
+ extern double cfl_num, time_step, physical_time, max_simu_time;
26
+ extern int method_of_half_q;
27
+ extern int method_of_limiter;
28
+ extern int method_of_flux;
29
+ extern double muscl_k;
30
+ extern double entropy_fix_coeff;
31
+ extern char solve_direction;
32
+ extern int residual_output_steps;
33
+ extern int flow_save_steps;
34
+ extern double converge_criterion;
35
+ extern bool stop_by_residual;
36
+ extern string tec_file_name;
37
+ extern int num_of_RK_stages;
38
+ extern VDouble2D RK_Coeff;
39
+ extern clock_t lastTime, nowTime;
39
40
40
41
template < typename T >
41
42
void Allocate_2D_Vector (vector< vector< T > >& array, int dim1, int dim2)
@@ -90,10 +91,12 @@ void MatrixMultiply(vector< vector< T1 > >& a, vector< T2 >& b, vector< T3 >& c,
90
91
91
92
void Primitive_To_Conservative (VDouble& primitive, VDouble& conservative);
92
93
void Conservative_To_Primitive (VDouble& conservative, VDouble& primitive);
94
+
93
95
bool Need_Stop_Iteration ();
94
96
bool IsNaN (VDouble& data);
95
97
96
98
clock_t Get_Current_Time ();
97
99
double GetClockTicksPerSecond ();
100
+
98
101
void ExtractValue (VDouble primitiveVector, double & rm, double & um, double & vm, double & pm);
99
102
void Read_Parameter_File (string fileName);
0 commit comments