(mg_level_coarse + 1 == mg_level_fine),
ExcNotImplemented());
+ AssertDimension(constraints_fine.n_inhomogeneities(), 0);
+ AssertDimension(constraints_coarse.n_inhomogeneities(), 0);
+
transfer.dof_handler_fine = &dof_handler_fine;
transfer.mg_level_fine = mg_level_fine;
"(numbers::invalid_unsigned_int) or on refinement levels without "
"hanging nodes."));
+ AssertDimension(constraints_fine.n_inhomogeneities(), 0);
+ AssertDimension(constraints_coarse.n_inhomogeneities(), 0);
+
transfer.dof_handler_fine = &dof_handler_fine;
transfer.mg_level_fine = mg_level_fine;
dirichlet_indices.clear();
weights_on_refined.clear();
+#ifdef DEBUG
+ if (mg_constrained_dofs)
+ {
+ const unsigned int n_levels =
+ dof_handler.get_triangulation().n_global_levels();
+
+ for (unsigned int l = 0; l < n_levels; ++l)
+ {
+ const auto &constraints =
+ mg_constrained_dofs->get_user_constraint_matrix(l);
+
+ // no inhomogeneities are supported
+ AssertDimension(constraints.n_inhomogeneities(), 0);
+
+ for (const auto dof : constraints.get_local_lines())
+ {
+ const auto *entries_ptr =
+ constraints.get_constraint_entries(dof);
+
+ if (entries_ptr == nullptr)
+ continue;
+
+ // only homogeneous or identity constraints are supported
+ Assert((entries_ptr->size() == 0) ||
+ ((entries_ptr->size() == 1) &&
+ (std::abs((*entries_ptr)[0].second - 1.) <
+ 100 * std::numeric_limits<double>::epsilon())),
+ ExcNotImplemented());
+ }
+ }
+ }
+#endif
+
// we collect all child DoFs of a mother cell together. For faster
// tensorized operations, we align the degrees of freedom
// lexicographically. We distinguish FE_Q elements and FE_DGQ elements
tr.refine_global(1);
- FE_Q<dim> fe = FE_Q<dim>(1);
+ FE_Q<dim> fe(1);
DoFHandler<dim> mgdof(tr);
mgdof.distribute_dofs(fe);
if (user_constraints.can_store_line(face_dofs[i]))
{
user_constraints.constrain_dof_to_zero(face_dofs[i]);
- user_constraints.set_inhomogeneity(face_dofs[i], 5.0);
}
}
user_constraints.close();
deallog << "SRC Vector" << std::endl;
LinearAlgebra::distributed::Vector<double> src_level_0(mgdof.n_dofs(0));
+ src_level_0 = 1.0;
for (unsigned int i = 0; i < mgdof.n_dofs(0); ++i)
deallog << src_level_0(i) << ' ';
deallog << std::endl << std::endl;
DEAL::SRC Vector
-DEAL::0.00000 0.00000 0.00000 0.00000
+DEAL::1.00000 1.00000 1.00000 1.00000
DEAL::
DEAL::DST Vector
-DEAL::5.00000 2.50000 5.00000 2.50000 0.00000 0.00000 5.00000 2.50000 0.00000
+DEAL::0.00000 0.500000 0.00000 0.500000 1.00000 1.00000 0.00000 0.500000 1.00000
DEAL::
DEAL::SRC Vector
-DEAL::0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
+DEAL::1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000 1.00000
DEAL::
DEAL::DST Vector
-DEAL::5.00000 2.50000 5.00000 2.50000 5.00000 2.50000 5.00000 2.50000 0.00000 0.00000 0.00000 0.00000 5.00000 2.50000 5.00000 2.50000 0.00000 0.00000 5.00000 2.50000 5.00000 2.50000 0.00000 0.00000 5.00000 2.50000 0.00000
+DEAL::0.00000 0.500000 0.00000 0.500000 0.00000 0.500000 0.00000 0.500000 1.00000 1.00000 1.00000 1.00000 0.00000 0.500000 0.00000 0.500000 1.00000 1.00000 0.00000 0.500000 0.00000 0.500000 1.00000 1.00000 0.00000 0.500000 1.00000
DEAL::