From: Matthias Maier Date: Wed, 26 Mar 2025 21:38:29 +0000 (-0500) Subject: SolverGMRES: add requires() clauses X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f836d8d74ca877d14ae41212ae0680e08da72c54;p=dealii.git SolverGMRES: add requires() clauses --- 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(