From f836d8d74ca877d14ae41212ae0680e08da72c54 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 26 Mar 2025 16:38:29 -0500 Subject: [PATCH] SolverGMRES: add requires() clauses --- include/deal.II/lac/solver_gmres.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/include/deal.II/lac/solver_gmres.h b/include/deal.II/lac/solver_gmres.h index 5efac2498d..0366ee8e39 100644 --- a/include/deal.II/lac/solver_gmres.h +++ b/include/deal.II/lac/solver_gmres.h @@ -697,11 +697,13 @@ public: * Solve the linear system $Ax=b$ for x. */ template - void - solve(const MatrixType &A, - VectorType &x, - const VectorType &b, - const PreconditionerTypes &...preconditioners); + DEAL_II_CXX20_REQUIRES( + (concepts::is_linear_operator_on && + (concepts::is_linear_operator_on && ...))) + void solve(const MatrixType &A, + VectorType &x, + const VectorType &b, + const PreconditionerTypes &...preconditioners); protected: /** @@ -2052,12 +2054,16 @@ SolverMPGMRES::SolverMPGMRES(SolverControl &cn, template +DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector) template -void -SolverMPGMRES::solve(const MatrixType &A, - VectorType &x, - const VectorType &b, - const PreconditionerTypes &...preconditioners) +DEAL_II_CXX20_REQUIRES( + (concepts::is_linear_operator_on && + (concepts::is_linear_operator_on && ...))) +void SolverMPGMRES::solve( + const MatrixType &A, + VectorType &x, + const VectorType &b, + const PreconditionerTypes &...preconditioners) { LogStream::Prefix prefix("MPGMRES"); SolverMPGMRES::solve_internal(A, x, b, preconditioners...); @@ -2066,6 +2072,7 @@ SolverMPGMRES::solve(const MatrixType &A, template +DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector) template void SolverMPGMRES::solve_internal( -- 2.39.5