How to obtain the element-wise stiffness matrix?

As the first part of the question is a duplicate of:

I’ll just supply you with a reference on how to compute the midpoint of all cells local to a process:

1 Like