Added obstacle check to advection.