Is stackrt function can be used for 2D and 3D simulations ?
stackrt command uses a plane wave (injected say in the z-direction and infinite in the x and y) that passe through multilayers and uses transfer matrix:
This is independent of the FDTD dimension that you are working with.
You can perform FDTD simulations in both 2D and 3D (results will be identical) and compare the results with stackrt command. These results will be identical, and 2D FDTD simulations will be faster than 3D FDTD.