From ad83973bbd73fb5bf922a797b8f6d4248b22b5c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 24 May 2023 14:55:53 -0600 Subject: [PATCH] Also check PETSc TS and SNES requirements on matrices. --- include/deal.II/lac/petsc_snes.h | 11 +++++++++-- include/deal.II/lac/petsc_ts.h | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/deal.II/lac/petsc_snes.h b/include/deal.II/lac/petsc_snes.h index 6167b0d9cd..1ef8c9cb77 100644 --- a/include/deal.II/lac/petsc_snes.h +++ b/include/deal.II/lac/petsc_snes.h @@ -238,8 +238,15 @@ namespace PETScWrappers template - DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type || - std::constructible_from)) + DEAL_II_CXX20_REQUIRES( + (concepts::is_dealii_petsc_vector_type || + std::constructible_from< + VectorType, + Vec>)&&(concepts::is_dealii_petsc_matrix_type || + std::constructible_from< + PMatrixType, + Mat>)&&(concepts::is_dealii_petsc_matrix_type || + std::constructible_from)) class NonlinearSolver { public: diff --git a/include/deal.II/lac/petsc_ts.h b/include/deal.II/lac/petsc_ts.h index 9a45ffc5be..60641ba51b 100644 --- a/include/deal.II/lac/petsc_ts.h +++ b/include/deal.II/lac/petsc_ts.h @@ -295,8 +295,15 @@ namespace PETScWrappers template - DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type || - std::constructible_from)) + DEAL_II_CXX20_REQUIRES( + (concepts::is_dealii_petsc_vector_type || + std::constructible_from< + VectorType, + Vec>)&&(concepts::is_dealii_petsc_matrix_type || + std::constructible_from< + PMatrixType, + Mat>)&&(concepts::is_dealii_petsc_matrix_type || + std::constructible_from)) class TimeStepper { public: -- 2.39.5