]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added calculation of n_locally_owned_dofs_per_processor
authordenis.davydov <denis.davydov@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Mar 2014 22:16:07 +0000 (22:16 +0000)
committerdenis.davydov <denis.davydov@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 25 Mar 2014 22:16:07 +0000 (22:16 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_sharedtria@32696 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/dofs/dof_handler_policy.cc

index 1ee0a34a2a671f36505b735c707bb3060878019c..3aea13f0ddbd6ee0f4a3a810f16fe386362b70d2 100644 (file)
@@ -970,6 +970,11 @@ namespace internal
       {
          Sequential<dim,spacedim>::distribute_dofs (dof_handler,number_cache);
          DoFRenumbering::subdomain_wise (dof_handler);
+         const parallel::shared::Triangulation<dim,spacedim> *shared_tr = dynamic_cast<const parallel::shared::Triangulation<dim,spacedim>*>(&dof_handler.get_tria());
+         const unsigned int n_mpi_processes =  Utilities::MPI::n_mpi_processes( shared_tr->get_communicator () );
+         number_cache.n_locally_owned_dofs_per_processor.resize (n_mpi_processes);
+         for (unsigned int i=0; i<n_mpi_processes; ++i)
+                 number_cache.n_locally_owned_dofs_per_processor[i]  = DoFTools::count_dofs_with_subdomain_association (dof_handler, i);
          number_cache.locally_owned_dofs = dealii::DoFTools::locally_owned_dofs_with_subdomain(dof_handler,dof_handler.get_tria().locally_owned_subdomain() );
       }
 

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.