Solution (source code)

= Solution

Traverse the large rectangle counterclockwise, taking its lower edge at $y\to-\infty$ and upper edge at $y\to+\infty$. Along the lower edge the director angle changes by $-\pi/2$; along the upper edge, traversed from $x=L$ to $x=0$, it changes by another $-\pi/2$. The anchored director is constant along the two vertical edges. The net continuous angle change is therefore
$$
\Delta\theta=-\pi.
$$
The <topological charge of a two-dimensional nematic disclination> enclosed by a circuit is $q=\Delta\theta/(2\pi)$, so
$$
\boxed{q_{\rm total}=-\frac12.}
$$
A nonsingular director field on the enclosed disk would have zero winding. At least one <nematic disclination> must therefore lie inside.