]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also check PETSc TS and SNES requirements on matrices.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 24 May 2023 20:55:53 +0000 (14:55 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 24 May 2023 20:55:53 +0000 (14:55 -0600)
include/deal.II/lac/petsc_snes.h
include/deal.II/lac/petsc_ts.h

index 6167b0d9cdc782959b6ae48158a4ac86cdc17680..1ef8c9cb773fe358cb17991f0ae6641a47221454 100644 (file)
@@ -238,8 +238,15 @@ namespace PETScWrappers
   template <typename VectorType  = PETScWrappers::VectorBase,
             typename PMatrixType = PETScWrappers::MatrixBase,
             typename AMatrixType = PMatrixType>
-  DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
-                          std::constructible_from<VectorType, Vec>))
+  DEAL_II_CXX20_REQUIRES(
+    (concepts::is_dealii_petsc_vector_type<VectorType> ||
+     std::constructible_from<
+       VectorType,
+       Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+               std::constructible_from<
+                 PMatrixType,
+                 Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+                         std::constructible_from<AMatrixType, Mat>))
   class NonlinearSolver
   {
   public:
index 9a45ffc5bea9a39413d5767e97641cefbf58264d..60641ba51bbe775ced7c823b9c3fcd76f8aec79e 100644 (file)
@@ -295,8 +295,15 @@ namespace PETScWrappers
   template <typename VectorType  = PETScWrappers::VectorBase,
             typename PMatrixType = PETScWrappers::MatrixBase,
             typename AMatrixType = PMatrixType>
-  DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
-                          std::constructible_from<VectorType, Vec>))
+  DEAL_II_CXX20_REQUIRES(
+    (concepts::is_dealii_petsc_vector_type<VectorType> ||
+     std::constructible_from<
+       VectorType,
+       Vec>)&&(concepts::is_dealii_petsc_matrix_type<PMatrixType> ||
+               std::constructible_from<
+                 PMatrixType,
+                 Mat>)&&(concepts::is_dealii_petsc_matrix_type<AMatrixType> ||
+                         std::constructible_from<AMatrixType, Mat>))
   class TimeStepper
   {
   public:

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.