discretize.utils.volume_tetrahedron¶
-
discretize.utils.
volume_tetrahedron
(xyz, A, B, C, D)[source]¶ Returns the volume for tetrahedras volume specified by the indexes A to D.
- Parameters
xyz (numpy.ndarray) – X,Y,Z vertex vector
A,B,C,D (numpy.ndarray) – vert index of the tetrahedra
- Return type
- Returns
V, volume of the tetrahedra
Algorithm https://en.wikipedia.org/wiki/Tetrahedron#Volume
\[ \begin{align}\begin{aligned}V = {1 \over 3} A h\\V = {1 \over 6} | ( a - d ) \cdot ( ( b - d ) ( c - d ) ) |\end{aligned}\end{align} \]