-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed a few 2D bugs #85
Conversation
I'll wait for you to push other changes. One comment for now is to squash your commits with a better description on your end. |
return -_u_vec(_c_float[0, l], _c_float[1, l], _c_float[2, l]) | ||
if wp.static(_d == 3): | ||
for l in range(_q): | ||
if missing_mask[l] == wp.uint8(1) and wp.abs(_c[0, l]) + wp.abs(_c[1, l]) + wp.abs(_c[2, l]) == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not make sense. As we only have 3D vectors in Warp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not true. The lattice velocity "c" is still represents a 2D vector per each lattice dimenion for a 2D lattice and a 3D vector per each lattice dimension for a 3D lattice.
else: | ||
for l in range(_q): | ||
if missing_mask[l] == wp.uint8(1) and wp.abs(_c[0, l]) + wp.abs(_c[1, l]) == 1: | ||
return -_u_vec(_c_float[0, l], _c_float[1, l]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not working with 2D vectors anymore in the Warp backend and their use should be avoided. The vectors shouldn't depend on the grid dimension. I guess this is being done because this is a normal. But the fix should be done more fundamentally to avoid downstream issues.
For example in 2D, you may have only (1,0,0) and (0,1,0),...Why would this not be working? I think the change should be down in the code that utilizes this normals later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the above comment.
Contributing Guidelines
Description
test_bc_indices_masker_warp.py
. This PR fixes that.Type of change
How Has This Been Tested?
Linting and Code Formatting
Make sure the code follows the project's linting and formatting standards. This project uses Ruff for linting.
To run Ruff, execute the following command from the root of the repository:
ruff check .