 
 template <int max_half_support>
 __device__
-void ucs_common(cuDoubleComplex mesh[max_half_support * 2 + 1][max_half_support * 2 + 1]){
+void ucs_common(
+    cuDoubleComplex mesh[max_half_support * 2 + 1][max_half_support * 2 + 1]
+  , double t2
+  ){
   const int
       x = blockIdx.x * blockDim.x + threadIdx.x
     , y = blockIdx.y * blockDim.y + threadIdx.y
     ;
   double
       sc = double(max_half_support)
-    , xs = double(x - max_half_support) / sc
-    , ys = double(y - max_half_support) / sc
+    , xs = double(x - max_half_support) / sc * t2
+    , ys = double(y - max_half_support) / sc * t2
     ;
 
   mesh[x][y].x = xs * xs + ys * ys;


// test instantiation
template __device__
void ucs_common<256>(cuDoubleComplex mesh[513][513]);

template <int max_half_support>
__device__
void calc_inplace(
    cuDoubleComplex mesh[max_half_support * 2 + 1][max_half_support * 2 + 1]
  , double t2
  , double w
  ){
  const int
      x = blockIdx.x * blockDim.x + threadIdx.x
    , y = blockIdx.y * blockDim.y + threadIdx.y
    ;
  double
      r2 = mesh[x][y].x * t2 * t2
    , ph = w * (1.0 - sqrt(1.0 - r2))
    ;
  double s, c;
  sincos(2.0 * CUDART_PI * ph, &s, &c);
  mesh[x][y].x = s;

void calc(
    cuDoubleComplex dst[max_half_support * 2 + 1][max_half_support * 2 + 1]
  , cuDoubleComplex src[max_half_support * 2 + 1][max_half_support * 2 + 1]
  , double w
  ){
  const int
      x = blockIdx.x * blockDim.x + threadIdx.x
    , y = blockIdx.y * blockDim.y + threadIdx.y
    ;
  double ph = w * (1.0 - sqrt(1.0 - src[x][y].x));
  double s, c;
  sincos(2.0 * CUDART_PI * ph, &s, &c);
  dst[x][y].x = s;
