By construction, the gradients of basis functions are constants on each element
So, we denote,
by
the
array defined,
by
On tetrahedra
we set
Then, we have
With these formulas, we obtain the vectorized algorithm given in Algorithm 26.
Algorithm 26