## 2 Methods
### Finite Element Method Interpolation
\(\mathbf{F}\left(\mathbf{x},t\right)\), can be defined inside each linear tetrahedron \(K\) as  
\[\mathbf{F}\left(\mathbf{x},t\right)=\eta_{1}\left(\mathbf{x}\right)\mathbf{F}_{1}\left(t\right) +\eta_{2}\left(\mathbf{x}\right)\mathbf{F}_{2}\left(t\right)+\eta_{3}\left(\mathbf{x} \right)\mathbf{F}_{3}\left(t\right)+\eta_{4}\left(\mathbf{x}\right)\mathbf{F}_{4}\left(t \right)=\sum_{j=1}^{4}\eta_{j}\left(\mathbf{x}\right)\mathbf{F}_{j}\left(t\right), \quad\mathbf{x}\in K, \tag{2}\]  
by denoting \(\mathbf{F}_{i}\left(t\right)=\mathbf{F}\left(\mathbf{x}_{i},t\right)\), for \(i=1,2,3,4\), nodes of the tetrahedron. The way the tetrahedral coordinates \(\eta_{i}\), \(i=1,2,3,4\), are defined is by means of the previous interpolating relation together with the summation constraint. That is, when one aims to define the tetrahedron geometry and calculate any position inside the tetrahedron \(\mathbf{x}=\left[x_{1}\quad x_{2}\quad x_{3}\right]^{\top}\), we compute  
\[ \begin{bmatrix}1\\ x_{1}\\ x_{2}\\ x_{3}\end{bmatrix} = \begin{bmatrix}1&1&1&1\\ x_{1,1}&x_{2,1}&x_{3,1}&x_{4,1}\\ x_{1,2}&x_{2,2}&x_{3,2}&x_{4,2}\\ x_{1,3}&x_{2,3}&x_{3,3}&x_{4,3}\end{bmatrix}\begin{bmatrix}\eta_{1}\left(\bm {x}\right)\\ \eta_{2}\left(\mathbf{x}\right)\\ \eta_{3}\left(\mathbf{x}\right)\\ \eta_{4}\left(\mathbf{x}\right)\end{bmatrix} \quad\therefore\quad \begin{bmatrix}\eta _{1}\left(\mathbf{x}\right)\\ \eta_{2}\left(\mathbf{x}\right)\\ \eta_{3}\left(\mathbf{x}\right)\\ \eta_{4}\left(\mathbf{x}\right)\end{bmatrix} =\frac{1}{6\upsilon} \begin{bmatrix}6 \upsilon&a_{1}&b_{1}&c_{1}\\ 6\upsilon&a_{2}&b_{2}&c_{2}\\ 6\upsilon&a_{3}&b_{3}&c_{3}\\ 6\upsilon&a_{4}&b_{1}&c_{4}\end{bmatrix}\begin{bmatrix}1\\ x_{1}\\ x_{2}\\ x_{3}\end{bmatrix}  \tag{3}\]  
in order to obtain the tetrahedral coordinates system where the coefficients of the inverted matrix are given by  
\[a_{1}=x_{2,2}x_{43,3}-x_{3,2}x_{42,3}+x_{4,2}x_{32,3}, b_{1}=-x_{2,1}x_{43,3}+x_{3,1}x_{42,3}-x_{4,1}x_{32,3}, c_{1}=x_{2,1}x_{43,2}-x_{3,1}x_{42,2}+x_{4,1}x_{32,2},\] \[a_{2}=-x_{1,2}x_{43,3}+x_{3,2}x_{41,3}-x_{4,2}x_{31,3}, b_{2}=x_{1,1}x_{43,3}-x_{31,1}x_{41,3}+x_{4,1}x_{31,3}, c_{1}=-x_{1,1}x_{43,2}+x_{3,1}x_{41,2}-x_{4,1}x_{31,2},\] \[a_{3}=x_{1,2}x_{42,3}-x_{2,2}x_{41,3}+x_{4,2}x_{21,3}, b_{3}=-x_{1,1}x_{42,3}+x_{2,1}x_{41,3}-x_{4,1}x_{21,3}, c_{3}=x_{1,1}x_{42,2}-x_{1,1}x_{41,2}+x_{4,1}x_{21,2},\] \[a_{4}=-x_{1,2}x_{32,3}+x_{2,2}x_{31,3}-x_{3,2}x_{21,3}, b_{4}=x_{1,1}x_{32,3}-x_{2,1}x_{31,3}+x_{3,1}x_{21,3}, c_{4}=-x_{1,1}x_{32,2}+x_{2,1}x_{31,2}-x_{3,1}x_{21,2}.\]  
Here, the abbreviation \(\mathbf{x}_{ij}=\mathbf{x}_{i}-\mathbf{x}_{j}\) is used, and the volume \(\upsilon\) can be calculated with the expression  
\[6\upsilon= x_{21,1}\left(x_{31,2}x_{41,3}-x_{41,2}x_{31,3}\right)+x_{21,2}\left( x_{41,1}x_{31,3}-x_{31,1}x_{41,3}\right)+x_{21,3}\left(x_{31,1}x_{41,2}-x_{41,1}x_{31,2} \right).\]  
At this point, it is possible to calculate the spatial derivatives of any interpolated function \(\frac{\partial}{\partial\mathbf{x}}\mathbf{F}\left(\mathbf{x},t\right)\) in terms of the tetrahedral coordinates as  
\[\frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\mathbf{x}}= \begin{bmatrix} \frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\mathbf{x}_{1}}\\ \frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\mathbf{x}_{2}}\\ \frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\mathbf{x}_{3}}\end{bmatrix} = \sum_{j=1}^{4} \begin{bmatrix}\frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{ \partial\eta_{j}}\frac{\partial\eta_{j}}{\partial\mathbf{x}_{2}}\\ \frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\eta_{j}}\frac{\partial\eta_{j }}{\partial\mathbf{x}_{3}}\end{bmatrix} =\sum_{j=1}^{4} \begin{bmatrix}\frac{1}{6 \upsilon}\frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\eta_{j}}a_{j}\\ \frac{1}{6\upsilon}\frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\eta_{j}}b_{j }\\ \frac{1}{6\upsilon}\frac{\partial\mathbf{F}\left(\mathbf{x},t\right)}{\partial\eta_{j}}c_{j} \end{bmatrix}