22 const int*
const a_periodic
25 for (
int d = 0; d < a_ndims; d++) {
47 int index_gpt[a_ndims];
49 index_gpt[d] -= a_ngpt;
52 int index_int[a_ndims];
54 index_int[d] += (a_dim[d]-a_ngpt);
57 _ArrayCopy1D_((a_u+a_nvars*p_int), (a_u+a_nvars*p_gpt), a_nvars);
66 int index_gpt[a_ndims];
68 index_gpt[d] += a_dim[d];
71 int index_int[a_ndims];
75 _ArrayCopy1D_((a_u+a_nvars*p_int), (a_u+a_nvars*p_gpt), a_nvars);
98 int index_gpt[a_ndims];
100 index_gpt[d] -= a_ngpt;
103 int index_int[a_ndims];
115 double alpha = - (double) (a_ngpt - index[d]);
116 double c0 = -((-2.0 + alpha)*(-1.0 + alpha)*alpha)/6.0;
117 double c1 = ((-2.0 + alpha)*(-1.0 + alpha)*(1.0 + alpha))/2.0;
118 double c2 = (alpha*(2.0 + alpha - alpha*alpha))/2.0;
119 double c3 = (alpha*(-1.0 + alpha*alpha))/6.0;
121 for (
int v = 0; v < a_nvars; v++) {
123 a_u[p_gpt*a_nvars+v] = c0 * a_u[p_int_0*a_nvars+v]
124 + c1 * a_u[p_int_1*a_nvars+v]
125 + c2 * a_u[p_int_2*a_nvars+v]
126 + c3 * a_u[p_int_3*a_nvars+v];
141 int index_gpt[a_ndims];
143 index_gpt[d] += a_dim[d];
146 int index_int[a_ndims];
149 index_int[d] = a_dim[d]-1;
158 double alpha = - (double) (index[d]+1);
159 double c0 = -((-2.0 + alpha)*(-1.0 + alpha)*alpha)/6.0;
160 double c1 = ((-2.0 + alpha)*(-1.0 + alpha)*(1.0 + alpha))/2.0;
161 double c2 = (alpha*(2.0 + alpha - alpha*alpha))/2.0;
162 double c3 = (alpha*(-1.0 + alpha*alpha))/6.0;
164 for (
int v = 0; v < a_nvars; v++) {
166 a_u[p_gpt*a_nvars+v] = c0 * a_u[p_int_0*a_nvars+v]
167 + c1 * a_u[p_int_1*a_nvars+v]
168 + c2 * a_u[p_int_2*a_nvars+v]
169 + c3 * a_u[p_int_3*a_nvars+v];
#define _ArraySetValue_(x, size, value)
#define _ArrayIncrementIndex_(N, imax, i, done)
void fillGhostCells(const int *const, const int, double *const, const int, const int, const int *const)
#define _ArrayIndex1D_(N, imax, i, ghost, index)
#define _ArrayCopy1D_(x, y, size)
Contains macros and function definitions for common array operations.