surface integral not agree with volume by divergence theorem 
I used divergence theorem to get it equals $6\pi$. But when I explicitly calculated it with surface integral, I could not get the surface facing up correct. To me, it is an ellipse but I could not get the area correct. Any help would be appreciated. Thank you! 
 A: So, assuming $S$ is the surface of a solid, and not just part of a cylindrical shell, it has three parts: A flat bottom, a cylindrical side, and a slanted top.
The integral over the bottom is clearly $0$, as the field $\vec F$ has $0$ component in the $\vec k$-direction, and thus $\vec F\cdot \vec n = 0$.
For the cylindrical wall $C$, using cylindrical coordinates we get
$$
\iint_C \vec F\cdot \vec n\,dS = \int_0^{2\pi}\left(\int_{0}^{2-\sin\theta-\cos\theta}\vec F\cdot \vec n\,dz\right)d\theta\\
= \int_0^{2\pi}\left(\int_{0}^{2-\sin\theta-\cos\theta}1\,dz\right)d\theta\\
= \int_0^{2\pi}(2-\sin\theta-\cos\theta)\,d\theta = 4\pi
$$
Here $\vec F\cdot \vec n = 1$ because for a point $(1, \theta, z)$ on the cylinder (in cylindrical coordinates), we have $$\vec F = \cos\theta\,\vec i + \sin\theta\,\vec i + z\vec k\\\vec n = \cos\theta\,\vec i + \sin\theta\,\vec j$$
Finally, for the slanted top $T$. Because of the slant, for any $x, y$ we get that $dS = \sqrt3\cdot dx\,dy$. We also have, for any point $(x, y, z)\in T$, that
$$
\vec F = x\vec i + y\vec j + (2-x-y)\vec k\\
\vec n = \frac1{\sqrt3}\vec i + \frac1{\sqrt3}\vec j + \frac1{\sqrt3}\vec k
$$
so $\vec F\cdot \vec n = \frac2{\sqrt 3}$. Which is to say, for any $(x, y)$ in the unit disc $D$ in the plane, we get an area element of $T$ of $\sqrt 3\,dx\,dy$ and an integrand of $\frac2{\sqrt 3}$.
We integrate over this unit disc, and get
$$
\iint_T\vec F\cdot \vec n\,dS = \iint_D\vec F\cdot \vec n\cdot \sqrt3\,dx\,dy\\
= \iint_B2\,dx\,dy = 2\pi
$$
Summing up over the three parts we get $0+4\pi + 2\pi = 6\pi$.
