FluidsGl sample question

Hello everyone, I’m new to CUDA/OpenGL and C++ all together so please bare with me, I’m experimenting with FluidsGL sample and my goal is to make two photos of the grid in two consecutive time steps where every pixel equals exactly one cell (done) and save the final velocity vector field that used to advect/move the fluid between the two frames. I couldn’t figure out where is it actually this vector field, any variables I tried yield a periodic kind of values doesn’t correspond at all to the movement I generate, my guess is that it is because of the FFT steps involved, anyone knows where I can find/recompute this final velcoity vector field in the code ??

Thanks in advance

Just in case someone has the same problem, the final velocity vector field was the one to expect really: dvfield. In order to get the correct values one has to consider that the vector was allocated using cudaMallocPitch, so this worked for me

v = *((cData *)((char *)hvfield + ii * tPitch) + jj);

where hvfield is the host velocity vector that is copied from the device velocity vector dvfield.