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