Computer simulation of grain growth and macrostructure development during solidification