]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Circumvent case where one processor has no data.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 30 Mar 2011 14:17:25 +0000 (14:17 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 30 Mar 2011 14:17:25 +0000 (14:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@23546 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-32/step-32.cc

index 14b35753a0c3c11260019a4ed6ffc4a786c5b8e9..12f4105763539b0b15f9de9227b11113ff6ddea0 100644 (file)
@@ -3062,9 +3062,9 @@ void BoussinesqFlowProblem<dim>::solve ()
 
                                // extract temperature range
     std::vector<double> temperature (2), global_temperature (2);
-    temperature[0] = distributed_temperature_solution.trilinos_vector()[0][0],
-      temperature[1] = temperature[0];
-    for (unsigned int i=1; i<distributed_temperature_solution.local_size(); ++i)
+    temperature[0] = std::numeric_limits<double>::max(),
+      temperature[1] = -std::numeric_limits<double>::max();
+    for (unsigned int i=0; i<distributed_temperature_solution.local_size(); ++i)
       {
        temperature[0] = std::min<double> (temperature[0],
                                           distributed_temperature_solution.trilinos_vector()[0][i]);

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.