From 265ef03ac98d90806e68f81a10cfec87339377d9 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 11 Apr 2016 11:58:04 +0200 Subject: [PATCH] Fix Cuthill-McKee renumbering on large processor counts --- doc/news/changes.h | 9 +++++++++ source/dofs/dof_renumbering.cc | 21 ++++++++++++++------- source/dofs/dof_tools.inst.in | 18 +++++++++++++----- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/doc/news/changes.h b/doc/news/changes.h index fadcb84bdd..1df3d429ec 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -171,6 +171,15 @@ inconvenience this causes.

Specific improvements

    +
  1. Improved: DoFRenumbering::compute_Cuthill_McKee when used with + distributed triangulations contained parts that scaled as the global problem + size, rather than the processor-local size. This prevented its use with more + than a few hundred cores when hanging node constraints were activated. This + has been fixed. +
    + (Martin Kronbichler, 2016/04/11) +
  2. +
  3. New: added hessenberg_signal and krylov_space_signal to SolverGMRES. These signals allow to retrieve the Hessenberg matrix and the basis vectors generated by the Arnoldi algorithm. diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index ae35017783..e076b8ada5 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -392,7 +392,12 @@ namespace DoFRenumbering // object will be empty and nothing happens ConstraintMatrix constraints; if (use_constraints) - DoFTools::make_hanging_node_constraints (dof_handler, constraints); + { + IndexSet relevant_dofs; + DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs); + constraints.reinit(relevant_dofs); + DoFTools::make_hanging_node_constraints (dof_handler, constraints); + } constraints.close (); const IndexSet locally_owned = dof_handler.locally_owned_dofs(); @@ -408,8 +413,7 @@ namespace DoFRenumbering // If the index set is not complete, need to get indices in local index // space. - if (locally_owned.n_elements() != - locally_owned.size()) + if (locally_owned.n_elements() != locally_owned.size()) { // Create sparsity pattern from dsp by transferring its indices to // processor-local index space and doing Cuthill-McKee there @@ -419,11 +423,14 @@ namespace DoFRenumbering for (unsigned int i=0; icolumn() != row && locally_owned.is_element(it->column())) - row_entries.push_back(locally_owned.index_within_set(it->column())); + for (unsigned int j=0; j 1 template - void + void DoFTools::extract_locally_relevant_dofs > (const DoFHandler & dof_handler, IndexSet & dof_set); #endif +#if deal_II_dimension > 2 + template + void + DoFTools::extract_locally_relevant_dofs > + (const DoFHandler & dof_handler, + IndexSet & dof_set); +#endif + template void DoFTools::make_vertex_patches (SparsityPattern&, const DoFHandler&, unsigned int, bool, bool, bool, bool); @@ -207,7 +215,7 @@ void DoFTools::extract_locally_relevant_dofs > (const DoFHandler & dof_handler, IndexSet & dof_set); - + template void DoFTools::extract_locally_relevant_dofs > @@ -257,7 +265,7 @@ void DoFTools::get_subdomain_association > (const hp::DoFHandler &dof_handler, std::vector &subdomain_association); - + template std::vector DoFTools::locally_owned_dofs_per_subdomain > @@ -368,7 +376,7 @@ void DoFTools::get_subdomain_association > (const hp::DoFHandler &dof_handler, std::vector &subdomain_association); - + template std::vector DoFTools::locally_owned_dofs_per_subdomain > @@ -422,7 +430,7 @@ void DoFTools::get_subdomain_association > (const hp::DoFHandler<1,3> &dof_handler, std::vector &subdomain_association); - + template std::vector DoFTools::locally_owned_dofs_per_subdomain > -- 2.39.5