  We study grain boundaries between striped phases in the prototypical
Swift-Hohenberg equation. We propose an analytical and numerical far-field-core
decomposition that allows us to study existence and bifurcations of grain
boundaries analytically and numerically using continuation techniques. This
decomposition overcomes problems with computing grain boundaries in a large
doubly periodic box with phase conditions. Using the spatially conserved
quantities of the time-independent Swift-Hohenberg equation, we show that
symmetric grain boundaries must select the marginally zig-zag stable stripes.
We find that as the angle between the stripes is decreased, the symmetric grain
boundary undergoes a parity-breaking pitchfork bifurcation where dislocations
at the grain boundary split into disclination pairs. A plethora of asymmetric
grain boundaries (with different angles of the far-field stripes either side of
the boundary) is found and investigated. The energy of the grain boundaries is
then mapped out. We find that when the angle between the stripes is greater
than a critical angle, the symmetric grain boundary is energetically preferred
while when the angle is less than the critical angle, the grain boundaries
where stripes on one side are parallel to the interface are energetically
preferred. Finally, we propose a classification of grain boundaries that allows
us to predict various non-standard asymmetric grain boundaries.
