I am referring to the this wiki page, which states that the way to find the volume of a Polyhedron can be done via Divergence Theorem:
$\int \nabla \cdot \vec{F} dV=\oint \vec{F} \cdot \hat{n} dS$
By choosing
$ \vec{F}=\frac{\vec{x}}{3}$
One can then obtain the volume formula for a polyhedron with $k$ faces:
$V = \frac{\sum_{i=1}^k \vec{x_{i}} \cdot \hat{n_i} A_i}{3}$
where $\vec{x_{i}}$,$\hat{n_i}$ and $A_i$ are a point, normal vector and the area of the face $i$. (The wiki page doesn't say $x_i$ is the centroid; it just says that it can be any point on the face, but I believe that it must be centroid, or else the volume obtained not correct, The $x_i$ can be any point; see comments)
My question is, is my formula and interpretation correct? And does it hold for all kinds of polyhedron, be it convex or concave?