Exactmodeling ofdefect modesinphotonic crystals