On 3/17/21 10:41 PM, Anton Ermakov wrote:
> Thanks for the reply. I think I got it. Basically, I had to manually place the
> local matrices into the global matrix, without taking into account the hanging
> node constraints, which are later taken care of by
>
> /constraints.condense(system_matrix, system_rhs);/
>
> In the case of the mass matrix, I had to use this:
>
> /for (unsigned int i = 0; i < dofs_per_cell; ++i)/
>
> /for (unsigned int j = 0; j < dofs_per_cell; ++j)/
>
> /mass_matrix.add(local_dof_indices[i], local_dof_indices[j], cell_matrix(i, j));/
>
> Instead of
>
> /constraints.distribute_local_to_global(cell_matrix, local_dof_indices,
> mass_matrix);/
Ah yes, that makes sense. So do I understand right that whatever you have now
actually works?