 # Nt1310 Unit 1 Algorithm Report

Decent Essays
Exploiting the tensor product structure of hexahedral elements expresses the volume operations as 1D operators. The details are presented in algorithm \ref{alg_hexvol}.
\begin{algorithm}[h]
\caption{Hexahedron volume kernel}
\label{alg_hexvol}
\KwIn{nodal value of solution $\mathbf{u} = \left(p, \mathbf{v} \right)$, volume geometric factors $\partial (rst)/ \partial (xyz)$, 1D derivative operator $D_{ij} = \partial \hat{l}_j /\partial x_i$, model parameters $\rho, c$}
\KwOut{volume contributions stored in array $\mathbf{r}$}
\For{each element $e$}
{
\For{each volume node $x_{ijk}$} { Compute derivatives with respect to $r,s,t$ $$\frac{\partial \mathbf{u}}{\partial r} = \sum_{m=1}^{N+1}D_{im} \mathbf{u}_{mjk} \qquad \frac{\partial \mathbf{u}}{\partial s} = \sum_{m=1}^{N+1}D_{jm} \mathbf{u}_{imk} \qquad \frac{\partial \mathbf{u}}{\partial s} = \sum_{m=1}^{N+1}D_{km} \mathbf{u}_{ijm}$$ Apply chain rule to compute $\partial \mathbf{u}/\partial x, \partial \mathbf{u}/\partial y, \partial \mathbf{u}/\partial z$ \frac{\partial \mathbf{u}}{\partial x} = \frac{\partial \mathbf{u}}{\partial r} \frac{\partial r}{\partial x} + \frac{\partial \mathbf{u}}{\partial s} \frac{\partial s}{\partial x} + \frac{\partial \mathbf{u}}{\partial t}