]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not use anonymous namespaces in header files. 18123/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 12 Feb 2025 04:34:45 +0000 (21:34 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 12 Feb 2025 04:56:24 +0000 (21:56 -0700)
include/deal.II/sundials/n_vector.templates.h

index 8fe20deecce55f9f0680f1ddfb47a107d5ba1c53..4a41a8a77db5aeb276a8e9b5144e67c5d96d3403 100644 (file)
@@ -431,53 +431,50 @@ namespace SUNDIALS
 {
   namespace internal
   {
-    namespace
+    template <typename VectorType,
+              std::enable_if_t<is_serial_vector<VectorType>::value, int> = 0>
+    MPI_Comm
+    get_mpi_communicator_from_vector(const VectorType &)
     {
-      template <typename VectorType,
-                std::enable_if_t<is_serial_vector<VectorType>::value, int> = 0>
-      MPI_Comm
-      get_mpi_communicator_from_vector(const VectorType &)
-      {
-        return MPI_COMM_SELF;
-      }
+      return MPI_COMM_SELF;
+    }
 
 
 
-      template <typename VectorType,
-                std::enable_if_t<!is_serial_vector<VectorType>::value &&
-                                   !IsBlockVector<VectorType>::value,
-                                 int> = 0>
-      MPI_Comm
-      get_mpi_communicator_from_vector(const VectorType &v)
-      {
+    template <typename VectorType,
+              std::enable_if_t<!is_serial_vector<VectorType>::value &&
+                                 !IsBlockVector<VectorType>::value,
+                               int> = 0>
+    MPI_Comm
+    get_mpi_communicator_from_vector(const VectorType &v)
+    {
 #  ifndef DEAL_II_WITH_MPI
-        (void)v;
-        return MPI_COMM_SELF;
+      (void)v;
+      return MPI_COMM_SELF;
 #  else
-        return v.get_mpi_communicator();
+      return v.get_mpi_communicator();
 #  endif
-      }
+    }
 
 
 
-      template <typename VectorType,
-                std::enable_if_t<!is_serial_vector<VectorType>::value &&
-                                   IsBlockVector<VectorType>::value,
-                                 int> = 0>
-      MPI_Comm
-      get_mpi_communicator_from_vector(const VectorType &v)
-      {
+    template <typename VectorType,
+              std::enable_if_t<!is_serial_vector<VectorType>::value &&
+                                 IsBlockVector<VectorType>::value,
+                               int> = 0>
+    MPI_Comm
+    get_mpi_communicator_from_vector(const VectorType &v)
+    {
 #  ifndef DEAL_II_WITH_MPI
-        (void)v;
-        return MPI_COMM_SELF;
+      (void)v;
+      return MPI_COMM_SELF;
 #  else
-        Assert(v.n_blocks() > 0,
-               ExcMessage("You cannot ask a block vector without blocks "
-                          "for its MPI communicator."));
-        return v.block(0).get_mpi_communicator();
+      Assert(v.n_blocks() > 0,
+             ExcMessage("You cannot ask a block vector without blocks "
+                        "for its MPI communicator."));
+      return v.block(0).get_mpi_communicator();
 #  endif
-      }
-    } // namespace
+    }
 
 
     template <typename VectorType>

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.