Dynamical approaches and incomplete gradients for shape optimization and flow control