[Math] Gauss quadrature on tetrahedron

MATLABnumerical methods

I have the Weights

${\bf w}=[w_1\,w_2\, w_3\, w_4]=[0.25, 0.25, 0.25, 0.25]/6$

and the points

${\bf x_1}=[0.1381966011250105 , 0.1381966011250105 , 0.1381966011250105]$
${\bf x_2}=[0.5854101966249685 , 0.1381966011250105 , 0.1381966011250105]$
${\bf x_3}=[0.1381966011250105 , 0.5854101966249685 , 0.1381966011250105]$
${\bf x_4}=[0.1381966011250105 , 0.1381966011250105 , 0.5854101966249685]$

corresponding to Gaussian quadrature of the tetrahedron $K\subset\mathbb{R}^3$ with vertex:

${\bf v_1}=[0,0,0]$
${\bf v_2}=[1,0,0]$
${\bf v_3}=[0,1,0]$
${\bf v_4}=[0,0,1]$

Using this: How can I find the weights ans point of any tetrahedron?

Best Answer

You will simply have to find an affine mapping $A$ from the reference tetrahedron $K$ to your arbitrary tetrahedron $T$. If $T$ is given as the convex hull $T = \textrm{conv}\{n_i : 1\leq i \leq 4\}$ of your nodes $n_i$, one mapping could look like this:

$e_1 \mapsto n_1$, $e_2 \mapsto n_2$, $e_3 \mapsto n_3$ and $\textbf{0} \mapsto n_4$.

Or in closed form: $$\mathbf{x}_{T,i} = A(\mathbf{x}_i),$$ with $A:x \mapsto Mx + n_4,$ and matrix $M:=(\begin{matrix} n_1-n_4,\,n_2-n_4,\,n_3-n_4\end{matrix})$. The quadrature weights will need to be scaled by the volume of the tetrahedron ($\textrm{det}(M)$/6) divided by the volume of your current tetrahedron (1/6), which equals $$\mathbf{w}_T = \textrm{det}(M)\mathbf{w}.$$

The resulting quadrature rule will usually be different depending on your choice of the ordering of nodes $n_i$.