  Let $\mu>0$ be a fixed constant, and we prove that minimizers to the
following energy functional \begin{align*}
  E_f(u,\Omega):=\int_{\Omega}|\nabla u|^2+\mu P(\Omega) \end{align*}exist
among pairs $(\Omega,u)$ such that $\Omega$ is an $M$-uniform domain with
finite perimeter and fixed volume, and $u \in H^1(\Omega,\mathbb{S}^2)$ with $u
=\nu_{\Omega}$, the measure-theoretical outer unit normal, almost everywhere on
the reduced boundary of $\Omega$. The uniqueness of optimal configurations in
various settings is also obtained. In addition, we consider a general energy
functional given by \begin{align*}
  E_f(u,\Omega):=\int_{\Omega} |\nabla u(x)|^2 \,dx + \int_{\partial^* \Omega}
f\big(u(x)\cdot \nu_{\Omega}(x)\big) \,d\mathcal{H}^2(x), \end{align*}where
$\partial^* \Omega$ is the reduced boundary of $\Omega$ and $f$ is a convex
positive function on $\mathbb R$. We prove that minimizers of $E_f$ also exist
among $M$-uniform outer-minimizing domains $\Omega$ with fixed volume and $u
\in H^1(\Omega,\mathbb{S}^2)$.
