  Materials with coupled or competing order parameters display highly tunable
ground states, where subtle perturbations reveal distinct electronic and
magnetic phases. These phases generally are underpinned by complex crystal
structures, but the role of structural complexity in these phases often is
unclear. We use group theoretic methods and first-principles calculations to
analyze a set of coupled structural distortions that underlie the polar charge-
and orbitally- ordered antiferromagnetic ground state of $A$-site ordered
SmBaMn$_2$O$_6$. We show that these distortions play a key role in establishing
the ground state and stabilizing a network of domain wall vortices.
Furthermore, we show that the crystal structure provides a knob to control
competing electronic and magnetic phases at structural domain walls and in
epitaxially strained thin films. These results provide new understanding of the
complex physics realized across multiple length scales in SmBaMn$_2$O$_6$ and
demonstrate a framework for systematic exploration of correlated and
structurally complex materials.
