Assembly of single row in local stiffness matrix
For stencil operators, we only require assembling a particular row of the local stiffness matrix.
Currently, this is partially supported by the Fenics Forms via the functions integrate(const std::array< Point3D, 3 >& coords, Point3D& out)
and correspondingly for 3D. For P2 Elements, the corresponding versions for edge-to-edge, vertex-to-edge and edge-to-vertex dof are provided.
However, under the hood, these functions still assemble the entire local stiffness matrix and only return the required entries!
Since the new generated Forms don't provide this functionality yet, I suggest going a different way here:
It would be reasonable to have a function e.g. integrateRow(uint_t row, const std::array< Point3D, N >& coords, PointND<M>& out)
which only computes the required entries. So the signature would be the same, regardless of space dimension or type of local dof. The only difference here would be a different N
and M
.