-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhydro_math.h
72 lines (61 loc) · 1.44 KB
/
hydro_math.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
63
64
65
66
67
68
69
70
/*
* =====================================================================================
*
* Filename: hydro_math.h
*
* Description: jkj
*
* Version: 1.0
* Created: 2022년 03월 24일 23시 27분 47초
* Revision: none
* Compiler: gcc
*
* Author: KIM Hyeok (), [email protected]
* Organization:
*
* =====================================================================================
*/
#pragma once
typedef struct mf_s {
int calculated :1 ;
double part1 , part2, part3;
} mf;
typedef mf* pmf;
typedef struct ihf_s {
int calculated :1 ;
double x,x2,x3;
double invx3,cosx, cosx_x;
double sinx,sinx_3_minus_x2;
double h1,h2;
} ihf;
typedef ihf* pihf;
void copy_ihf(ihf* lhs,const ihf* rhs);
void set_ihf(ihf* pihf,double x) ;
void set_ihf_sinx_cosx(ihf* pihf,double x, double sinx, double cosx) ;
class Hydrodynamic_Function {
public:
Hydrodynamic_Function();
~Hydrodynamic_Function();
int run( int, char const* argv []);
int run( );
void end( );
void init ( int,int, int, double, double, double, double, double*, double*);
double getD_s() { return D_s;};
double* getHq() { return hf_all;};
protected:
void alloc_mem();
void free_mem();
void prepare_calculation();
private:
ihf** ihf_all =NULL;
double* hf_all =NULL;
mf* mf_all = NULL;
double D_s;
int kn, xn;
double r1, k1;
double* g000;
double* h000;
double a;
int N;
double V;
};