-
Notifications
You must be signed in to change notification settings - Fork 430
Open
Description
Hi! I wonder is there any more optimal way to model the Coriolis force than rhis
while (true) { // main simulation loop
lbm.u.read_from_device();
for (uint z = 1u; z < Nz - 1u; z++) {
for (uint y = 1u; y < Ny-1u; y++) {
for (uint x = 1u; x < Nx - 1u; x++) {
const uint n = x + (y + z * Ny) * Nx;
lbm.F.x[n] = -Co * lbm.u.y[n];
lbm.F.y[n] = Co * lbm.u.x[n];
lbm.F.z[n] = 0.0f;
}
}
}
lbm.F.write_to_device();
lbm.run(1u);
}
It slows down a thousand times :(
Metadata
Metadata
Assignees
Labels
No labels