A set of programs to simulate a diffractive optics in various laser systems is developed. The codes are based on the efficient and general diffractive propagation computer program that employs FFT (FHT) techniques and the scheme of splitting the diffractive and gain-refractive steps of calculation. The codes include a new method of iterative calculation for the optical resonators loaded with active medium. This method solves the problem of the calculation's convergency in a case of several equal-loss modes and allows one to find the single mode's stability limits. The method is proposed to calculate continuous multimode lasing when neglecting a transverse-mode beating. The results of numerical simulation of several laser systems are reported: (1) the slave laser under the injection of an external signal (injection locked laser, 2-D code); (2) three-mirror resonators with active medium (3-D code); (3) two optically coupled lasers having unstable resonators (3-D code); (4) 1-D laser array in the Talbot cavity (self-imaging resonator 2-D code). Most suitable parameters of pointed optical schemes to achieve high efficiency and high beam quality can be found by using mathematical simulation.