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'], my_dict['nTimeSteps'],my_dict['nStepsODEsolver']) # to have the starting points in the history is as well posH = np.r_[my_dict['pts_at_0'],posH] # make sure the ending points are the same for both methods T = my_dict['nTimeSteps'] if np.any((posH[(T)*N : (T+1)*N,:]-posT) > 1e-6): print (posH[(T)*N : (T+1)*N,:]-posT) raise ValueError #pdb.set_trace() #print posT.shape #print posT.T
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'], my_dict['nTimeSteps'], my_dict['nStepsODEsolver']) # to have the starting points in the history is as well posH = np.r_[my_dict['pts_at_0'], posH] # make sure the ending points are the same for both methods T = my_dict['nTimeSteps'] if np.any((posH[(T) * N:(T + 1) * N, :] - posT) > 1e-6): print(posH[(T) * N:(T + 1) * N, :] - posT) raise ValueError #pdb.set_trace() #print posT.shape #print posT.T