An anisotropic adaptive method for the solution of 3-D inviscid and viscous compressible flows