Skip to content

Commit

Permalink
Merge pull request #14585 from tjhei/fix_deprecated_usage_in_tests
Browse files Browse the repository at this point in the history
Fix deprecated usage in tests
  • Loading branch information
drwells committed Dec 19, 2022
2 parents cd9a70f + bf4961f commit c72dee4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
12 changes: 4 additions & 8 deletions tests/quick_tests/step.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,15 @@ LaplaceProblem<dim>::setup_system()
solution.reinit(dof_handler.n_dofs());
system_rhs.reinit(dof_handler.n_dofs());

std::vector<bool> boundary_dofs(dof_handler.n_dofs(), false);
DoFTools::extract_boundary_dofs(dof_handler,
std::vector<bool>(1, true),
boundary_dofs);
IndexSet boundary_dofs =
DoFTools::extract_boundary_dofs(dof_handler, std::vector<bool>(1, true));

const unsigned int first_boundary_dof =
std::distance(boundary_dofs.begin(),
std::find(boundary_dofs.begin(), boundary_dofs.end(), true));
const types::global_dof_index first_boundary_dof = *boundary_dofs.begin();

mean_value_constraints.clear();
mean_value_constraints.add_line(first_boundary_dof);
for (unsigned int i = first_boundary_dof + 1; i < dof_handler.n_dofs(); ++i)
if (boundary_dofs[i] == true)
if (boundary_dofs.is_element(i))
mean_value_constraints.add_entry(first_boundary_dof, i, -1);
mean_value_constraints.close();

Expand Down
6 changes: 3 additions & 3 deletions tests/quick_tests/sundials-ida.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ class HarmonicOscillator
return 0;
};

time_stepper.solve_jacobian_system = [&](const VectorType &src,
VectorType & dst) -> int {
Jinv.vmult(dst, src);
time_stepper.solve_with_jacobian =
[&](const VectorType &rhs, VectorType &dst, const double /*tol*/) -> int {
Jinv.vmult(dst, rhs);
return 0;
};

Expand Down

0 comments on commit c72dee4

Please sign in to comment.