Modeling and Design of Integrated Optical Circuits in Photonic Crystals