Text this: Efficient Frequency-Dependent Newmark-Beta-FDTD Method for Periodic Grating Calculation