I am trying to assemble a rectangular matrix S with a property that K*U=S*A where A/U is the coefficient/solution pair in an elliptic PDE (think -div(a grad u) = f) and where K is the system matrix. S is a FullMatrix (no sparsity pattern) and it works fine on uniform meshes (correctness is checked by a norm of the difference K*U-S*A). I am not able to get a correct matrix on adaptively refined meshes and it has probably to do something with the constraints for U and A. I have this issue for a scalar (problem above) and a vector problem (linear elasticity). Something like this is used for the assembling step:
constraints_row.distribute_local_to_global(cell_matrix,
local_dof_indices_row,
constraints_col,
local_dof_indices_col,
S);
Can anyone give me a suggestion where the problem could be or where I should look in the documentation?