Field localization and enhanced second-harmonic generation in silicon based microcavities