  We study vortex patterns in a prototype nonlinear optical system:
counterpropagating laser beams in a photorefractive crystal, with or without
the background photonic lattice. The vortices are effectively planar and
described by the winding number and the "flavor" index, stemming from the fact
that we have two parallel beams propagating in opposite directions. The problem
is amenable to the methods of statistical field theory and generalizes the
Berezinsky-Kosterlitz-Thouless transition of the XY model to the "two-flavor"
case. In addition to the familiar conductor and insulator phases, we also have
the perfect conductor (vortex proliferation in both beams/"flavors") and the
frustrated insulator (energy costs of vortex proliferation and vortex
annihilation balance each other). In the presence of disorder in the background
lattice, a novel phase appears which shows long-range correlations and absence
of long-range order, thus being analogous to spin glasses. An important benefit
of this approach is that qualitative behavior of patterns can be known without
intensive numerical work over large areas of the parameter space. More
generally, we would like to draw attention to connections between the
(classical) pattern-forming systems in photorefractive optics and the methods
of (quantum) condensed matter and field theory: on one hand, we use the
field-theoretical methods (renormalization group, replica formalism) to analyze
the patterns; on the other hand, the observed phases are analogous to those
seen in magnetic systems, and make photorefractive optics a fruitful testing
ground for condensed matter systems. As an example, we map our system to a
doped $O(3)$ antiferromagnet with $\mathbb{Z}_2$ defects, which has the same
structure of the phase diagram.
