]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Manually fix up some std::is_same<...> places. 15748/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 15 Jul 2023 04:12:48 +0000 (22:12 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 15 Jul 2023 04:53:26 +0000 (22:53 -0600)
19 files changed:
include/deal.II/base/array_view.h
include/deal.II/base/hdf5.h
include/deal.II/base/mpi.templates.h
include/deal.II/base/numbers.h
include/deal.II/base/partitioner.templates.h
include/deal.II/base/vectorization.h
include/deal.II/differentiation/ad/sacado_number_types.h
include/deal.II/differentiation/sd/symengine_tensor_operations.h
include/deal.II/fe/fe_system.h
include/deal.II/lac/affine_constraints.h
include/deal.II/lac/la_parallel_vector.templates.h
include/deal.II/lac/linear_operator.h
include/deal.II/lac/precondition.h
include/deal.II/lac/solver_cg.h
include/deal.II/lac/solver_gmres.h
include/deal.II/lac/trilinos_block_sparse_matrix.h
include/deal.II/matrix_free/evaluation_kernels.h
include/deal.II/matrix_free/tools.h
source/dofs/dof_accessor_set.cc

index 84e23f18b008e2ad830de27a216f649f7380652e..61453aeb25ab796010ddc753bab2c57fee5a6ed7 100644 (file)
@@ -704,12 +704,12 @@ ArrayView<typename std::remove_reference<
 make_array_view(const Iterator begin, const Iterator end)
 {
   static_assert(
-    std::is_same<typename std::iterator_traits<Iterator>::iterator_category,
-                 typename std::random_access_iterator_tag>::value
+    std::is_same_v<typename std::iterator_traits<Iterator>::iterator_category,
+                   typename std::random_access_iterator_tag>
 #ifdef DEAL_II_HAVE_CXX20
       ||
-      std::is_same<typename std::iterator_traits<Iterator>::iterator_category,
-                   typename std::contiguous_iterator_tag>::value
+      std::is_same_v<typename std::iterator_traits<Iterator>::iterator_category,
+                     typename std::contiguous_iterator_tag>
 #endif
     ,
     "The provided iterator needs to be a random access iterator.");
index 1986d7459ff59c7a5c453c66d446e88909380382..990f9e541febc57e30e9aba2985bde6a9a2f3da7 100644 (file)
@@ -1211,8 +1211,7 @@ namespace HDF5
      */
     template <typename Container>
     std::enable_if_t<
-      std::is_same<Container,
-                   std::vector<typename Container::value_type>>::value,
+      std::is_same_v<Container, std::vector<typename Container::value_type>>,
       Container>
     initialize_container(const std::vector<hsize_t> &dimensions);
 
@@ -1230,8 +1229,7 @@ namespace HDF5
      */
     template <typename Container>
     std::enable_if_t<
-      std::is_same<Container,
-                   FullMatrix<typename Container::value_type>>::value,
+      std::is_same_v<Container, FullMatrix<typename Container::value_type>>,
       Container>
     initialize_container(const std::vector<hsize_t> &dimensions);
 
@@ -1419,8 +1417,7 @@ namespace HDF5
 
     template <typename Container>
     std::enable_if_t<
-      std::is_same<Container,
-                   std::vector<typename Container::value_type>>::value,
+      std::is_same_v<Container, std::vector<typename Container::value_type>>,
       Container>
     initialize_container(const std::vector<hsize_t> &dimensions)
     {
@@ -1444,8 +1441,7 @@ namespace HDF5
 
     template <typename Container>
     std::enable_if_t<
-      std::is_same<Container,
-                   FullMatrix<typename Container::value_type>>::value,
+      std::is_same_v<Container, FullMatrix<typename Container::value_type>>,
       Container>
     initialize_container(const std::vector<hsize_t> &dimensions)
     {
index 64a93dd632ebe4653dac4e2fc1546b99404a6035..e38c42252eaf25f52ad8c3b18e0774ed6bd9b84a 100644 (file)
@@ -157,8 +157,8 @@ namespace Utilities
     void
     sum(const T &values, const MPI_Comm mpi_communicator, U &sums)
     {
-      static_assert(std::is_same<typename std::decay<T>::type,
-                                 typename std::decay<U>::type>::value,
+      static_assert(std::is_same_v<typename std::decay<T>::type,
+                                   typename std::decay<U>::type>,
                     "Input and output arguments must have the same type!");
       const auto array_view_values = make_array_view(values);
       using const_type =
@@ -272,8 +272,8 @@ namespace Utilities
     void
     max(const T &values, const MPI_Comm mpi_communicator, U &maxima)
     {
-      static_assert(std::is_same<typename std::decay<T>::type,
-                                 typename std::decay<U>::type>::value,
+      static_assert(std::is_same_v<typename std::decay<T>::type,
+                                   typename std::decay<U>::type>,
                     "Input and output arguments must have the same type!");
       const auto array_view_values = make_array_view(values);
       using const_type =
@@ -314,8 +314,8 @@ namespace Utilities
     void
     min(const T &values, const MPI_Comm mpi_communicator, U &minima)
     {
-      static_assert(std::is_same<typename std::decay<T>::type,
-                                 typename std::decay<U>::type>::value,
+      static_assert(std::is_same_v<typename std::decay<T>::type,
+                                   typename std::decay<U>::type>,
                     "Input and output arguments must have the same type!");
       const auto array_view_values = make_array_view(values);
       using const_type =
@@ -359,8 +359,8 @@ namespace Utilities
     void
     logical_or(const T &values, const MPI_Comm mpi_communicator, U &results)
     {
-      static_assert(std::is_same<typename std::decay<T>::type,
-                                 typename std::decay<U>::type>::value,
+      static_assert(std::is_same_v<typename std::decay<T>::type,
+                                   typename std::decay<U>::type>,
                     "Input and output arguments must have the same type!");
 
       static_assert(std::is_integral<typename T::value_type>::value,
index 3ee466495a237c601a230ca33aa076b57b782a84..9378caa00c39f10c503ac9e4a1b2b733187da3f0 100644 (file)
@@ -715,8 +715,8 @@ namespace internal
     template <typename F>
     static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE T
     value(const F &f,
-          std::enable_if_t<!std::is_same<typename std::decay<T>::type,
-                                         typename std::decay<F>::type>::value &&
+          std::enable_if_t<!std::is_same_v<typename std::decay<T>::type,
+                                           typename std::decay<F>::type> &&
                            std::is_constructible<T, F>::value> * = nullptr)
     {
       return T(f);
@@ -726,8 +726,8 @@ namespace internal
     template <typename F>
     static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE T
     value(const F &f,
-          std::enable_if_t<!std::is_same<typename std::decay<T>::type,
-                                         typename std::decay<F>::type>::value &&
+          std::enable_if_t<!std::is_same_v<typename std::decay<T>::type,
+                                           typename std::decay<F>::type> &&
                            !std::is_constructible<T, F>::value &&
                            is_explicitly_convertible<const F, T>::value> * =
             nullptr)
@@ -743,8 +743,8 @@ namespace internal
     static T
     value(
       const F &f,
-      std::enable_if_t<!std::is_same<typename std::decay<T>::type,
-                                     typename std::decay<F>::type>::value &&
+      std::enable_if_t<!std::is_same_v<typename std::decay<T>::type,
+                                       typename std::decay<F>::type> &&
                        !std::is_constructible<T, F>::value &&
                        !is_explicitly_convertible<const F, T>::value &&
                        Differentiation::AD::is_ad_number<F>::value> * = nullptr)
index 43b04893fec9e3996ad031b5bf9eecc6a7bb024d..63bed4926238b386f4f1ac1a05f88b9e612ae04e 100644 (file)
@@ -119,8 +119,7 @@ namespace Utilities
       for (unsigned int i = 0; i < n_import_targets; ++i)
         {
 #    if defined(DEAL_II_MPI_WITH_DEVICE_SUPPORT)
-          if constexpr (std::is_same<MemorySpaceType,
-                                     MemorySpace::Default>::value)
+          if constexpr (std::is_same_v<MemorySpaceType, MemorySpace::Default>)
             {
               const auto chunk_size = import_indices_plain_dev[i].size();
               using IndexType       = decltype(chunk_size);
@@ -218,8 +217,8 @@ namespace Utilities
                 {
                   const unsigned int chunk_size =
                     ghost_range.second - ghost_range.first;
-                  if constexpr (std::is_same<MemorySpaceType,
-                                             MemorySpace::Host>::value)
+                  if constexpr (std::is_same_v<MemorySpaceType,
+                                               MemorySpace::Host>)
                     {
                       // If source and destination are overlapping, we must be
                       // careful to use an appropriate copy function.
@@ -390,8 +389,8 @@ namespace Utilities
                   if (ghost_array_ptr + offset !=
                       ghost_array.data() + my_ghosts->first)
                     {
-                      if constexpr (std::is_same<MemorySpaceType,
-                                                 MemorySpace::Host>::value)
+                      if constexpr (std::is_same_v<MemorySpaceType,
+                                                   MemorySpace::Host>)
                         {
                           if (offset > my_ghosts->first)
                             std::copy_backward(ghost_array.data() +
@@ -596,8 +595,7 @@ namespace Utilities
 
           const Number *read_position = temporary_storage.data();
 #    if defined(DEAL_II_MPI_WITH_DEVICE_SUPPORT)
-          if constexpr (std::is_same<MemorySpaceType,
-                                     MemorySpace::Default>::value)
+          if constexpr (std::is_same_v<MemorySpaceType, MemorySpace::Default>)
             {
               if (vector_operation == VectorOperation::add)
                 {
@@ -775,8 +773,7 @@ namespace Utilities
           Assert(ghost_array.begin() != nullptr, ExcInternalError());
 
 #    if defined(DEAL_II_MPI_WITH_DEVICE_SUPPORT)
-          if constexpr (std::is_same<MemorySpaceType,
-                                     MemorySpace::Default>::value)
+          if constexpr (std::is_same_v<MemorySpaceType, MemorySpace::Default>)
             {
               Kokkos::deep_copy(
                 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>(
index 8f3f2ed826d8d05fdc8bc274399b108f6f762cb2..20059d4f881b435ecf3f87eeb897ea320087384e 100644 (file)
@@ -780,9 +780,9 @@ inline DEAL_II_ALWAYS_INLINE VectorizedArrayType
 make_vectorized_array(const typename VectorizedArrayType::value_type &u)
 {
   static_assert(
-    std::is_same<VectorizedArrayType,
-                 VectorizedArray<typename VectorizedArrayType::value_type,
-                                 VectorizedArrayType::size()>>::value,
+    std::is_same_v<VectorizedArrayType,
+                   VectorizedArray<typename VectorizedArrayType::value_type,
+                                   VectorizedArrayType::size()>>,
     "VectorizedArrayType is not a VectorizedArray.");
 
   VectorizedArrayType result = u;
index 1ddc22f0a7d611942cd347fe0057f6d93a593ee3..bc120934912308846a1eb348ab552ddf07139771 100644 (file)
@@ -143,9 +143,9 @@ namespace Differentiation
       template <typename SacadoNumber>
       struct SacadoNumberInfo<
         SacadoNumber,
-        std::enable_if_t<std::is_same<
-          SacadoNumber,
-          Sacado::Fad::DFad<typename SacadoNumber::value_type>>::value>>
+        std::enable_if_t<
+          std::is_same_v<SacadoNumber,
+                         Sacado::Fad::DFad<typename SacadoNumber::value_type>>>>
       {
         using ad_type         = SacadoNumber;
         using scalar_type     = typename ad_type::scalar_type;
@@ -163,9 +163,9 @@ namespace Differentiation
       template <typename SacadoNumber>
       struct SacadoNumberInfo<
         SacadoNumber,
-        std::enable_if_t<std::is_same<
+        std::enable_if_t<std::is_same_v<
           SacadoNumber,
-          Sacado::Rad::ADvar<typename SacadoNumber::value_type>>::value>>
+          Sacado::Rad::ADvar<typename SacadoNumber::value_type>>>>
       {
         using ad_type         = SacadoNumber;
         using scalar_type     = typename ad_type::ADVari::scalar_type;
@@ -477,9 +477,9 @@ namespace Differentiation
     template <typename ADNumberType>
     struct ADNumberTraits<
       ADNumberType,
-      std::enable_if_t<std::is_same<
-        ADNumberType,
-        Sacado::Fad::DFad<typename ADNumberType::scalar_type>>::value>>
+      std::enable_if_t<
+        std::is_same_v<ADNumberType,
+                       Sacado::Fad::DFad<typename ADNumberType::scalar_type>>>>
       : NumberTraits<typename ADNumberType::scalar_type,
                      NumberTypes::sacado_dfad>
     {};
@@ -494,10 +494,10 @@ namespace Differentiation
     template <typename ADNumberType>
     struct ADNumberTraits<
       ADNumberType,
-      std::enable_if_t<std::is_same<
-        ADNumberType,
-        std::complex<Sacado::Fad::DFad<
-          typename ADNumberType::value_type::scalar_type>>>::value>>
+      std::enable_if_t<
+        std::is_same_v<ADNumberType,
+                       std::complex<Sacado::Fad::DFad<
+                         typename ADNumberType::value_type::scalar_type>>>>>
       : NumberTraits<
           std::complex<typename ADNumberType::value_type::scalar_type>,
           NumberTypes::sacado_dfad>
@@ -566,9 +566,9 @@ namespace Differentiation
     template <typename ADNumberType>
     struct ADNumberTraits<
       ADNumberType,
-      std::enable_if_t<std::is_same<
+      std::enable_if_t<std::is_same_v<
         ADNumberType,
-        Sacado::Rad::ADvar<typename ADNumberType::ADVari::scalar_type>>::value>>
+        Sacado::Rad::ADvar<typename ADNumberType::ADVari::scalar_type>>>>
       : NumberTraits<typename ADNumberType::ADVari::scalar_type,
                      NumberTypes::sacado_rad>
     {};
@@ -610,10 +610,10 @@ namespace Differentiation
     template <typename ADNumberType>
     struct ADNumberTraits<
       ADNumberType,
-      std::enable_if_t<std::is_same<
+      std::enable_if_t<std::is_same_v<
         ADNumberType,
         std::complex<Sacado::Rad::ADvar<
-          typename ADNumberType::value_type::ADVari::scalar_type>>>::value>>
+          typename ADNumberType::value_type::ADVari::scalar_type>>>>>
       : NumberTraits<
           std::complex<typename ADNumberType::value_type::ADVari::scalar_type>,
           NumberTypes::sacado_rad>
@@ -659,11 +659,11 @@ namespace Differentiation
      * a floating point type.
      */
     template <typename ADNumberType>
-    struct ADNumberTraits<ADNumberType,
-                          std::enable_if_t<std::is_same<
-                            ADNumberType,
-                            Sacado::Fad::DFad<Sacado::Fad::DFad<
-                              typename ADNumberType::scalar_type>>>::value>>
+    struct ADNumberTraits<
+      ADNumberType,
+      std::enable_if_t<std::is_same_v<ADNumberType,
+                                      Sacado::Fad::DFad<Sacado::Fad::DFad<
+                                        typename ADNumberType::scalar_type>>>>>
       : NumberTraits<typename ADNumberType::scalar_type,
                      NumberTypes::sacado_dfad_dfad>
     {};
@@ -679,10 +679,10 @@ namespace Differentiation
     template <typename ADNumberType>
     struct ADNumberTraits<
       ADNumberType,
-      std::enable_if_t<std::is_same<
-        ADNumberType,
-        std::complex<Sacado::Fad::DFad<Sacado::Fad::DFad<
-          typename ADNumberType::value_type::scalar_type>>>>::value>>
+      std::enable_if_t<
+        std::is_same_v<ADNumberType,
+                       std::complex<Sacado::Fad::DFad<Sacado::Fad::DFad<
+                         typename ADNumberType::value_type::scalar_type>>>>>>
       : NumberTraits<
           std::complex<typename ADNumberType::value_type::scalar_type>,
           NumberTypes::sacado_dfad_dfad>
@@ -753,12 +753,11 @@ namespace Differentiation
      * a floating point type.
      */
     template <typename ADNumberType>
-    struct ADNumberTraits<
-      ADNumberType,
-      std::enable_if_t<
-        std::is_same<ADNumberType,
-                     Sacado::Rad::ADvar<Sacado::Fad::DFad<
-                       typename ADNumberType::ADVari::scalar_type>>>::value>>
+    struct ADNumberTraits<ADNumberType,
+                          std::enable_if_t<std::is_same_v<
+                            ADNumberType,
+                            Sacado::Rad::ADvar<Sacado::Fad::DFad<
+                              typename ADNumberType::ADVari::scalar_type>>>>>
       : NumberTraits<typename ADNumberType::ADVari::scalar_type,
                      NumberTypes::sacado_rad_dfad>
     {};
@@ -803,10 +802,10 @@ namespace Differentiation
     template <typename ADNumberType>
     struct ADNumberTraits<
       ADNumberType,
-      std::enable_if_t<std::is_same<
+      std::enable_if_t<std::is_same_v<
         ADNumberType,
         std::complex<Sacado::Rad::ADvar<Sacado::Fad::DFad<
-          typename ADNumberType::value_type::ADVari::scalar_type>>>>::value>>
+          typename ADNumberType::value_type::ADVari::scalar_type>>>>>>
       : NumberTraits<
           std::complex<typename ADNumberType::value_type::ADVari::scalar_type>,
           NumberTypes::sacado_rad_dfad>
@@ -861,9 +860,9 @@ namespace Differentiation
     template <typename NumberType>
     struct is_sacado_dfad_number<
       NumberType,
-      std::enable_if_t<std::is_same<
-        NumberType,
-        Sacado::Fad::Expr<typename NumberType::value_type>>::value>>
+      std::enable_if_t<
+        std::is_same_v<NumberType,
+                       Sacado::Fad::Expr<typename NumberType::value_type>>>>
       : std::true_type
     {};
 
@@ -883,9 +882,9 @@ namespace Differentiation
     struct is_sacado_rad_number<
       NumberType,
       std::enable_if_t<
-        std::is_same<NumberType,
-                     Sacado::Rad::ADvari<Sacado::Fad::DFad<
-                       typename NumberType::ADVari::scalar_type>>>::value>>
+        std::is_same_v<NumberType,
+                       Sacado::Rad::ADvari<Sacado::Fad::DFad<
+                         typename NumberType::ADVari::scalar_type>>>>>
       : std::true_type
     {};
 
index 0c1b18be562ad9f523d5adcd3594e1c20b2b1637..7386fdd1c65005f8135a7623a72a376f4fb0b0fb 100644 (file)
@@ -1020,18 +1020,19 @@ namespace Differentiation
                   out[indices_out] *= 0.5;
 
                 // TODO: Implement for SymmetricTensor<4,dim,...>
-                if (std::is_same<TensorType_1<rank_1, dim, ValueType>,
-                                 SymmetricTensor<2, dim, ValueType>>::
-                      value) // Symmetric function
+                if (std::is_same_v<
+                      TensorType_1<rank_1, dim, ValueType>,
+                      SymmetricTensor<2, dim, ValueType>>) // Symmetric function
                   {
                     const TableIndices<rank_1 + rank_2> indices_out_t =
                       concatenate_indices(transpose_indices(indices_i),
                                           indices_j);
                     out[indices_out_t] = out[indices_out];
                   }
-                else if (std::is_same<TensorType_2<rank_2, dim, ValueType>,
-                                      SymmetricTensor<2, dim, ValueType>>::
-                           value) // Symmetric operator
+                else if (std::is_same_v<
+                           TensorType_2<rank_2, dim, ValueType>,
+                           SymmetricTensor<2, dim, ValueType>>) // Symmetric
+                                                                // operator
                   {
                     const TableIndices<rank_1 + rank_2> indices_out_t =
                       concatenate_indices(indices_i,
index 651f0a44cbeb6a16761f43129fef9a7fe38b6abd..7b8be45ed61280a1a0ec516bfe391a653b2f6c5a 100644 (file)
@@ -537,9 +537,9 @@ public:
   template <
     class... FEPairs,
     typename = enable_if_all_t<
-      (std::is_same<typename std::decay<FEPairs>::type,
-                    std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
-                              unsigned int>>::value ||
+      (std::is_same_v<typename std::decay<FEPairs>::type,
+                      std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
+                                unsigned int>> ||
        std::is_base_of_v<FiniteElement<dim, spacedim>,
                          typename std::decay<FEPairs>::type>)...>>
   FESystem(FEPairs &&...fe_pairs);
index 49c1b6425999f6113404333d44f3d38b8cb7f1e8..e1882a8f83340d23e3fdf2527085e1cc414f9c66 100644 (file)
@@ -2433,8 +2433,8 @@ namespace internal
        * types).
        */
       static const bool value =
-        std::is_same<decltype(check(std::declval<MatrixType *>())),
-                     std::true_type>::value;
+        std::is_same_v<decltype(check(std::declval<MatrixType *>())),
+                       std::true_type>;
     };
 
     // instantiation of the static member
index 546a2536c50745c0ffc232b9adb8da69204d0628..4cf33eda3f028fe5cda932ce14cd577dd91e0ea9 100644 (file)
@@ -978,8 +978,7 @@ namespace LinearAlgebra
       if (partitioner->n_import_indices() > 0)
         {
 #  if !defined(DEAL_II_MPI_WITH_DEVICE_SUPPORT)
-          if (std::is_same<MemorySpaceType,
-                           dealii::MemorySpace::Default>::value)
+          if (std::is_same_v<MemorySpaceType, dealii::MemorySpace::Default>)
             {
               if (import_data.values_host_buffer.size() == 0)
                 Kokkos::resize(import_data.values_host_buffer,
index 018c06b1bea19b7cbda68ab3aff4f4bd7157a53e..1b15cdab58901ab53068988f491f903ecd6d17a3 100644 (file)
@@ -1503,8 +1503,7 @@ template <
   typename =
     std::enable_if_t<!std::is_lvalue_reference<OperatorExemplar>::value>,
   typename = std::enable_if_t<
-    !std::is_same<OperatorExemplar,
-                  LinearOperator<Range, Domain, Payload>>::value>>
+    !std::is_same_v<OperatorExemplar, LinearOperator<Range, Domain, Payload>>>>
 LinearOperator<Range, Domain, Payload>
 linear_operator(OperatorExemplar &&, const Matrix &) = delete;
 
@@ -1518,8 +1517,7 @@ template <
   typename =
     std::enable_if_t<!std::is_lvalue_reference<OperatorExemplar>::value>,
   typename = std::enable_if_t<
-    !std::is_same<OperatorExemplar,
-                  LinearOperator<Range, Domain, Payload>>::value>>
+    !std::is_same_v<OperatorExemplar, LinearOperator<Range, Domain, Payload>>>>
 LinearOperator<Range, Domain, Payload>
 linear_operator(OperatorExemplar &&, Matrix &&) = delete;
 
@@ -1552,8 +1550,7 @@ template <
   typename =
     std::enable_if_t<!std::is_same_v<Preconditioner, PreconditionIdentity>>,
   typename = std::enable_if_t<
-    !std::is_same<Preconditioner,
-                  LinearOperator<Range, Domain, Payload>>::value>>
+    !std::is_same_v<Preconditioner, LinearOperator<Range, Domain, Payload>>>>
 LinearOperator<Domain, Range, Payload>
 inverse_operator(const LinearOperator<Range, Domain, Payload> &,
                  Solver &,
index d95443b8b38eee403305cffb7037ab44ed47d455..a0cb0f2eece9ee1720409e94cd4757965af6a72c 100644 (file)
@@ -543,14 +543,13 @@ namespace internal
             typename PreconditionerType>
   constexpr bool has_vmult_with_std_functions =
     is_supported_operation<vmult_functions_t, MatrixType, VectorType> &&
-      std::is_same<PreconditionerType,
-                   dealii::DiagonalMatrix<VectorType>>::value &&
-    (std::is_same<VectorType,
-                  dealii::Vector<typename VectorType::value_type>>::value ||
-     std::is_same<
+      std::is_same_v<PreconditionerType, dealii::DiagonalMatrix<VectorType>> &&
+    (std::is_same_v<VectorType,
+                    dealii::Vector<typename VectorType::value_type>> ||
+     std::is_same_v<
        VectorType,
        LinearAlgebra::distributed::Vector<typename VectorType::value_type,
-                                          MemorySpace::Host>>::value);
+                                          MemorySpace::Host>>);
 
 
   template <typename MatrixType, typename VectorType>
@@ -3664,17 +3663,16 @@ PreconditionChebyshev<MatrixType, VectorType, PreconditionerType>::
   // We do not need the second temporary vector in case we have a
   // DiagonalMatrix as preconditioner and use deal.II's own vectors
   using NumberType = typename VectorType::value_type;
-  if (std::is_same<PreconditionerType,
-                   dealii::DiagonalMatrix<VectorType>>::value == false ||
+  if (std::is_same_v<PreconditionerType, dealii::DiagonalMatrix<VectorType>> ==
+        false ||
       (std::is_same_v<VectorType, dealii::Vector<NumberType>> == false &&
-       ((std::is_same<VectorType,
-                      LinearAlgebra::distributed::
-                        Vector<NumberType, MemorySpace::Host>>::value ==
+       ((std::is_same_v<
+           VectorType,
+           LinearAlgebra::distributed::Vector<NumberType, MemorySpace::Host>> ==
          false) ||
-        (std::is_same<VectorType,
-                      LinearAlgebra::distributed::
-                        Vector<NumberType, MemorySpace::Default>>::value ==
-         false))))
+        (std::is_same_v<VectorType,
+                        LinearAlgebra::distributed::
+                          Vector<NumberType, MemorySpace::Default>> == false))))
     temp_vector2.reinit(src, true);
   else
     {
index 3d10be24cd8bb8696342b0cdb4d686ee9c47782a..8099ffbbcf6fb77a45557ab4a1d83584b29aa1a2 100644 (file)
@@ -705,10 +705,10 @@ namespace internal
       std::enable_if_t<has_vmult_functions<MatrixType, VectorType> &&
                          (has_apply_to_subrange<PreconditionerType> ||
                           has_apply<PreconditionerType>)&&std::
-                           is_same<VectorType,
-                                   LinearAlgebra::distributed::Vector<
-                                     typename VectorType::value_type,
-                                     MemorySpace::Host>>::value,
+                           is_same_v<VectorType,
+                                     LinearAlgebra::distributed::Vector<
+                                       typename VectorType::value_type,
+                                       MemorySpace::Host>>,
                        int>>
       : public IterationWorkerBase<VectorType, MatrixType, PreconditionerType>
     {
index 9c86964b5d66f7e92d20fec62c7c0a3651539fd3..b842915b9f5d3c20c0577963f94adfddb29d5e18 100644 (file)
@@ -736,10 +736,10 @@ namespace internal
       VectorType,
       typename std::enable_if<!internal::is_block_vector<VectorType>>::type>
     {
-      static constexpr bool value = std::is_same<
+      static constexpr bool value = std::is_same_v<
         VectorType,
         LinearAlgebra::distributed::Vector<typename VectorType::value_type,
-                                           MemorySpace::Host>>::value;
+                                           MemorySpace::Host>>;
     };
 
 
@@ -749,10 +749,10 @@ namespace internal
       VectorType,
       typename std::enable_if<internal::is_block_vector<VectorType>>::type>
     {
-      static constexpr bool value = std::is_same<
+      static constexpr bool value = std::is_same_v<
         typename VectorType::BlockType,
         LinearAlgebra::distributed::Vector<typename VectorType::value_type,
-                                           MemorySpace::Host>>::value;
+                                           MemorySpace::Host>>;
     };
 
 
index bbae8efda91361fd28c49d9dbbefedb36873984e..7a367039fba6aef772515fe3a39c3d88a31dcac7 100644 (file)
@@ -601,9 +601,9 @@ namespace TrilinosWrappers
         TrilinosBlockPayload(const Args &...)
         {
           static_assert(
-            std::is_same<
+            std::is_same_v<
               PayloadBlockType,
-              internal::LinearOperatorImplementation::TrilinosPayload>::value,
+              internal::LinearOperatorImplementation::TrilinosPayload>,
             "TrilinosBlockPayload can only accept a payload of type TrilinosPayload.");
         }
       };
index 1d10a6e1af2068370eca73e19fba21dbadffeefc..28a36ef5a1750e521b0b7237f2204f69f7c51527 100644 (file)
@@ -2286,8 +2286,7 @@ namespace internal
       // `OtherNumber` is either `const Number` (evaluate()) or `Number`
       // (integrate())
       static_assert(
-        std::is_same<Number,
-                     typename std::remove_const<OtherNumber>::type>::value,
+        std::is_same_v<Number, typename std::remove_const<OtherNumber>::type>,
         "Type of Number and of OtherNumber do not match.");
 
       const auto element_type = fe_eval.get_shape_info().element_type;
index 0afcd0992be07996f2a3d1b38145d76b2b950a36..54df1070c0a969bcc91031d2bc0fd87477088477 100644 (file)
@@ -1112,11 +1112,11 @@ namespace MatrixFreeTools
      */
     template <typename MatrixType,
               typename Number,
-              std::enable_if_t<std::is_same<
+              std::enable_if_t<std::is_same_v<
                 typename std::remove_const<typename std::remove_reference<
                   typename MatrixType::value_type>::type>::type,
                 typename std::remove_const<typename std::remove_reference<
-                  Number>::type>::type>::value> * = nullptr>
+                  Number>::type>::type>> * = nullptr>
     const AffineConstraints<typename MatrixType::value_type> &
     create_new_affine_constraints_if_needed(
       const MatrixType &,
@@ -1133,11 +1133,11 @@ namespace MatrixFreeTools
      */
     template <typename MatrixType,
               typename Number,
-              std::enable_if_t<!std::is_same<
+              std::enable_if_t<!std::is_same_v<
                 typename std::remove_const<typename std::remove_reference<
                   typename MatrixType::value_type>::type>::type,
                 typename std::remove_const<typename std::remove_reference<
-                  Number>::type>::type>::value> * = nullptr>
+                  Number>::type>::type>> * = nullptr>
     const AffineConstraints<typename MatrixType::value_type> &
     create_new_affine_constraints_if_needed(
       const MatrixType &,
index 3ca8d4f04f82520d666bde99822cb7ca57a053e1..e4b80d21af28f31c2486f26baf3cee792d275f82 100644 (file)
@@ -76,16 +76,16 @@ namespace internal
    */
   template <typename VectorType>
   constexpr bool is_dealii_vector =
-    std::is_same<VectorType,
-                 dealii::Vector<typename VectorType::value_type>>::value ||
-    std::is_same<VectorType,
-                 dealii::BlockVector<typename VectorType::value_type>>::value ||
-    std::is_same<VectorType,
-                 dealii::LinearAlgebra::distributed::Vector<
-                   typename VectorType::value_type>>::value ||
-    std::is_same<VectorType,
-                 dealii::LinearAlgebra::distributed::BlockVector<
-                   typename VectorType::value_type>>::value;
+    std::is_same_v<VectorType,
+                   dealii::Vector<typename VectorType::value_type>> ||
+    std::is_same_v<VectorType,
+                   dealii::BlockVector<typename VectorType::value_type>> ||
+    std::is_same_v<VectorType,
+                   dealii::LinearAlgebra::distributed::Vector<
+                     typename VectorType::value_type>> ||
+    std::is_same_v<VectorType,
+                   dealii::LinearAlgebra::distributed::BlockVector<
+                     typename VectorType::value_type>>;
 
   /**
    * Helper functions that call set_ghost_state() if the vector supports this

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.