Fluid control using the adjoint method | Synapse