Residual-Based Isotropic and Anisotropic Mesh Adaptation for Computational Fluid Dynamics