Hi All,

I was working through example step 16 and I think I found a mistake.

In
LaplaceProblem<dim>::setup_system()

We have the following

std::set<types::boundary_id>          dirichlet_boundary_ids;
Functions::ZeroFunction<dim> 
<https://www.dealii.org/9.0.0/doxygen/deal.II/classFunctions_1_1ZeroFunction.html>
 
         homogeneous_dirichlet_bc;
const typename FunctionMap<dim>::type 
<https://www.dealii.org/9.0.0/doxygen/deal.II/structFunctionMap.html#a6bb95bc991dd3337330f1c725f59b008>
 
dirichlet_boundary_functions
= { { types::boundary_id 
<https://www.dealii.org/9.0.0/doxygen/deal.II/namespacetypes.html#aaf4eb6ec214fa642dfd956f11a9cd2d7>
(0), &homogeneous_dirichlet_bc } };
VectorTools::interpolate_boundary_values 
<https://www.dealii.org/9.0.0/doxygen/deal.II/namespaceVectorTools.html#a9f3e3ae1396811f998cc35f94cbaa926>
 
(static_cast<const DoFHandler<dim> 
<https://www.dealii.org/9.0.0/doxygen/deal.II/classDoFHandler.html>&>(
dof_handler),
                                           dirichlet_boundary_functions,
                                           constraints);
// ...
mg_constrained_dofs.clear();
mg_constrained_dofs.initialize(dof_handler);
mg_constrained_dofs.make_zero_boundary_constraints(dof_handler, 
dirichlet_boundary_ids);


The problem I see is that dirichlet_boundary_ids is never initialized with 
anything, and can be checked that before this last line it has size 0.
If this was meant to be empty, then the tutorial is misleading when it says 

"The multigrid constraints have to be initialized. They need to know about 
> the boundary values as well, so we pass the dirichlet_boundary here as 
> well."


I believe it should have something like

std::set<types::boundary_id> dirichlet_boundary_ids;
dirichlet_boundary_ids.insert(types::boundary_id(0));
//...


Is this correct, or is it supposed to be empty and simply need a 
placeholder?

-Kyle Williams

-- 
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.

Reply via email to