]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Deal with no MPI in sundials/n_vector.templates.h
authorDaniel Arndt <arndtd@ornl.gov>
Sat, 6 Feb 2021 15:58:06 +0000 (10:58 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Sat, 6 Feb 2021 16:59:44 +0000 (11:59 -0500)
include/deal.II/sundials/n_vector.templates.h

index a45c4683f9636371d588b56c53c79f5b8bed5f50..e7b50b5dae12201fd5a210a52684a2e3c3a329ae 100644 (file)
@@ -279,7 +279,12 @@ namespace SUNDIALS
       inline void *
       get_communicator_as_void_ptr(N_Vector v)
       {
+#  ifndef DEAL_II_WITH_MPI
+        (void)v;
+        return nullptr;
+#  else
         return get_communicator<VectorType>(v);
+#  endif
       }
 
     } // namespace NVectorOperations
@@ -487,7 +492,7 @@ template <typename VectorType,
           std::enable_if_t<is_serial_vector<VectorType>::value, int>>
 MPI_Comm SUNDIALS::internal::NVectorOperations::get_communicator(N_Vector)
 {
-  return nullptr;
+  return {};
 }
 
 

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.