Skip to content
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

Simple and small refactoring - Remove redundant else block in the XPBD simulator #325

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions warp/sim/integrator_xpbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2808,12 +2808,8 @@ def simulate(self, model: Model, state_in: State, state_out: State, dt: float, c

with wp.ScopedTimer("simulate", False):
if model.particle_count:
if requires_grad:
particle_q = state_out.particle_q
particle_qd = state_out.particle_qd
else:
particle_q = state_out.particle_q
particle_qd = state_out.particle_qd
kristijanbartol marked this conversation as resolved.
Show resolved Hide resolved
particle_q = state_out.particle_q
particle_qd = state_out.particle_qd

self.particle_q_init = wp.clone(state_in.particle_q)
if self.enable_restitution:
Expand Down