Closed tyrafluid closed 1 year ago
Hi @tyrafluid! By default, density and velocity are not updated during time marching. Only when you call lbm.update_fields();
in main_setup()
explicitly, they are updated in GPU memory, and a subsequent lbm.rho.read_from_device();
/lbm.u.read_from_device();
brings them in CPU memory to evaluate by accessing lbm.rho[n]
/lbm.u.x[n]
/lbm.u.y[n]
/lbm.u.z[n]
.
If you want density and velocity do be updated during time marching, you can add the line #define UPDATE_FIELDS
somewhere in src/defines.hpp
.
Thank you @ProjectPhysX I want to know how to read the your code. First of all, I would like to learn the structure of your code. Could you teach me ?
Hi @ProjectPhysX ,
I would like to know the difference between when I use this option and when I dont use this option.
As long as I use this option, density and velocity arent updated during time marching? Moreover, could you teach me how I set up this option.
Thank you