I have two different codes to solve the same problem but one works with 
VectorTools::interpolate_boundary_values whereas the other doesn't and I'm 
trying to figure out if I've done something wrong or there's a bug in the 
library. In both codes, I have an FESystem made up of two smaller FESystems:

fe_trial_interior (FE_DGQ<dim>(degree), 1, FE_DGQ<dim>(degree), dim),
fe_trial_trace (FE_TraceQ<dim>(degree + 1), 1, FE_FaceQ<dim>(degree), 1),
fe_trial (fe_trial_interior, 1, fe_trial_trace, 1)

In one code, I apply the non-zero dirichlet boundary conditions to the 
trace variables directly via

const FEValuesExtractors::Scalar dirichlet_index (0); const ComponentMask 
dirichlet_comp_mask = fe_trial_trace.component_mask (dirichlet_index);
const FEValuesExtractors::Scalar robin_index (1); const ComponentMask 
robin_comp_mask = fe_trial_trace.component_mask (robin_index);

trace_constraints.clear ();
VectorTools::interpolate_boundary_values (dof_handler_trial_trace, 0, 
DirichletBoundaryValues<dim>(), trace_constraints, dirichlet_comp_mask); // 
Dirichlet boundary constraints.
VectorTools::interpolate_boundary_values (dof_handler_trial_trace, 1, 
RobinBoundaryValues<dim>(), trace_constraints, robin_comp_mask); // Robin 
boundary constraints.
DoFTools::make_hanging_node_constraints (dof_handler_trial_trace, 
trace_constraints); // Hanging node constraints.
trace_constraints.close ();

which works perfectly (error confirmed to go to zero for this code). In the 
second code, I'm trying to apply the same non-zero boundary conditions but 
to the full system via

const FEValuesExtractors::Scalar dirichlet_index (dim + 1); const 
ComponentMask dirichlet_comp_mask = fe_trial.component_mask 
(dirichlet_index);
const FEValuesExtractors::Scalar robin_index (dim + 2); const ComponentMask 
robin_comp_mask = fe_trial.component_mask (robin_index);

constraints.clear ();
VectorTools::interpolate_boundary_values (dof_handler_trial, 0, 
DirichletBoundaryValues<dim>(), constraints, dirichlet_comp_mask); // 
Dirichlet boundary constraints.
VectorTools::interpolate_boundary_values (dof_handler_trial, 1, 
RobinBoundaryValues<dim>(), constraints, robin_comp_mask); // Robin 
boundary constraints.
DoFTools::make_hanging_node_constraints (dof_handler_trial, constraints); 
// Hanging node constraints.
constraints.close ();

and this is giving me issues. In particular, 
VectorTools::interpolate_boundary_values does seem to be constraining the 
correct nodes but it is not correctly setting the inhomogeneity (thus it is 
setting them to zero). Would welcome any thoughts as to if I'm doing 
anything wrong here or if it's a bug.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/90ea554b-2f5a-4452-9c34-93a2b7c03694n%40googlegroups.com.

Reply via email to