Sharp interface Cartesian grid method III: Solidification of pure materials and binary solutions