From 4978dcb341681af9ae4528c48b0e9f66cb14b01b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 27 Oct 2016 12:37:59 -0500 Subject: [PATCH] Be consistent about using types::subdomain_id. --- include/deal.II/dofs/dof_tools.h | 2 +- source/dofs/dof_handler_policy.cc | 4 +-- source/dofs/dof_tools.cc | 2 +- source/dofs/dof_tools_sparsity.inst.in | 38 ++++++++++---------- source/multigrid/mg_level_global_transfer.cc | 6 ++-- source/numerics/error_estimator.inst.in | 18 +++++----- source/numerics/error_estimator_1d.inst.in | 18 +++++----- 7 files changed, 45 insertions(+), 43 deletions(-) diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 1816cca7a2..09b6849308 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -623,7 +623,7 @@ namespace DoFTools SparsityPatternType &sparsity_pattern, const ConstraintMatrix &constraints, const bool keep_constrained_dofs = true, - const types::subdomain_id subdomain_id = numbers::invalid_unsigned_int); + const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id); /** * This function does essentially the same as the other diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 9b19530df9..a2004fd2f0 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -1599,10 +1599,10 @@ namespace internal const std::vector &p4est_tree_to_coarse_cell_permutation) { // build list of cells to request for each neighbor - std::set level_ghost_owners = tria.level_ghost_owners(); + std::set level_ghost_owners = tria.level_ghost_owners(); typedef std::map::cellinfo> cellmap_t; cellmap_t neighbor_cell_list; - for (std::set::iterator it = level_ghost_owners.begin(); + for (std::set::iterator it = level_ghost_owners.begin(); it != level_ghost_owners.end(); ++it) neighbor_cell_list.insert(std::make_pair(*it, typename types::cellinfo())); diff --git a/source/dofs/dof_tools.cc b/source/dofs/dof_tools.cc index 090ca73cf8..90e1a0b00a 100644 --- a/source/dofs/dof_tools.cc +++ b/source/dofs/dof_tools.cc @@ -1376,7 +1376,7 @@ namespace DoFTools // one, where we take "random" to be "once this way once that way" for (unsigned int i=0; i, SP> @@ -129,7 +129,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &sparsity, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -138,7 +138,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -147,7 +147,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -189,7 +189,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &sparsity, const Table<2,Coupling>&, const Table<2,Coupling>&, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_flux_sparsity_pattern,SP> @@ -199,21 +199,23 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) const bool, const Table<2,Coupling>&, const Table<2,Coupling>&, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_flux_sparsity_pattern,SP> (const DoFHandler &dof, SP &sparsity, const ConstraintMatrix &constraints, - const bool, const unsigned int); + const bool, + const types::subdomain_id); template void DoFTools::make_flux_sparsity_pattern,SP> (const hp::DoFHandler &dof, SP &sparsity, const ConstraintMatrix &constraints, - const bool, const unsigned int); + const bool, + const types::subdomain_id); #if deal_II_dimension > 1 @@ -223,7 +225,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &sparsity, const Table<2,Coupling>&, const Table<2,Coupling>&, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_flux_sparsity_pattern,SP> @@ -233,7 +235,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) const bool, const Table<2,Coupling>&, const Table<2,Coupling>&, - const unsigned int); + const types::subdomain_id); #endif @@ -245,7 +247,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &sparsity, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -253,7 +255,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &sparsity, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -262,7 +264,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -271,7 +273,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -308,7 +310,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &sparsity, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -316,7 +318,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &sparsity, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -325,7 +327,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> @@ -334,7 +336,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) SP &, const ConstraintMatrix &, const bool, - const unsigned int); + const types::subdomain_id); template void DoFTools::make_sparsity_pattern, SP> diff --git a/source/multigrid/mg_level_global_transfer.cc b/source/multigrid/mg_level_global_transfer.cc index a74eb04a7a..d23ef3fba6 100644 --- a/source/multigrid/mg_level_global_transfer.cc +++ b/source/multigrid/mg_level_global_transfer.cc @@ -172,13 +172,13 @@ namespace // inefficient. Please fix this, Timo. // The list of neighbors is symmetric (our neighbors have us as a neighbor), // so we can use it to send and to know how many messages we will get. - std::set neighbors = tria->level_ghost_owners(); + std::set neighbors = tria->level_ghost_owners(); std::map > send_data; // * find owners of the level dofs and insert into send_data accordingly for (typename std::vector::iterator dofpair=send_data_temp.begin(); dofpair != send_data_temp.end(); ++dofpair) { - std::set::iterator it; + std::set::iterator it; for (it = neighbors.begin(); it != neighbors.end(); ++it) { if (mg_dof.locally_owned_mg_dofs_per_processor(dofpair->level)[*it].is_element(dofpair->level_dof_index)) @@ -195,7 +195,7 @@ namespace // * send std::vector requests; { - for (std::set::iterator it = neighbors.begin(); it != neighbors.end(); ++it) + for (std::set::iterator it = neighbors.begin(); it != neighbors.end(); ++it) { requests.push_back(MPI_Request()); unsigned int dest = *it; diff --git a/source/numerics/error_estimator.inst.in b/source/numerics/error_estimator.inst.in index 8524aeeaef..a6975a1d9f 100644 --- a/source/numerics/error_estimator.inst.in +++ b/source/numerics/error_estimator.inst.in @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2015 by the deal.II authors +// Copyright (C) 2010 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -37,7 +37,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); @@ -53,7 +53,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); @@ -69,7 +69,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); @@ -85,7 +85,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); @@ -101,7 +101,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); @@ -117,7 +117,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); @@ -133,7 +133,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); @@ -149,7 +149,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id, const KellyErrorEstimator::Strategy); diff --git a/source/numerics/error_estimator_1d.inst.in b/source/numerics/error_estimator_1d.inst.in index 66fc0420c3..40a2a6ee3c 100644 --- a/source/numerics/error_estimator_1d.inst.in +++ b/source/numerics/error_estimator_1d.inst.in @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2014 by the deal.II authors +// Copyright (C) 2010 - 2014, 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -30,7 +30,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); template @@ -45,7 +45,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); template @@ -60,7 +60,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); template @@ -75,7 +75,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); template @@ -90,7 +90,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); template @@ -105,7 +105,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); template @@ -120,7 +120,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); template @@ -135,7 +135,7 @@ for (VEC : SERIAL_VECTORS ; deal_II_dimension : DIMENSIONS; deal_II_space_dimens const ComponentMask &, const Function *, const unsigned int , - const unsigned int , + const types::subdomain_id, const types::material_id); #endif -- 2.39.5