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