Diffusion and Segregation in Bulk Nanomaterials and Thin Layers