]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Also allow vector types that are can just wrap Vec objects.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 23 Apr 2023 21:59:26 +0000 (15:59 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 23 Apr 2023 22:21:23 +0000 (16:21 -0600)
include/deal.II/lac/petsc_snes.h
include/deal.II/lac/petsc_ts.h

index 11c6db51e5a05772acd52ed80e162a2dd81d5e95..f69e2a2f36627c7acfcea118a177cca24db6e16d 100644 (file)
 
 #  include <petscsnes.h>
 
+#  if defined(DEAL_II_HAVE_CXX20)
+#    include <concepts>
+#  endif
+
+
 DEAL_II_NAMESPACE_OPEN
 
 namespace PETScWrappers
@@ -224,7 +229,8 @@ 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>)
+  DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
+                          std::constructible_from<VectorType, Vec>))
   class NonlinearSolver
   {
   public:
index 64e9cb235f77338d8e035426ac4cab9e6959d16d..af2019058d7c588cd4438fbe9e9fd97444649e9b 100644 (file)
 
 #  include <petscts.h>
 
+#  if defined(DEAL_II_HAVE_CXX20)
+#    include <concepts>
+#  endif
+
 DEAL_II_NAMESPACE_OPEN
 
 namespace PETScWrappers
@@ -289,7 +293,8 @@ 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>)
+  DEAL_II_CXX20_REQUIRES((concepts::is_dealii_petsc_vector_type<VectorType> ||
+                          std::constructible_from<VectorType, Vec>))
   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.