The development of optical systems today is strongly supported by computer simulations. Computer ray tracing tools are well established in the field of geometrical optics for designing objectives, light channels, etc. Ray tracing is conceptually quite simple, which makes the implementation as well as the interpretation of ray tracing results easy, although the design of high-quality lens systems remains a challenging task. In the field of wave optics, there are software tools as well, but they are still not as mature as the ray tracing tools. The main reason for this is that numerically solving partial differential equations is numerically more complex and not as intuitive as ray tracing. Besides simple wave propagation, the main field of use of the wave optics methods today is the development of lasers and laser resonator and nonlinear optics. The optical properties of the media, in general, depend on the temperature and mechanical stresses. The interaction of the electromagnetic fields with matter, thus, has to self-consistently include thermomechanical computations.