-
Notifications
You must be signed in to change notification settings - Fork 0
/
dif.h
59 lines (53 loc) · 1.5 KB
/
dif.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
#ifndef _DIF_H_
#define _DIF_H_
#include "var.h"
using namespace var;
namespace dif
{
class Dif
{
protected:
double Fe, Fw, Fs, Fn, De, Dw, Dn, Ds;
double DENSe, DENSw, DENSn, DENSs;
public:
virtual void coeff_of_conduct();
virtual void neighbor_coeff() = 0;
virtual void solve();
virtual double alpha_param(double );
void gamsor();
Dif(){};
};
class Power_law : virtual public Dif
{
private:
double max_Fw, max_Fe, max_Fs, max_Fn;
double acof_w, acof_e, acof_s, acof_n;
public:
void neighbor_coeff();
double acof(double x, double y);
Power_law(): Dif(){};
};
class QUICK : public virtual Dif
{
private:
double alpha_w, alpha_e, alpha_s, alpha_n;
public:
void neighbor_coeff();
QUICK() : Dif(){};
};
class TVD : public virtual Dif
{
private:
double max_Fw, max_Fe, max_Fs, max_Fn;
double grad_wp, grad_wm, grad_ep, grad_em,
grad_sm, grad_sp, grad_nm, grad_np;
double alpha_w, alpha_e, alpha_s, alpha_n;
double psy_wp, psy_wm, psy_ep, psy_em,
psy_sm, psy_sp, psy_nm, psy_np;
public:
void neighbor_coeff();
double limiter_param(double grad);
TVD() : Dif(){};
};
}
#endif