]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Re-format a couple of places.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 11 Aug 2009 14:58:00 +0000 (14:58 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 11 Aug 2009 14:58:00 +0000 (14:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@19218 0785d39b-7218-0410-832d-ea1e28bc413d

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

index b351a9ae80e033fc5d08f6a0604bbdeaf49eb925..80cd527f7098ce52c2661b159d486d07a415bf65 100644 (file)
@@ -747,7 +747,10 @@ template <int dim>
 BoussinesqFlowProblem<dim>::BoussinesqFlowProblem ()
                 :
                 trilinos_communicator (Utilities::Trilinos::comm_world()),
-               pcout (std::cout, Utilities::Trilinos::get_this_mpi_process(trilinos_communicator)==0),
+               pcout (std::cout,
+                      (Utilities::Trilinos::
+                       get_this_mpi_process(trilinos_communicator)
+                       == 0)),
 
                triangulation (Triangulation<dim>::maximum_smoothing),
 
@@ -1119,16 +1122,16 @@ void BoussinesqFlowProblem<dim>::setup_dofs ()
                                             Utilities::Trilinos::
                                             get_this_mpi_process(trilinos_communicator),
                                             local_dofs);
-    unsigned int n_local_velocities = 0;
-    for (unsigned int c=0; c<dim; ++c)
-      n_local_velocities += local_dofs[c];
-
-    const unsigned int n_local_pressures = local_dofs[dim];
-
-    Epetra_Map map_u(n_u, n_local_velocities, 0, trilinos_communicator);
-    stokes_partitioner.push_back (map_u);
-    Epetra_Map map_p(n_p, n_local_pressures, 0, trilinos_communicator);
-    stokes_partitioner.push_back (map_p);
+    const unsigned int
+      n_local_velocities = std::accumulate (&local_dofs[0],
+                                           &local_dofs[dim],
+                                           0),
+      n_local_pressures  = local_dofs[dim];
+
+    stokes_partitioner.push_back (Epetra_Map(n_u, n_local_velocities,
+                                            0, trilinos_communicator));
+    stokes_partitioner.push_back (Epetra_Map(n_p, n_local_pressures,
+                                            0, trilinos_communicator));
   }
   
   temperature_partitioner

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.