Grain boundaries in nanophase materials