Martin, Could you add this explanation to the documentation and/or to a tutorial. I think mentioning it step-37 would be great.
Best, Bruno On Friday, October 27, 2017 at 3:57:09 AM UTC-4, Martin Kronbichler wrote: > > Dear Michal, > > This is expected: the matrix-free operator evaluation cannot apply > non-homogeneous boundary conditions while solving (at least I have never > figured out how to do that). To solve such a problem, you need to bring the > non-homogeneous part on the right hand side first. I often solve this by > first creating a vector that is filled with the Dirichlet values and apply > the operator on that (without setting the zero constraints) and then solve > for an increment that has zero boundary conditions. I attach an example > which is an extension of step-37 (and uses coefficients described here, if > you want some more background: > http://www.it.uu.se/research/publications/reports/2017-006/2017-006-nc.pdf > > In the program, you will find that LaplaceOperator not only contains a > vmult() function, but also a compute_residual() function that reads the > data in from an FEEvaluation object without Dirichlet conditions, due the > operation, and assembles the right hand side into an FEEvaluation object > with Dirichlet conditions (-> local_compute_residual()). > > Please let me know in case you have questions. > > Best, > Martin > On 26.10.2017 22:07, Michał Wichrowski wrote: > > Dear deal.II developers, > I think I found problem with non-homogeneus boundary conditions. > By changing: > VectorTools::interpolate_boundary_values (dof_handler, > 0, > Functions::ZeroFunction<dim>(), > constraints); > to > VectorTools::interpolate_boundary_values (dof_handler, > 0, > Functions::ConstantFunction<dim>(5), > constraints); > > > The results shown on included picture were outputted. I've tried to figure > out what is going on, and it looks like matrix-free framework is solving > problem with homogeneous constrains and then Dirichlet nodes are > overwritten. > -- > 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. > > > -- 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.