From b95fa56407bf97758976ea05656bec2b583ccd79 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 22 Jan 2011 20:37:16 +0000 Subject: [PATCH] Change a bunch of places where we accidentally used 'unsigned int' instead of types::subdomain_id_t. Also: The DoFTools::fe_is_primitive function happened to return an unsigned int -- when I suppose it should have been a bool. git-svn-id: https://svn.dealii.org/trunk@23241 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/dofs/dof_tools.h | 14 ++++++++------ deal.II/source/dofs/dof_handler_policy.cc | 4 ++-- deal.II/source/dofs/dof_renumbering.cc | 4 ++-- deal.II/source/dofs/dof_tools.cc | 10 +++++----- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/deal.II/include/deal.II/dofs/dof_tools.h b/deal.II/include/deal.II/dofs/dof_tools.h index 39f8fde9ed..940033f53e 100644 --- a/deal.II/include/deal.II/dofs/dof_tools.h +++ b/deal.II/include/deal.II/dofs/dof_tools.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -311,7 +311,7 @@ class DoFTools * property. */ template - static unsigned int + static bool fe_is_primitive (const DoFHandler &dh); /** @@ -325,7 +325,7 @@ class DoFTools * property. */ template - static unsigned int + static bool fe_is_primitive (const hp::DoFHandler &dh); /** @@ -781,7 +781,7 @@ class DoFTools SparsityPattern &sparsity_pattern, const ConstraintMatrix &constraints, const bool keep_constrained_dofs = true, - const unsigned int subdomain_id = numbers::invalid_unsigned_int); + const types::subdomain_id_t subdomain_id = numbers::invalid_unsigned_int); /** * This function does the same as @@ -2205,7 +2205,8 @@ DoFTools::n_components (const DoFHandler &dh) template -inline unsigned int +inline +bool DoFTools::fe_is_primitive (const DoFHandler &dh) { return dh.get_fe().is_primitive(); @@ -2245,7 +2246,8 @@ DoFTools::n_components (const hp::DoFHandler &dh) template -inline unsigned int +inline +bool DoFTools::fe_is_primitive (const hp::DoFHandler &dh) { return dh.get_fe()[0].is_primitive(); diff --git a/deal.II/source/dofs/dof_handler_policy.cc b/deal.II/source/dofs/dof_handler_policy.cc index 845eda1fe9..f4458edc34 100644 --- a/deal.II/source/dofs/dof_handler_policy.cc +++ b/deal.II/source/dofs/dof_handler_policy.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -226,7 +226,7 @@ namespace internal static unsigned int distribute_dofs (const unsigned int offset, - const unsigned int subdomain_id, + const types::subdomain_id_t subdomain_id, DoFHandler &dof_handler) { const dealii::Triangulation & tria diff --git a/deal.II/source/dofs/dof_renumbering.cc b/deal.II/source/dofs/dof_renumbering.cc index 5678099c13..1eb552c568 100644 --- a/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/source/dofs/dof_renumbering.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -848,7 +848,7 @@ namespace DoFRenumbering for (unsigned int c=0; clocally_owned_subdomain(); ++i) + for (types::subdomain_id_t i=0; ilocally_owned_subdomain(); ++i) shifts[c] += all_dof_counts[c+n_buckets*i]; for (unsigned int i=0; iget_communicator()); ++i) cumulated += all_dof_counts[c+n_buckets*i]; diff --git a/deal.II/source/dofs/dof_tools.cc b/deal.II/source/dofs/dof_tools.cc index e9eddeeac8..bfe2586085 100644 --- a/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/source/dofs/dof_tools.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -58,7 +58,7 @@ DoFTools::make_sparsity_pattern (const DH &dof, SparsityPattern &sparsity, const ConstraintMatrix &constraints, const bool keep_constrained_dofs, - const unsigned int subdomain_id) + const types::subdomain_id_t subdomain_id) { const unsigned int n_dofs = dof.n_dofs(); @@ -495,7 +495,7 @@ DoFTools::make_flux_sparsity_pattern (const DH &dof, SparsityPattern &sparsity, const ConstraintMatrix &constraints, const bool keep_constrained_dofs, - const unsigned int subdomain_id) + const types::subdomain_id_t subdomain_id) { const unsigned int n_dofs = dof.n_dofs(); @@ -522,7 +522,7 @@ DoFTools::make_flux_sparsity_pattern (const DH &dof, // current cell is owned by the calling // processor. Otherwise, just continue. for (; cell!=endc; ++cell) - if ((subdomain_id == numbers::invalid_unsigned_int) + if ((subdomain_id == types::invalid_subdomain_id) || (subdomain_id == cell->subdomain_id())) { @@ -4198,7 +4198,7 @@ DoFTools::count_dofs_with_subdomain_association (const DH &dof_handler } #endif - std::vector subdomain_association (dof_handler.n_dofs()); + std::vector subdomain_association (dof_handler.n_dofs()); get_subdomain_association (dof_handler, subdomain_association); std::vector component_association (dof_handler.n_dofs()); -- 2.39.5