Hello You have specified boundary_indicator=1 when you call interpolate_boundary_values, but all boundaries are marked with indicator 0.
You did not specify colorize=True option when creating the mesh, so all boundaries are marked as 0. So your function is fine, you just never called it. best praveen > On 19-Nov-2023, at 6:31 AM, Javier Almonacid <[email protected]> > wrote: > > Hi everyone, > > I am trying to implement a Dirichlet boundary condition for a problem very > similar to step-44. The boundary condition is just a displacement in the +x > direction on the +x face of a cube. However, when I call > VectorTools::interpolate_boundary_values, it seems it's calling a default > (zero?) version of Function<dim>::value rather than > IncrementalDisplacement<dim>::value, which should override the default value > function. > > Any help on how to solve this issue would be appreciated. > > Attached is a minimal working example. In my opinion, if my overridden > function is being called, then the cout statement inside of it ("Overridden > value function called") should be displayed, right? > > Some things I've tried: > Removing the "override" keyword and see if deal.II would raise an exception. > The program runs entirely and nothing is displayed on the terminal. > Calling the function IncrementalDisplacement<dim>::value directly. This works > fine. > Overloading vector_value and vector_value_list. Same thing, these functions > are not being called either. > Stepping into the VectorTools::interpolate_boundary_values function using > gdb, but the output is the following: > (gdb) step > dealii::VectorTools::interpolate_boundary_values<3, 3, double> (dof=..., > boundary_component=1, boundary_function=..., constraints=..., > component_mask=...) > at > /home/javier/dealii-9.3/tmp/unpack/deal.II-v9.3.2/include/deal.II/numerics/vector_tools_boundary.templates.h:603 > 603 > /home/javier/dealii-9.3/tmp/unpack/deal.II-v9.3.2/include/deal.II/numerics/vector_tools_boundary.templates.h: > No such file or directory. > > Thanks! > Javier > > -- > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/b88e509a-8535-47f2-b49e-54ac8f1fa16bn%40googlegroups.com > > <https://groups.google.com/d/msgid/dealii/b88e509a-8535-47f2-b49e-54ac8f1fa16bn%40googlegroups.com?utm_medium=email&utm_source=footer>. > <test_bc.cc> -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/6302B5AA-66D4-45D8-BA8B-789B97D5C97F%40gmx.net.
