Computational studies of the electromagnetic properties of metamaterials and applications