Numerical simulation in the optical and electromagnetic fields is very important because there are many special structures that are difficult to process, the environment is difficult to simulate, or the cost of experiments is very high. There are also many numerical algorithms for optical and electromagnetic simulation, such as FEM, FDTD, MOM, RCWA, etc.