for (const types::global_dof_index dof_index :
mg_constrained_dofs.get_refinement_edge_indices(level))
- boundary_constraints[level].add_constraint(dof_index, {}, 0.);
+ 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].add_constraint(dof_index, {}, 0.);
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
DoFTools::extract_locally_relevant_level_dofs(dof_handler, level));
for (const types::global_dof_index dof_index :
mg_constrained_dofs.get_boundary_indices(level))
- level_constraints.add_constraint(dof_index, {}, 0.);
+ level_constraints.constrain_dof_to_zero(dof_index);
level_constraints.close();
typename MatrixFree<dim, float>::AdditionalData additional_data;
cell->face(f)->get_dof_indices (local_face_dof_indices, 0);
for (unsigned int i=0; i<local_face_dof_indices.size(); ++i)
if (stokes_fe.face_system_to_component_index(i).first < dim)
- constraints.add_constraint (local_face_dof_indices[i], {}, 0.);
+ constraints.constrain_dof_to_zero (local_face_dof_indices[i]);
}
}
@endcode
-The last line calls
-AffineConstraints::add_constraint() and adds the constraint
+The last line adds the constraint
<i>x<sub>local_face_dof_indices[i]</sub>=0</i>, which is exactly
what we need in the current context. The call to
FiniteElement::face_system_to_component_index() makes sure that we only set
++i)
if (stokes_fe.face_system_to_component_index(i).first <
dim)
- constraints.add_constraint(local_face_dof_indices[i],
- {},
- 0.);
+ constraints.constrain_dof_to_zero(
+ local_face_dof_indices[i]);
}
}
}
level));
for (const types::global_dof_index dof_index :
mg_constrained_dofs.get_boundary_indices(level))
- level_constraints.add_constraint(dof_index, {}, 0.);
+ level_constraints.constrain_dof_to_zero(dof_index);
level_constraints.close();
typename MatrixFree<dim, float>::AdditionalData additional_data;
for (const types::global_dof_index dof_index :
mg_constrained_dofs.get_refinement_edge_indices(level))
- boundary_constraints[level].add_constraint(dof_index, {}, 0.);
+ 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].add_constraint(dof_index, {}, 0.);
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
// this here by marking the first pressure dof, which has index n_u as a
// constrained dof.
if (solver_type == SolverType::UMFPACK)
- constraints.add_constraint(n_u, {}, 0.);
+ constraints.constrain_dof_to_zero(n_u);
constraints.close();
}
{
for (const types::global_dof_index dof_index :
mg_constrained_dofs.get_refinement_edge_indices(level))
- boundary_constraints[level].add_constraint(dof_index, {}, 0.);
+ 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].add_constraint(dof_index, {}, 0.);
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
const IndexSet idx =
for (const types::global_dof_index dof_index :
mg_constrained_dofs.get_refinement_edge_indices(level))
- boundary_constraints[level].add_constraint(dof_index, {}, 0.);
+ 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].add_constraint(dof_index, {}, 0.);
+ boundary_constraints[level].constrain_dof_to_zero(dof_index);
boundary_constraints[level].close();
}
for (const types::global_dof_index dof_index :
mg_constrained_dofs.get_boundary_indices(level))
- level_constraints.add_constraint(dof_index, {}, 0.);
+ level_constraints.constrain_dof_to_zero(dof_index);
level_constraints.close();
typename MatrixFree<dim, float>::AdditionalData additional_data;
// merge constraints
if (add_boundary_indices && this->have_boundary_indices())
for (const auto i : this->get_boundary_indices(level))
- constraints.add_constraint(i, {}, 0.);
+ constraints.constrain_dof_to_zero(i);
if (add_refinement_edge_indices)
for (const auto i : this->get_refinement_edge_indices(level))
- constraints.add_constraint(i, {}, 0.);
+ constraints.constrain_dof_to_zero(i);
if (add_level_constraints)
constraints.merge(this->get_level_constraints(level),
if (constraints_are_cyclic)
{
if (std::abs(cycle_constraint_factor - number(1.)) > eps)
- affine_constraints.add_constraint(dof_left, {}, 0.);
+ affine_constraints.constrain_dof_to_zero(dof_left);
}
else
{
// inhomogeneity is zero:
if (zero_boundary_constraints.is_constrained(
face_dof) == false)
- zero_boundary_constraints.add_constraint(face_dof,
- {},
- 0.);
+ zero_boundary_constraints.constrain_dof_to_zero(
+ face_dof);
else
Assert(zero_boundary_constraints
.is_inhomogeneously_constrained(