Dear Prof. Bangerth: Thank you very much for your quick reply!
When I apply hanging node constraints to my matrix, as the step-6 says: https://www.dealii.org/developer/doxygen/deal.II/step_6.html I make 4 steps: 1.Create a Constraints Class: ConstraintMatrix constraints; 2.Fill this object using the function DoFTools::make_hanging_node_constraints() to ensure continuity of the elements of the finite element space. DoFTools::make_hanging_node_constraints (dof_handler, constraints); 3.Copy the local contributions to the matrix and right hand side into the global objects: constraints.distribute_local_to_global (cell_matrix, cell_rhs, local_dof_indices, system_matrix, system_rhs); constraints.distribute_local_to_global (cell_volume_matrix, local_dof_indices, volume_matrix); constraints.distribute_local_to_global (cell_gradient_matrix, local_dof_indices, gradient_matrix); 4.Make sure that the degrees of "freedom" located on hanging nodes get their correct (constrained) value: constraints.distribute (solution); So I don't know which step I use incorrectly? And the version of deal.ii I use is 8.5.1, which doesn't have the updated class AffineConstraints <number>, but have Constraint_matrix Class. I don't know if this is the key point. Need I update my deal.ii? Thank you very much! Best, Chucui 在 2019年2月11日星期一 UTC+8下午1:40:07,Wolfgang Bangerth写道: > > On 2/10/19 8:20 PM, [email protected] <javascript:> wrote: > > > > And the results without adaptive mesh seem like approximate the exact > results > > correctly. So I am confused why the results of "grad u square" with > adaptive > > mesh are so strange? > > I suspect that you forget to apply hanging node constraints to your > matrix, or > apply them incorrectly -- which is exactly why I asked you to try globally > refined meshes: they don't have hanging node constraints :-) > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: [email protected] > <javascript:> > 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
