]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Include another MPI function that accidentally got lost in merge.
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Jan 2012 08:47:33 +0000 (08:47 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 26 Jan 2012 08:47:33 +0000 (08:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@24929 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/configure
deal.II/include/deal.II/base/config.h.in
deal.II/include/deal.II/base/mpi.h
deal.II/source/base/table_handler.cc

index 83c4903981767b3908353edf27a4d98228019ea7..7ea06b6a69d263360f252f57f471a81417fd2dfc 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 24746 .
+# From configure.in Revision: 24924 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68 for deal.II 7.2.pre.
 #
index a7c85a5704d94a59b384b1cd647997f069d8af7e..299c749fae0a29e1f4d44b20a7088b2b73184a37 100644 (file)
@@ -83,7 +83,9 @@
    floating point computations on cygwin systems. */
 #undef DEAL_II_BROKEN_SOCKETS
 
-/* Defined if the compiler we use supports the upcoming C++1x standard. */
+/* Defined if the compiler we use supports the C++2011 standard well enough to
+   allow using the standard library classes instead of the corresponding BOOST
+   classes. */
 #undef DEAL_II_CAN_USE_CXX1X
 
 /* Backward compatibility support for functions and classes that do not take
index a7190af12b035fc5f1d65e5b3721914a6745fe97..7bb90ebc9d74df02151597a10dafdfed9c0849a4 100644 (file)
@@ -182,7 +182,7 @@ namespace Utilities
     void sum (const std::vector<T> &values,
               const MPI_Comm &mpi_communicator,
               std::vector<T> &sums);
-    
+
                                     /**
                                      * Return the maximum over all processors of the value @p t. This function
                                      * is collective over all processors given in the communicator. If
@@ -215,6 +215,21 @@ namespace Utilities
              const MPI_Comm &mpi_communicator,
              T (&maxima)[N]);
 
+                                     /**
+                                      * Like the previous function,
+                                      * but take the maximum over the
+                                      * elements of a std::vector. In other words,
+                                      * the i-th element of the
+                                      * results array is the maximum over
+                                      * the i-th entries of the input
+                                      * arrays from each processor.
+                                      */
+    template <typename T>
+    inline
+    void max (const std::vector<T> &values,
+              const MPI_Comm &mpi_communicator,
+              std::vector<T> &maxima);
+
                                     /**
                                      * Data structure to store the result of
                                      * min_max_avg().
@@ -392,7 +407,7 @@ namespace Utilities
 #endif
     }
 
-    
+
     template <typename T>
     inline
     void sum (const std::vector<T> &values,
@@ -410,7 +425,7 @@ namespace Utilities
 #endif
     }
 
-    
+
     template <typename T>
     inline
     T max (const T &t,
@@ -445,6 +460,24 @@ namespace Utilities
        maxima[i] = values[i];
 #endif
     }
+
+
+    template <typename T>
+    inline
+    void max (const std::vector<T> &values,
+              const MPI_Comm       &mpi_communicator,
+              std::vector<T>       &maxima)
+    {
+#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
+      maxima.resize (values.size());
+      MPI_Allreduce (const_cast<void*>(static_cast<const void*>(&values[0])),
+                     &maxima[0], values.size(), internal::mpi_type_id((T*)0), MPI_MAX,
+                     mpi_communicator);
+#else
+      (void)mpi_communicator;
+      maxima = values;
+#endif
+    }
   } // end of namespace MPI
 } // end of namespace Utilities
 
index 3bb10290f0516c48b62cd9bb462bb5be3bea8de9..1042acbb71089b3555ad853c00177454e8ee9fb2 100644 (file)
@@ -18,7 +18,7 @@
 #include <sstream>
 #include <iostream>
 #include <iomanip>
-#include "../../contrib/boost-1.46.1/include/boost/mpl/string.hpp"
+#include "boost/mpl/string.hpp"
 
 
 DEAL_II_NAMESPACE_OPEN

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.