A new computationally efficient technique for modeling periodic structures with applications to EBG, FSSs and metamaterials