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);* Anton. On Tuesday, March 16, 2021 at 3:22:54 AM UTC-7 Wolfgang Bangerth wrote: > On 3/16/21 6:12 AM, Anton Ermakov wrote: > > > > I attach the minimally changed Step-26 code to illustrate the problem. > It is > > different from the original step-26 in three important places: > > > > 1) in the run function, the mesh is refined in a corner > > 2) in the setup_system the mass and Laplace matrices are manually > created. > > 3) Initial temperature field is set to 100 K and the boundary condition > is > > temperature fixed at 50 K. No source term. > > I don't immediately see a problem. What happens if you use your matrices > with > the exact set up of step-26? Simplify your problem: Make one change at a > time, > not three. > > If you do get different results, compare the matrix you compute with the > one > computed by the MatrixTools functions. How are they different? And why? > > Best > W. > > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: bang...@colostate.edu > www: http://www.math.colostate.edu/~bangerth/ > > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/665c688f-fca3-4c21-b56b-7193a09cdb47n%40googlegroups.com.