# call to the transform function #sw = StopWatch() #calc_flowline_arr1d(**my_dict) #sw.toc("flowline CPU") #pos0 = np.zeros((my_dict['x_old'].shape[0],2)) #pos0[:,0] = my_dict['x_old']; #pos0[:,1] = my_dict['y_old']; #X,Y = np.meshgrid(np.arange(512),np.arange(512)) #pos0 = np.zeros((512*512,2)) #pos0[:,0] = X.ravel() #pos0[:,1] = Y.ravel() # #sw.tic() cpavf_calcs_gpu = CpavfCalcsGPU(nCells,mytype,dim) #sw.toctic("GPU init") #print my_dict['pts_at_0'] posT = np.zeros_like(my_dict['pts_at_0']) posT = cpavf_calcs_gpu.calc_transformation( my_dict['xmins'], my_dict['xmaxs'], my_dict['Trels'],my_dict['As'], my_dict['pts_at_0'],my_dict['dt'], my_dict['nTimeSteps'],my_dict['nStepsODEsolver'], posT ) #sw.toctic("GPU compute") v = cpavf_calcs_gpu.calc_velocities( my_dict['xmins'], my_dict['xmaxs'], my_dict['As'],
# call to the transform function #sw = StopWatch() #calc_flowline_arr1d(**my_dict) #sw.toc("flowline CPU") #pos0 = np.zeros((my_dict['x_old'].shape[0],2)) #pos0[:,0] = my_dict['x_old']; #pos0[:,1] = my_dict['y_old']; #X,Y = np.meshgrid(np.arange(512),np.arange(512)) #pos0 = np.zeros((512*512,2)) #pos0[:,0] = X.ravel() #pos0[:,1] = Y.ravel() # #sw.tic() cpavf_calcs_gpu = CpavfCalcsGPU(nCells, mytype, dim) #sw.toctic("GPU init") #print my_dict['pts_at_0'] posT = np.zeros_like(my_dict['pts_at_0']) posT = cpavf_calcs_gpu.calc_transformation(my_dict['xmins'], my_dict['xmaxs'], my_dict['Trels'], my_dict['As'], my_dict['pts_at_0'], my_dict['dt'], my_dict['nTimeSteps'], my_dict['nStepsODEsolver'], posT) #sw.toctic("GPU compute") v = cpavf_calcs_gpu.calc_velocities(my_dict['xmins'], my_dict['xmaxs'], my_dict['As'], my_dict['pts_at_0']) #sw.toctic("GPU velocities") posH = cpavf_calcs_gpu.calc_trajectory(my_dict['xmins'], my_dict['xmaxs'], my_dict['Trels'], my_dict['As'], my_dict['pts_at_0'], my_dict['dt'],