Can we approximate any open set by sub-domains with smooth boundary? In some books, mainly about PDEs, I read that any open set can be approximated by sub-domain with smooth boundary  (not just piecewise smooth). In 2 dimensional case, this seemly to be quite trivial: for any subdomain, use small open balls to cover its boundary and then mollify the connection parts. But in the higher dimensional case, I think this is not that obvious.
So the first question is:  how can we approximate any open set by sub-domain with smooth boundary?
And the second question is: In what meaning the approximation is? Pointwise, i.e., we can find subdomain $D_n$ with smooth boundary such that $D_n\uparrow A$? uniformly pointwise? Or in the Lebesgue measure sense? etc.
Here "$D_n\uparrow A$" uniformly pointwise" means  means that $\partial D_n\subset A\cap A_n^c$, where  $A_n:=\{ x \in A:d(x,\partial A)\geq \frac1n \}$,.
 A: By a well-known theorem of Whitney, any closed subset of $R^n$ coincides with the zero set of a $C^\infty$ function:
Whitney, Hassler: Analytic extensions of differentiable functions defined in closed sets, Trans. AMS 36 (1934), 63--89.
Let $f$ be such a function for the boundary of the domain. By Sard's theorem $f$ has a regular value $x$ arbitrarily close to $0$. Then a component of $f^{-1}(x)$ yields the desired approximation. To get a subdomain, make sure that $x$ coincides with a value of $f$ inside the domain.
There is an even easier way of doing this when the domain is bounded: cover the domain by balls of radius $\epsilon$, or take the union of a finite collection of balls of radius $\epsilon$ contained in the domain and covering a compact subset. For each ball let $f\colon R^n\to R$ be the function whose zero  set coincides with the boundary of the ball (i.e., the distance function from the center of the ball minus the radius). Now multiply all these functions to obtain a function $F$, and take a level set of $F$ close to $0$.
The second method yields a subdomain which is not only smooth but is algebraic. In both cases here, the approximation is with regard to the Hausdorff distance.
A: Here is a brief sketch of a simple way to do this. For convenience, I will consider an open subset $U$ of the plane. We cover the latter in the natural way with squares of side length $2^{-n}$ and let $U_n$ be the union of all of those inside $U$.  Then $U$ is the union of the $U_n$. This reduces to the case of such $U_n$ and this can easily be done explicitly.
Edit: Since I can't comment, here is a reply to the criticism below, not in complete detail since I am working with a pad. Since my $U_n$ is a finite Union of squares (well hypercubes in higher dimensions) it suffices to approximate these externally by smooth sets.  In one dimension, we have a compact interval inside an open set. Then we can take a suitable bump function which  is $1$ on the interval and zero outside the open set (the convolution of the characteristic function of the interval with a very thin bell function.  For a hypercube we simply take tensor products of such  bump functions.  These functions yield smooth approximations to the hyper cubes in a standard way.
