I’m a bit confused by what you are asking. The entries in the residual vector corresponding to constrained dofs will converge to a non-zero number. Those corresponding to unconstrained dofs should converge to zero. As is stated in step-15
… we have to set to zero the elements of the residual vector for all entries that correspond to degrees of freedom that sit at the boundary. The reason is that because the value of the solution there is fixed, they are of course no "real" degrees of freedom and so, strictly speaking, we shouldn't have assembled entries in the residual vector for them. However, as we always do, we want to do exactly the same thing on every cell and so we didn't not want to deal with the question of whether a particular degree of freedom sits at the boundary in the integration above. Rather, we will simply set to zero these entries after the fact. To this end, we first need to determine which degrees of freedom do in fact belong to the boundary and then loop over all of those and set the residual entry to zero. This happens in the following lines which we have already seen used in step-11: I’m not sure if this actually your question, but based on the above and Timo’s response, I hope this helps A > On 5 Oct 2017, at 17:54, 'Maxi Miller' via deal.II User Group > <dealii@googlegroups.com> wrote: > > Compared to the target value? Depending on the values between ~1e-6 and 2e-3, > but it can be larger, too. > I will check the latter function and compare it to the current solution, but > I thought by using ZeroFunction as boundary condition that then all > boundary_dofs are set to zero. > > Am Donnerstag, 5. Oktober 2017 18:49:20 UTC+2 schrieb Timo Heister: > > Isn't the 'distribute'-line doing exactly that? Or is that a mistake? > > No, set_zero() will set the entries to zero, distribute() will set > them to their correct nonzero entry. > > Also, how small are the errors that you are getting when it levels off? > > -- > Timo Heister > http://www.math.clemson.edu/~heister/ <http://www.math.clemson.edu/~heister/> > > -- > The deal.II project is located at http://www.dealii.org/ > <http://www.dealii.org/> > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > <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 > <mailto:dealii+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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. For more options, visit https://groups.google.com/d/optout.