9#include "../include/var_struc.h"
10#include "../include/inter_process.h"
31 struct b_f_var * bfv_L,
struct b_f_var * bfv_R, _Bool find_bound,
const _Bool Slope,
const double t_c, ...)
35 int const bound = (int)(
config[17]);
36 double const h =
config[10];
39 X = va_arg(ap,
double *);
47 printf(
"Initial boudary conditions in x direction at time %g .\n", t_c);
48 bfv_L->
U = CV.
U[0][0]; bfv_R->
U = CV.
U[0][m-1];
49 bfv_L->
P = CV.
P[0][0]; bfv_R->
P = CV.
P[0][m-1];
54 printf(
"Reflective boudary conditions in x direction.\n");
55 bfv_L->
U = - CV.
U[nt][0]; bfv_R->
U = - CV.
U[nt][m-1];
56 bfv_L->
P = CV.
P[nt][0]; bfv_R->
P = CV.
P[nt][m-1];
57 bfv_L->
RHO = CV.
RHO[nt][0]; bfv_R->
RHO = CV.
RHO[nt][m-1];
61 printf(
"Free boudary conditions in x direction.\n");
62 bfv_L->
U = CV.
U[nt][0]; bfv_R->
U = CV.
U[nt][m-1];
63 bfv_L->
P = CV.
P[nt][0]; bfv_R->
P = CV.
P[nt][m-1];
64 bfv_L->
RHO = CV.
RHO[nt][0]; bfv_R->
RHO = CV.
RHO[nt][m-1];
68 printf(
"Periodic boudary conditions in x direction.\n");
69 bfv_L->
U = CV.
U[nt][m-1]; bfv_R->
U = CV.
U[nt][0];
70 bfv_L->
P = CV.
P[nt][m-1]; bfv_R->
P = CV.
P[nt][0];
71 bfv_L->
RHO = CV.
RHO[nt][m-1]; bfv_R->
RHO = CV.
RHO[nt][0];
75 printf(
"Reflective + Free boudary conditions in x direction.\n");
76 bfv_L->
U = - CV.
U[nt][0]; bfv_R->
U = CV.
U[nt][m-1];
77 bfv_L->
P = CV.
P[nt][0]; bfv_R->
P = CV.
P[nt][m-1];
78 bfv_L->
RHO = CV.
RHO[nt][0]; bfv_R->
RHO = CV.
RHO[nt][m-1];
81 printf(
"No suitable boundary coditions in x direction!\n");
90 bfv_L->
H = h; bfv_R->
H = h;
93 bfv_L->
H = X[m] - X[m-1];
94 bfv_R->
H = X[1] - X[0];
96 case -2:
case -4:
case -24:
97 bfv_L->
H = X[1] - X[0];
98 bfv_R->
H = X[m] - X[m-1];
122 bfv_L->
SU = CV.
d_u[0]; bfv_R->
SU = CV.
d_u[m-1];
125 bfv_L->
SU = CV.
d_u[m-1]; bfv_R->
SU = CV.
d_u[0];
126 bfv_L->
SP = CV.
d_p[m-1]; bfv_R->
SP = CV.
d_p[0];
130 bfv_L->
SU = CV.
d_u[0];
_Bool bound_cond_slope_limiter(const _Bool NO_h, const int m, const int nt, struct cell_var_stru CV, struct b_f_var *bfv_L, struct b_f_var *bfv_R, _Bool find_bound, const _Bool Slope, const double t_c,...)
This function apply the minmod limiter to the slope in one dimension.
void minmod_limiter(const _Bool NO_h, const int m, const _Bool find_bound, double s[], const double U[], const double UL, const double UR, const double HL,...)
This function apply the minmod limiter to the slope in one dimension.
Fluid VARiables at Boundary.
double H
H is the grid cell width.
pointer structure of VARiables on STRUctural computational grid CELLs.
double * d_p
spatial derivatives in one dimension.
double config[]
Initial configuration data array.