Assume we have a domain $\Omega \subset \mathbb{R}^n$ and a domain $\Omega_a$ of codimension $2$ embedded in $\Omega$. This setting comes from physics, where I have a cube $[0,1]^3$ with inside a curve, which plays the role of $\Omega_a$.
If I am considering continuous functions over $\Omega$, then the restriction operator $\gamma: C^0(\bar{\Omega}) \rightarrow C^0(\bar{\Omega_a}) \subset L^2(\Omega_a)$ makes sense. However, I've been told that it's not possible, in general, to extend $\gamma$ continuously to $H^1(\Omega)$. Why is this true? I'd like to see an example of why this fails.
For $n=2$ take the unbounded $H^1$-function $u = \log \log \|x\|^{-1}$ for $\Omega = B_{1/2}(0)$.
Define $u_n = \max(n, u(x))$. Then $(u_n)$ is bounded in $H^1$, the $u_n$'s are continuous, but $u_n(0)$ is unbounded. Hence there is no trace operator with the usual properties.
For $n>2$, define $v(x) = u(x_1,x_2)$ with $u$ as above. This is again in $H^1$, but there is no trace operator for $\Omega_a\subseteq \{x\in \Omega: \ x_1,x_2=0\}$.