Fixed the adjoint class so that it now works with either BP or Stokes'