HydroCODE 0.1
This is a implementation of fully explict forward Euler scheme for 1-D Euler equations of motion on Lagrange coordinate
tools.h
浏览该文件的文档.
1
7#ifndef TOOLS_H
8#define TOOLS_H
9
10// sys_pro.c
11void DispPro(const double pro, const int step);
12
13int CreateDir(const char* pPath);
14
15
16// math_algo.c
17int rinv(double a[], const int n);
18
19
23inline double minmod2(double s_L, double s_R)
24{
25 if(s_L * s_R < 0.0)
26 return 0.0;
27 else if(fabs(s_R) < fabs(s_L))
28 return s_R;
29 else
30 return s_L;
31}
32
36inline double minmod3(double s_L, double s_R, double s_m)
37{
38 if(s_L * s_m < 0.0 || s_R * s_m < 0.0)
39 return 0.0;
40 else if(fabs(s_m) < fabs(s_L) && fabs(s_m) < fabs(s_R))
41 return s_m;
42 else if(fabs(s_R) < fabs(s_L))
43 return s_R;
44 else
45 return s_L;
46}
47
48#endif
int rinv(double a[], const int n)
A function to caculate the inverse of the input square matrix.
Definition: math_algo.c:19
int CreateDir(const char *pPath)
This is a function that recursively creates folders.
Definition: sys_pro.c:59
double minmod2(double s_L, double s_R)
Minmod limiter function of two variables.
Definition: tools.h:23
double minmod3(double s_L, double s_R, double s_m)
Minmod limiter function of three variables.
Definition: tools.h:36
void DispPro(const double pro, const int step)
This function print a progress bar on one line of standard output.
Definition: sys_pro.c:38