Fast Graph Partitioning and Its Application in Sparse Matrix Ordering