  Wannier function expansions are well suited for the description of photonic-
crystal-based defect structures, but constructing maximally localized Wannier
functions by optimizing the phase degree of freedom of the Bloch modes is
crucial for the efficiency of the approach. We systematically analyze different
locality criteria for maximally localized Wannier functions in two- dimensional
square and triangular lattice photonic crystals, employing (local)
conjugate-gradient as well as (global) genetic-algorithm-based, stochastic
methods. Besides the commonly used second moment (SM) locality measure, we
introduce a new locality measure, namely the integrated modulus (IM) of the
Wannier function. We show numerically that, in contrast to the SM criterion,
the IM criterion leads to an optimization problem with a single extremum, thus
allowing for fast and efficient construction of maximally localized Wannier
functions using local optimization techniques. We also present an analytical
formula for the initial choice of Bloch phases, which under certain conditions
represents the global maximum of the IM criterion and, thus, further increases
the optimization efficiency in the general case.
