Modeling of amplification and light generation in one-dimensional photonic crystal using a multiwavelength transfer matrix approach.