triangulation.n_levels());
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
- boundary_constraints[level].close();
-
- IndexSet idx =
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+
+ const IndexSet idx =
mg_constrained_dofs.get_refinement_edge_indices(level) &
mg_constrained_dofs.get_boundary_indices(level);
- boundary_interface_constraints[level].add_lines(idx);
+ for (const types::global_dof_index idx :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(idx);
boundary_interface_constraints[level].close();
}
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
for (unsigned int level = min_level; level < triangulation.n_levels();
++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < n_levels; ++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
DynamicSparsityPattern csp;
const IndexSet dofset =
DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
boundary_constraints[level].reinit(dofset);
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
const IndexSet dofset =
DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
boundary_constraints[level].reinit(dofset);
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
const IndexSet dofset =
DoFTools::extract_locally_relevant_level_dofs(mg_dof_handler, level);
boundary_constraints[level].reinit(dofset);
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
-
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
AffineConstraints<double> empty_constraints;
for (unsigned int level = 0; level < triangulation.n_levels(); ++level)
{
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_refinement_edge_indices(level));
- boundary_constraints[level].add_lines(
- mg_constrained_dofs.get_boundary_indices(level));
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_refinement_edge_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
+ for (const types::global_dof_index dof_index :
+ mg_constrained_dofs.get_boundary_indices(level))
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}