The cross-term part is in the dof2 loop, it's similar to the 'pure' second derivatives but the calculation of Q_2i and Q_2j is a bit different. I've also changed some of the variable names to more clearly reflect what they store -- i and j now refer to the two basis functions being used, while 1 and 2 refer to the DoFs.
The cross-term part is in the dof2 loop, it's similar to the 'pure' second derivatives but the calculation of Q_2i and Q_2j is a bit different. I've also changed some of the variable names to more clearly reflect what they store -- i and j now refer to the two basis functions being used, while 1 and 2 refer to the DoFs.