 void swirl_setprob(double period_in)
 {
     s_tperiod = period_in;
+
+    cudaMallocManaged(&data,100);
+    data[0] = period_in;
 }
 
 


__device__ __managed__ double s_tperiod;


__device__ double psi(double x, double y)
{

    xll = xlower + (ipatch-1)*dx;
    yll = ylower + (jpatch-1)*dy;

    //vt = cos(2*M_PI*(time+dt/2.0)/s_tperiod);
    vt = cos(2*M_PI*(time+dt/2.0)/data[0]);
    p1 = psi(xll,yll+dy);
    p2 = psi(xll,yll);
    p3 = psi(xll+dx,yll);
