  A self-consistent computational scheme is presented for one dimensional (1D)
and two dimensional (2D) metamaterial systems with gain incorporated into the
nanostructures. The gain is described by a generic four-level system. The loss
compensation and the lasing behavior of the metamaterial system with gain are
studied. A critical pumping rate exists for compensating the losses of the
metamaterial. There exists a wide range of input signals where the composite
system behaves linearly. Nonlinearities arise for stronger signals due to gain
depletion. The retrieved effective parameters are presented for one layer of
gain embedded in two layers of Lorentz dielectric rods and split ring
resonators with two different gain inclusions: (1) gain is embedded in the gaps
only and (2) gain is surrounding the SRR. When the pumping rate increases,
there is a critical pumping rate that the metamaterial system starts lasing.
