A boundary element method analysis of temperature fields and stresses during solidification