Simulation of the Microstructural Evolution of Pure Material and Alloys in an Undercooled Melts via Phase-field Method and Adaptive Computational Domain