Shape functions,
and evaluating these shape functions is part of every finite element calculation. For quadrilaterals, the shape functions for two commonly-used elements are:
If we look closely, we can see that these shape functions can be factored into products of simpler 1D interpolating polynomials in each direction:
Or, equivalently, the shape function associated with node
So, if we want to do a 2-dimensional interpolation, we can express it in terms of the composition of two 1-dimensional interpolations:
or in 3D,
If it is also the case that our quadrature points can also be written as cartesian products of some 1D quadrature rule (e.g.
it lets us calculate all the quadrature point values at the same time in an efficient way
in 2D, the naive algorithm of individually interpolating each quadrature point of a
in 3D, the naive algorithm of individually interpolating each quadrature point of a
we only need to store evaluations of
in 2D, there are
in 3D, there are
If we only need the 1D shape functions evaluated over the 1D quadrature points, we only have to store
Together, these two benefits make sum factorization a worthwhile optimization. However it is important to note that it is "fragile" and can only be used when all of the following requirements are met:
quadrilateral or hexahedral elements only
the basis functions for simplex elements are not compatible
the nodes in those elements must be arranged as cartesian products of some 1D nodes
not all formulations on quads/hexes are compatible (e.g. serendipity)
the quadrature points must be expressible as the cartesian product of a 1D quadrature points
many applications that use irregular quadrature rules (e.g. mortar methods, contact, cut cells) do not benefit
the polynomial order of the elements needs to be "big" to be worth it
sum factorization is technically still possible for low order elements, but it isn't faster in practice
the number of quadrature points needs to be "big" to be worth it
many applications use single-point quadrature or "under-integrate" certain terms, so they see no benefit