@@ -327,31 +327,28 @@ class SplineSpec<DataT, XdimT, YdimT, 0> : public SplineContainer<DataT>
327327 DataT S1[maxInterpolations];
328328 DataT D1[maxInterpolations];
329329
330- int nrofInterpolations = (1 << (2 * nXdim - 2 )) * nYdim;
331- int nrofKnots = 1 << (nXdim);
330+ int nInterpolations = (1 << (2 * nXdim - 2 )) * nYdim;
331+ int nKnots = 1 << (nXdim);
332332
333333 for (int d = 0 ; d < nXdim; d++) { // for every dimension
334334 DataT* pointer[4 ] = {S0, D0, S1, D1}; // pointers for interpolation arrays S0, D0, S1, D1 point to Arraystart
335- for (int i = 0 ; i < nrofKnots ; i++) { // for every knot
336- for (int j = 0 ; j < nrofKnots ; j++) { // for every parametertype
335+ for (int i = 0 ; i < nKnots ; i++) { // for every knot
336+ for (int j = 0 ; j < nKnots ; j++) { // for every parametertype
337337 int pointernr = 2 * (i % 2 ) + (j % 2 ); // to which array should it be delivered
338338 for (int k = 0 ; k < nYdim; k++) {
339- pointer[pointernr][0 ] = iParameters[(i * nrofKnots + j) * nYdim + k];
339+ pointer[pointernr][0 ] = iParameters[(i * nKnots + j) * nYdim + k];
340340 pointer[pointernr]++;
341341 }
342342 } // end for j (every parametertype)
343343 } // end for i (every knot)
344344
345345 const typename Spline1D<DataT>::Knot& knotL = mGrid [d].getKnot (indices[d]);
346- int Ydim = nrofInterpolations;
347346 DataT coordinate = u[d];
348-
349- typedef Spline1DSpec<DataT, 0 , YdimT> TGridX;
347+ typedef Spline1DSpec<DataT, 0 , 0 > TGridX;
350348 const TGridX& gridX = *((const TGridX*)&(mGrid [d]));
351- gridX.interpolateU (Ydim, knotL, S0, D0, S1, D1, coordinate, iParameters);
352-
353- nrofInterpolations = nrofInterpolations / 4 ;
354- nrofKnots = nrofKnots / 2 ;
349+ gridX.interpolateU (nInterpolations, knotL, S0, D0, S1, D1, coordinate, iParameters);
350+ nInterpolations /= 4 ;
351+ nKnots /= 2 ;
355352 } // end d (every dimension)
356353
357354 for (int i = 0 ; i < nYdim; i++) {
0 commit comments