Skip to content

Commit

Permalink
Merge pull request #16757 from kronbichler/fix_test_gmres
Browse files Browse the repository at this point in the history
SolverGMRES: Fix a test case
  • Loading branch information
peterrum committed Mar 18, 2024
2 parents 4ca6ffc + 9839b1c commit b80d0be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions tests/petsc/deal_solver_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ main(int argc, char **argv)
f = 1.;
A.compress(VectorOperation::insert);

GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
SolverGMRES<PETScWrappers::MPI::Vector> solver(control, mem);
PreconditionIdentity preconditioner;
GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
SolverGMRES<PETScWrappers::MPI::Vector>::AdditionalData data(28);
SolverGMRES<PETScWrappers::MPI::Vector> solver(control, mem, data);
PreconditionIdentity preconditioner;
deallog << "Solver type: " << typeid(solver).name() << std::endl;
check_solver_within_range(solver.solve(A, u, f, preconditioner),
control.last_step(),
Expand Down
9 changes: 5 additions & 4 deletions tests/trilinos/deal_solver_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,16 @@ main(int argc, char **argv)
f.compress(VectorOperation::insert);
u.compress(VectorOperation::insert);

GrowingVectorMemory<TrilinosWrappers::MPI::Vector> mem;
SolverGMRES<TrilinosWrappers::MPI::Vector> solver(control, mem);
PreconditionIdentity preconditioner;
GrowingVectorMemory<TrilinosWrappers::MPI::Vector> mem;
SolverGMRES<TrilinosWrappers::MPI::Vector>::AdditionalData data(28);
SolverGMRES<TrilinosWrappers::MPI::Vector> solver(control, mem, data);
PreconditionIdentity preconditioner;

deallog << "Solver type: " << typeid(solver).name() << std::endl;

check_solver_within_range(solver.solve(A, u, f, preconditioner),
control.last_step(),
71,
74,
76);
}
}
2 changes: 1 addition & 1 deletion tests/trilinos/deal_solver_03.output
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

DEAL::Size 32 Unknowns 961
DEAL::Solver type: N6dealii11SolverGMRESINS_16TrilinosWrappers3MPI6VectorEEE
DEAL::Solver stopped within 71 - 76 iterations
DEAL::Solver stopped within 74 - 76 iterations

0 comments on commit b80d0be

Please sign in to comment.