Compressible and incompressible flow computations with a pressure based method