Grain structure evolution in transition-mode melting in direct energy deposition