Calculation Method for Slab and Grating Structure Made of Anisotropic Materials