39 namespace LibUtilities
69 out_final[i][j] = out[i][j];
82 out_final[i][j] = out[i][j];
88 NekDouble out[4][4] = {{1.0/6.0, 0, 0, 0},
89 {-0.5, 0.5, 0.5, 1.0/6.0},
90 {0.5, -1.0, 0, 2.0/3},
91 {-1.0/6.0, 0.5, -0.5, 1.0/6.0}};
96 out_final[i][j] = out[i][j];
102 NekDouble out[5][5] = {{1.0 / 24.0, 0, 0, 0, 0},
103 {-1.0/6, 1.0/6, 0.25, 1.0/6, 1.0/24},
104 {0.25, -0.5, -0.25, 0.5, 11.0/24},
105 {-1.0/6, 0.5, -0.25, -0.5, 11.0/24},
106 {1.0/24, -1.0/6.0, 0.25, -1.0/6, 1.0/24}};
111 out_final[i][j] = out[i][j];
117 NekDouble out[6][6] = {{1.0/1.020, 0, 0, 0, 0, 0},
118 {-1.0/24, 1.0/24, 1.0/12, 1.0/12, 1.0/24, 1.0/120},
119 {1.0/12, -1.0/6, -1.0/6, 1.0/6, 5.0/12, 13.0/60},
120 {-1.0/12, 0.25, 0, -1.0/2, 0, 11.0/20},
121 {1.0/24, -1.0/6, 1.0/6, 1.0/6, -5.0/12, 13.0/60},
122 {-1.0/120, 1.0/24, -1.0/12, 1.0/12, -1.0/24, 1.0/120}};
127 out_final[i][j] = out[i][j];
133 NekDouble out[7][7] = {{1.0/720, 0, 0, 0, 0, 0, 0},
134 {-1.0/120, 1.0/120, 1.0/48, 1.0/36, 1.0/48, 1.0/120, 1.0/720},
135 {1.0/48, -1.0/24, -1.0/16, 1.0/36, 3.0/16, 5.0/24, 19.0/240},
136 {-1.0/36, 1.0/1.02, 1.0/24, -2.0/9, -5.0/24, 1.0/3, 151.0/360},
137 {1.0/48, -1.0/12, 1.0/24, 2.0/9, -5.0/24, -1.0/3, 151.0/360},
138 {-1.0/120, 1.0/24, -1.0/16, -1.0/36, 3.0/16, -5.0/24, 19.0/240},
139 {1.0/720, -1.0/120, 1.0/48, -1.0/36, 1.0/48, -1.0/120, 1.0/720}};
144 out_final[i][j] = out[i][j];
150 NekDouble out[8][8] = {{1.0/5040, 0, 0, 0, 0, 0, 0, 0},
151 {-1.0/720, 1.0/720, 1.0/240, 1.0/144, 1.0/144, 1.0/240, 1.0/720, 1.0/5040 },
152 {1.0/240, -1.0/120, -1.0/60, 0, 1.0/18, 1.0/10, 7.0/90, 1.0/42},
153 {-1.0/144, 1.0/48, 1.0/48, -1.0/16, -19.0/144, 1.0/16, 49.0/144, 397.0/1680},
154 {1.0/144, -1.0/36, 0, 1.0/9, 0, -1.0/3, 0, 151.0/315},
155 {-1.0/240, 1.0/48, -1.0/48, -1.0/16, 19.0/144, 1.0/16, -49.0/144, 397.0/1680},
156 { 1.0/720, -1.0/120, 1.0/60, 0, -1.0/18, 1.0/10, -7.0/90, 1.0/42},
157 { -1.0/5040, 1.0/720, -1.0/240, 1.0/144, -1.0/144, 1.0/240, -1.0/720, 1.0/5040}};
162 out_final[i][j] = out[i][j];
182 NekDouble out[3] = {-1.0/12, 7.0/6, -1.0/12};
185 out_final[i] = out[i];
189 NekDouble out[5] = {37.0/1920, -97.0/480, 437.0/320, -97.0/480, 37.0/1920};
192 out_final[i] = out[i];
196 NekDouble out[7] = {-41.0/7560, 311.0/5040, -919.0/2520, 12223.0/7560, -919.0/2520, 311.0/5040, -41.0/7560};
199 out_final[i] = out[i];
203 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};
206 out_final[i] = out[i];
210 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};
213 out_final[i] = out[i];
217 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};
220 out_final[i] = out[i];
224 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};
227 out_final[i] = out[i];
243 temp[i] = temp[i-1]+h;
253 outarray[i] =
k_breaks[i] + x_value;
266 NekDouble last = floor(inarray[index]/h)*h;
267 int count = (int)((last-first)/h)+1;
269 mesh_breaks[0] = first;
270 for(j = 1; j < count; j++)
272 mesh_breaks[j] = mesh_breaks[j-1]+h;
274 outarray = mesh_breaks;
283 int nvalues = inarray.size();
286 for(i = 0; i < nvalues; i++ )
291 for(gamma = -degree; gamma <= degree; gamma++)
293 int cIndex = gamma+degree;
298 for(i = 0; i < nvalues; i++ )
300 outarray[i] +=
k_coeffs[cIndex]*bs_values[i];
313 int nvalues = inarray.size();
318 for(i = 0; i < nvalues; i++)
320 inarray_cp[i] = inarray[i] - offset;
321 inarray_cp[i] = inarray_cp[i]/h;
322 int interval = (int)floor(inarray_cp[i] - min_value);
324 if(inarray_cp[i] >= min_value && inarray_cp[i] <= max_value)
331 inarray_cp[i] -= shift;
347 for(i = 0; i < deg; i++)
349 poly_value = poly_value*x_value +
b_spline[interval][i+1];
362 for(j = 0; j < outarray.size(); j++)
364 if(mIndex >= inarray2.size())
366 outarray[j] = inarray1[kIndex];
368 }
else if(kIndex >= inarray1.size())
370 outarray[j] = inarray2[mIndex];
373 }
else if(inarray1[kIndex] < inarray2[mIndex])
375 outarray[j] = inarray1[kIndex];
379 outarray[j] = inarray2[mIndex];
#define ASSERTL0(condition, msg)
void EvaluateBspline(Array< OneD, NekDouble > inarray, NekDouble h, NekDouble offset, Array< OneD, NekDouble > &outarray)
This function evaluates the bspline at input values.
void UpdateKernelCoeffs()
This funciton updates the kernel coefficients.
Array< OneD, NekDouble > k_breaks
void EvaluateKernel(Array< OneD, NekDouble > inarray, NekDouble h, Array< OneD, NekDouble > &outarray)
This funciton evaluates the kernel at input values.
Array< TwoD, NekDouble > b_spline
void FindMeshUnderKernel(Array< OneD, NekDouble > &inarray, NekDouble h, Array< OneD, NekDouble > &outarray)
This funciton calculates the mesh breaks under the kernel support.
void UpdateKernelBspline()
The default destructor.
void MoveKernelCenter(NekDouble x_value, Array< OneD, NekDouble > &outarray)
This funciton moves the center of the kernel to the.
NekDouble EvaluateBsplinePoly(NekDouble x_value, int interval)
This funciton evaluates the piecewise bspline polynomial.
Array< OneD, NekDouble > k_coeffs
void UpdateKernelBreaks(NekDouble h)
This funciton updates the kernel breaks.
void UpdateKernelOrder(int order)
This funciton sets the k_order variable.
void UpdateKernelNumOfCoeffs()
This funciton sets the k_ncoeffs variable.
void Sort(Array< OneD, NekDouble > &inarray1, Array< OneD, NekDouble > &inarray2, Array< OneD, NekDouble > &outarray)
This funciton performs the ordered merge of.
void UpdateKernelWidth()
This funciton sets the kernel width size.
Kernel()
The default constructor.
The above copyright notice and this permission notice shall be included.