40 namespace LibUtilities
70 out_final[i][j] = out[i][j];
83 out_final[i][j] = out[i][j];
89 NekDouble out[4][4] = {{1.0/6.0, 0, 0, 0},
90 {-0.5, 0.5, 0.5, 1.0/6.0},
91 {0.5, -1.0, 0, 2.0/3},
92 {-1.0/6.0, 0.5, -0.5, 1.0/6.0}};
97 out_final[i][j] = out[i][j];
103 NekDouble out[5][5] = {{1.0 / 24.0, 0, 0, 0, 0},
104 {-1.0/6, 1.0/6, 0.25, 1.0/6, 1.0/24},
105 {0.25, -0.5, -0.25, 0.5, 11.0/24},
106 {-1.0/6, 0.5, -0.25, -0.5, 11.0/24},
107 {1.0/24, -1.0/6.0, 0.25, -1.0/6, 1.0/24}};
112 out_final[i][j] = out[i][j];
118 NekDouble out[6][6] = {{1.0/1.020, 0, 0, 0, 0, 0},
119 {-1.0/24, 1.0/24, 1.0/12, 1.0/12, 1.0/24, 1.0/120},
120 {1.0/12, -1.0/6, -1.0/6, 1.0/6, 5.0/12, 13.0/60},
121 {-1.0/12, 0.25, 0, -1.0/2, 0, 11.0/20},
122 {1.0/24, -1.0/6, 1.0/6, 1.0/6, -5.0/12, 13.0/60},
123 {-1.0/120, 1.0/24, -1.0/12, 1.0/12, -1.0/24, 1.0/120}};
128 out_final[i][j] = out[i][j];
134 NekDouble out[7][7] = {{1.0/720, 0, 0, 0, 0, 0, 0},
135 {-1.0/120, 1.0/120, 1.0/48, 1.0/36, 1.0/48, 1.0/120, 1.0/720},
136 {1.0/48, -1.0/24, -1.0/16, 1.0/36, 3.0/16, 5.0/24, 19.0/240},
137 {-1.0/36, 1.0/1.02, 1.0/24, -2.0/9, -5.0/24, 1.0/3, 151.0/360},
138 {1.0/48, -1.0/12, 1.0/24, 2.0/9, -5.0/24, -1.0/3, 151.0/360},
139 {-1.0/120, 1.0/24, -1.0/16, -1.0/36, 3.0/16, -5.0/24, 19.0/240},
140 {1.0/720, -1.0/120, 1.0/48, -1.0/36, 1.0/48, -1.0/120, 1.0/720}};
145 out_final[i][j] = out[i][j];
151 NekDouble out[8][8] = {{1.0/5040, 0, 0, 0, 0, 0, 0, 0},
152 {-1.0/720, 1.0/720, 1.0/240, 1.0/144, 1.0/144, 1.0/240, 1.0/720, 1.0/5040 },
153 {1.0/240, -1.0/120, -1.0/60, 0, 1.0/18, 1.0/10, 7.0/90, 1.0/42},
154 {-1.0/144, 1.0/48, 1.0/48, -1.0/16, -19.0/144, 1.0/16, 49.0/144, 397.0/1680},
155 {1.0/144, -1.0/36, 0, 1.0/9, 0, -1.0/3, 0, 151.0/315},
156 {-1.0/240, 1.0/48, -1.0/48, -1.0/16, 19.0/144, 1.0/16, -49.0/144, 397.0/1680},
157 { 1.0/720, -1.0/120, 1.0/60, 0, -1.0/18, 1.0/10, -7.0/90, 1.0/42},
158 { -1.0/5040, 1.0/720, -1.0/240, 1.0/144, -1.0/144, 1.0/240, -1.0/720, 1.0/5040}};
163 out_final[i][j] = out[i][j];
179 Array<OneD,NekDouble> out_final(
k_ncoeffs);
183 NekDouble out[3] = {-1.0/12, 7.0/6, -1.0/12};
186 out_final[i] = out[i];
190 NekDouble out[5] = {37.0/1920, -97.0/480, 437.0/320, -97.0/480, 37.0/1920};
193 out_final[i] = out[i];
197 NekDouble out[7] = {-41.0/7560, 311.0/5040, -919.0/2520, 12223.0/7560, -919.0/2520, 311.0/5040, -41.0/7560};
200 out_final[i] = out[i];
204 NekDouble out[9] = {153617.0/92897280, -35411.0/1658880, 3153959.0/23224320, -6803459.0/11612160, 18017975.0/9289728, -6803459.0/11612160, 3153959.0/23224320, -35411.0/1658880, 153617.0/92897280};
207 out_final[i] = out[i];
211 NekDouble out[11] = {-4201.0/7983360, 30773.0/3991680, -20813.0/380160, 2825.0/11088, -1179649.0/1330560, 1569217.0/665280, -1179649.0/1330560, 2825.0/11088, -20813.0/380160, 30773.0/3991680, -4201.0/7983360};
214 out_final[i] = out[i];
218 NekDouble out[13] = {13154671847.0/76517631590400.0, -18073154507.0/6376469299200.0, 287360344573.0/12752938598400.0, -2217732343517.0/19129407897600.0, 1240941746699.0/2833986355200.0, -275386671493.0/212548976640.0, 2648644782397.0/910924185600.0, -275386671493.0/212548976640.0, 1240941746699.0/2833986355200.0, -2217732343517.0/19129407897600.0, 287360344573.0/12752938598400.0, -18073154507.0/6376469299200.0, 13154671847.0/76517631590400.0};
221 out_final[i] = out[i];
225 NekDouble out[15] = {-800993.0/14010796800.0, 73587167.0/70053984000.0, -651305719.0/70053984000.0, 3714581677.0/70053984000.0, -3085236289.0/14010796800.0, 1426328231.0/2001542400.0, -43268401973.0/23351328000.0, 42401344373.0/11675664000.0, -43268401973.0/23351328000.0, 1426328231.0/2001542400.0, -3085236289.0/14010796800.0, 3714581677.0/70053984000.0, -651305719.0/70053984000.0, 73587167.0/70053984000.0, -800993.0/14010796800.0};
228 out_final[i] = out[i];
240 Array<OneD,NekDouble> temp(
k_width+1);
244 temp[i] = temp[i-1]+h;
254 outarray[i] =
k_breaks[i] + x_value;
262 Array<OneD,NekDouble> &outarray)
267 NekDouble last = floor(inarray[index]/h)*h;
268 int count = (int)((last-first)/h)+1;
269 Array<OneD,NekDouble> mesh_breaks(count);
270 mesh_breaks[0] = first;
271 for(j = 1; j < count; j++)
273 mesh_breaks[j] = mesh_breaks[j-1]+h;
275 outarray = mesh_breaks;
280 Array<OneD,NekDouble> &outarray)
284 int nvalues = inarray.num_elements();
285 Array<OneD,NekDouble> bs_values(nvalues);
287 for(i = 0; i < nvalues; i++ )
292 for(gamma = -degree; gamma <= degree; gamma++)
294 int cIndex = gamma+degree;
299 for(i = 0; i < nvalues; i++ )
301 outarray[i] +=
k_coeffs[cIndex]*bs_values[i];
308 NekDouble offset, Array<OneD,NekDouble> &outarray)
314 int nvalues = inarray.num_elements();
317 Array<OneD,NekDouble> inarray_cp(nvalues);
319 for(i = 0; i < nvalues; i++)
321 inarray_cp[i] = inarray[i] - offset;
322 inarray_cp[i] = inarray_cp[i]/h;
323 int interval = (int)floor(inarray_cp[i] - min_value);
325 if(inarray_cp[i] >= min_value && inarray_cp[i] <= max_value)
332 inarray_cp[i] -= shift;
348 for(i = 0; i < deg; i++)
350 poly_value = poly_value*x_value +
b_spline[interval][i+1];
357 void Kernel::Sort(Array<OneD,NekDouble> &inarray1, Array<OneD,NekDouble> &inarray2,
358 Array<OneD,NekDouble> &outarray)
363 for(j = 0; j < outarray.num_elements(); j++)
365 if(mIndex >= inarray2.num_elements())
367 outarray[j] = inarray1[kIndex];
369 }
else if(kIndex >= inarray1.num_elements())
371 outarray[j] = inarray2[mIndex];
374 }
else if(inarray1[kIndex] < inarray2[mIndex])
376 outarray[j] = inarray1[kIndex];
380 outarray[j] = inarray2[mIndex];