advect

Differentiable Physics Kernel using NVIDIA Warp. Supports Inverse Design via gradients.

Classes

Functions

traffic_step_kernel(positions, velocities, ...)

Module Contents

traffic_step_kernel(positions, velocities, traffic_light_pos, traffic_light_timings, time, dt, sharpness, bounds_min, bounds_max)
class AdvectEngine(num_agents=100000)
num_agents = 100000
device = 'cpu'
bounds_min = (0.0, 0.0)
bounds_max = (5000.0, 5000.0)
current_time = 0.0
pos_buffer
vel_buffer
traffic_lights_pos
traffic_lights_timings
tape = None
step(time, dt=0.1)

Run differentiable step with Tape.

tick(dt=1.0 / 60.0)

Compatiblity method for Refinery/Sentinel.

backward_pass(loss_tensor)

Triggers backward propagation to compute gradients for traffic lights.