From: bangerth Date: Sat, 18 Oct 2008 04:11:11 +0000 (+0000) Subject: Do not build DoF distribution maps that are distributed evenly across all processors... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a54f70ddc8ce842324e3ba1705b1cc700b53c790;p=dealii-svn.git Do not build DoF distribution maps that are distributed evenly across all processors but do so using the subdomain association of degrees of freedom. This should reduce the number of elements shipped across processors and indeed reduces the run-time of assembly functions by 5% on 2 processors and up to 30% on 20 processors. git-svn-id: https://svn.dealii.org/trunk@17275 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index d1b125f44e..60ecac6833 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -620,9 +620,20 @@ void BoussinesqFlowProblem::setup_dofs () stokes_partitioner.clear(); { - Epetra_Map map_u(n_u, 0, trilinos_communicator); + std::vector local_dofs (dim+1); + DoFTools:: + count_dofs_with_subdomain_association (stokes_dof_handler, + trilinos_communicator.MyPID(), + local_dofs); + unsigned int n_local_velocities = 0; + for (unsigned int c=0; c::setup_dofs () } - temperature_partitioner = Epetra_Map (n_T, 0, trilinos_communicator); + temperature_partitioner + = Epetra_Map (n_T, + DoFTools::count_dofs_with_subdomain_association + (temperature_dof_handler, + trilinos_communicator.MyPID()), + 0, + trilinos_communicator); { temperature_mass_matrix.clear (); temperature_stiffness_matrix.clear ();