Linear stability of finite difference equations for three-dimensional flow problems