Analysis of non-linear optical components based on photonic crystals.