From: Wolfgang Bangerth Date: Sat, 11 Apr 2015 23:25:05 +0000 (-0500) Subject: Use the non-deprecated version *_boundary_id() instead of *_boundary_indicators(). X-Git-Tag: v8.3.0-rc1~288^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ed6ec8fa80a017316ecaa9786992f90b74f3cc5;p=dealii.git Use the non-deprecated version *_boundary_id() instead of *_boundary_indicators(). --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 2a5876482a..631b473274 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -352,6 +352,18 @@ inconvenience this causes.
    +
  1. Deprecated: The library uses functions such as CellAccessor::subdomain_id(), + TriaAccessor::manifold_id(), etc, but used the deviant spelling + TriaAccessor::boundary_indicator(), TriaAccessor::set_boundary_indicator(), + TriaAccessor::set_all_boundary_indicators(). These last three functions are now + deprecated and have been replaced by TriaAccessor::boundary_id(), + TriaAccessor::set_boundary_id(), and TriaAccessor::set_all_boundary_ids() for + consistency. Similar, Triangulation::get_boundary_indicators() has been + deprecated in favor of Triangulation::get_boundary_ids(). +
    + (Wolfgang Bangerth, 2015/04/11) +
  2. +
  3. Changed: All example programs used to have calls to set_boundary() methods to deal with curved boundaries. These have been replaced with the corresponding set_manifold() equivalent. diff --git a/examples/step-18/step-18.cc b/examples/step-18/step-18.cc index d4c1fe9470..d059460033 100644 --- a/examples/step-18/step-18.cc +++ b/examples/step-18/step-18.cc @@ -823,16 +823,16 @@ namespace Step18 const Point face_center = cell->face(f)->center(); if (face_center[2] == 0) - cell->face(f)->set_boundary_indicator (0); + cell->face(f)->set_boundary_id (0); else if (face_center[2] == 3) - cell->face(f)->set_boundary_indicator (1); + cell->face(f)->set_boundary_id (1); else if (std::sqrt(face_center[0]*face_center[0] + face_center[1]*face_center[1]) < (inner_radius + outer_radius) / 2) - cell->face(f)->set_boundary_indicator (2); + cell->face(f)->set_boundary_id (2); else - cell->face(f)->set_boundary_indicator (3); + cell->face(f)->set_boundary_id (3); } // In order to make sure that new vertices are placed correctly on diff --git a/examples/step-22/step-22.cc b/examples/step-22/step-22.cc index beb787b990..fabd908c85 100644 --- a/examples/step-22/step-22.cc +++ b/examples/step-22/step-22.cc @@ -954,7 +954,7 @@ namespace Step22 cell != triangulation.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->center()[dim-1] == 0) - cell->face(f)->set_all_boundary_indicators(1); + cell->face(f)->set_all_boundary_ids(1); // We then apply an initial refinement before solving for the first diff --git a/examples/step-29/step-29.cc b/examples/step-29/step-29.cc index f44b57db0b..aaa0049c34 100644 --- a/examples/step-29/step-29.cc +++ b/examples/step-29/step-29.cc @@ -494,7 +494,7 @@ namespace Step29 ((cell->face(face)->center() - transducer).norm_square() < 0.01) ) { - cell->face(face)->set_boundary_indicator (1); + cell->face(face)->set_boundary_id (1); cell->face(face)->set_manifold_id (1); } // For the circle part of the transducer lens, a hyper-ball object is used @@ -709,7 +709,7 @@ namespace Step29 // absorbing boundary conditions: for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary() && - (cell->face(face)->boundary_indicator() == 0) ) + (cell->face(face)->boundary_id() == 0) ) { diff --git a/examples/step-3/doc/results.dox b/examples/step-3/doc/results.dox index 72d17c2d2c..a890cadee4 100644 --- a/examples/step-3/doc/results.dox +++ b/examples/step-3/doc/results.dox @@ -102,7 +102,7 @@ suggestions: of the boundary different indicators. For example, try this immediately after calling GridGenerator::hyper_cube: @code - triangulation.begin_active()->face(0)->set_boundary_indicator(1); + triangulation.begin_active()->face(0)->set_boundary_id(1); @endcode What this does is it first asks the triangulation to return an iterator that points to the first active cell. Of course, diff --git a/examples/step-33/step-33.cc b/examples/step-33/step-33.cc index 56ff286bf7..2cf8554416 100644 --- a/examples/step-33/step-33.cc +++ b/examples/step-33/step-33.cc @@ -1490,7 +1490,7 @@ namespace Step33 dof_indices, std::vector(), true, - cell->face(face_no)->boundary_indicator(), + cell->face(face_no)->boundary_id(), cell->face(face_no)->diameter()); } diff --git a/examples/step-35/step-35.cc b/examples/step-35/step-35.cc index 2d4933fb38..e0e9fb5d19 100644 --- a/examples/step-35/step-35.cc +++ b/examples/step-35/step-35.cc @@ -412,7 +412,7 @@ namespace Step35 EquationData::Velocity vel_exact; std::map boundary_values; - std::vector boundary_indicators; + std::vector boundary_ids; Triangulation triangulation; @@ -709,7 +709,7 @@ namespace Step35 std::cout << "Number of active cells: " << triangulation.n_active_cells() << std::endl; - boundary_indicators = triangulation.get_boundary_indicators(); + boundary_ids = triangulation.get_boundary_ids(); dof_handler_velocity.distribute_dofs (fe_velocity); DoFRenumbering::boost::Cuthill_McKee (dof_handler_velocity); @@ -1022,8 +1022,8 @@ namespace Step35 vel_exact.set_component(d); boundary_values.clear(); for (std::vector::const_iterator - boundaries = boundary_indicators.begin(); - boundaries != boundary_indicators.end(); + boundaries = boundary_ids.begin(); + boundaries != boundary_ids.end(); ++boundaries) { switch (*boundaries) diff --git a/examples/step-42/step-42.cc b/examples/step-42/step-42.cc index 64de7f14b1..939bd7dcdd 100644 --- a/examples/step-42/step-42.cc +++ b/examples/step-42/step-42.cc @@ -938,7 +938,7 @@ namespace Step42 GridGenerator::hyper_rectangle(triangulation, p1, p2); - /* boundary_indicators: + /* boundary_ids: */ Triangulation<3>::active_cell_iterator @@ -949,14 +949,14 @@ namespace Step42 ++face) { if (cell->face(face)->center()[2] == p2(2)) - cell->face(face)->set_boundary_indicator(1); + cell->face(face)->set_boundary_id(1); if (cell->face(face)->center()[0] == p1(0) || cell->face(face)->center()[0] == p2(0) || cell->face(face)->center()[1] == p1(1) || cell->face(face)->center()[1] == p2(1)) - cell->face(face)->set_boundary_indicator(8); + cell->face(face)->set_boundary_id(8); if (cell->face(face)->center()[2] == p1(2)) - cell->face(face)->set_boundary_indicator(6); + cell->face(face)->set_boundary_id(6); } } @@ -1153,7 +1153,7 @@ namespace Step42 ++face) if (cell->face(face)->at_boundary() && - cell->face(face)->boundary_indicator() == 1) + cell->face(face)->boundary_id() == 1) { fe_values_face.reinit(cell, face); cell_matrix = 0; @@ -1243,7 +1243,7 @@ namespace Step42 for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary() && - cell->face(face)->boundary_indicator() == 1) + cell->face(face)->boundary_id() == 1) { fe_values_face.reinit(cell, face); cell->face(face)->get_dof_indices(dof_indices); @@ -1422,7 +1422,7 @@ namespace Step42 for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary() && - cell->face(face)->boundary_indicator() == 1) + cell->face(face)->boundary_id() == 1) { fe_values_face.reinit(cell, face); @@ -1554,7 +1554,7 @@ namespace Step42 for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face(face)->at_boundary() - && cell->face(face)->boundary_indicator() == 1) + && cell->face(face)->boundary_id() == 1) { fe_values_face.reinit(cell, face); @@ -2103,7 +2103,7 @@ namespace Step42 for (unsigned int face = 0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary() && - cell->face(face)->boundary_indicator() == 1) + cell->face(face)->boundary_id() == 1) { fe_values_face.reinit(cell, face); diff --git a/examples/step-44/step-44.cc b/examples/step-44/step-44.cc index 10bd48c859..5e77aa5577 100644 --- a/examples/step-44/step-44.cc +++ b/examples/step-44/step-44.cc @@ -1543,7 +1543,7 @@ namespace Step44 if (cell->face(face)->center()[0] < 0.5 * parameters.scale && cell->face(face)->center()[1] < 0.5 * parameters.scale) - cell->face(face)->set_boundary_indicator(6); + cell->face(face)->set_boundary_id(6); } @@ -2372,7 +2372,7 @@ namespace Step44 for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face(face)->at_boundary() == true - && cell->face(face)->boundary_indicator() == 6) + && cell->face(face)->boundary_id() == 6) { scratch.fe_face_values_ref.reinit(cell, face); diff --git a/examples/step-45/step-45.cc b/examples/step-45/step-45.cc index 7acf22240d..24c8bf4a29 100644 --- a/examples/step-45/step-45.cc +++ b/examples/step-45/step-45.cc @@ -150,8 +150,8 @@ namespace Step45 void LaplaceProblem::make_grid_and_dofs () { GridGenerator::hyper_cube (triangulation); - triangulation.begin_active ()->face (2)->set_boundary_indicator (1); - triangulation.begin_active ()->face (3)->set_boundary_indicator (1); + triangulation.begin_active ()->face (2)->set_boundary_id (1); + triangulation.begin_active ()->face (3)->set_boundary_id (1); triangulation.refine_global (5); // The next step is to distribute the degrees of freedom and produce a diff --git a/examples/step-46/step-46.cc b/examples/step-46/step-46.cc index abca6c360f..31b6e51886 100644 --- a/examples/step-46/step-46.cc +++ b/examples/step-46/step-46.cc @@ -321,7 +321,7 @@ namespace Step46 if (cell->face(f)->at_boundary() && (cell->face(f)->center()[dim-1] == 1)) - cell->face(f)->set_all_boundary_indicators(1); + cell->face(f)->set_all_boundary_ids(1); for (typename Triangulation::active_cell_iterator diff --git a/examples/step-49/doc/results.dox b/examples/step-49/doc/results.dox index f418c219a4..31824d9630 100644 --- a/examples/step-49/doc/results.dox +++ b/examples/step-49/doc/results.dox @@ -276,12 +276,12 @@ describe this. A first attempt looks like this: { if ((face_center[2] <= 2.5 || face_center[2] >= 5) && face_center[1] >= 3) - cell->face(f)->set_boundary_indicator(8); + cell->face(f)->set_boundary_id(8); if (face_center[2] >= 2.5 && face_center[2] <= 5 && face_center[1] >= 3) - cell->face(f)->set_boundary_indicator(9); + cell->face(f)->set_boundary_id(9); } } @@ -325,8 +325,8 @@ mid-edge points are in the wrong place (you see this by comparing the picture with the one of the coarse mesh). What is happening is that we are only telling the triangulation to use these geometry objects for the faces but not for the adjacent edges as well. This is -easily fixed by using the function TriaAccessor::set_all_boundary_indicators() -instead of TriaAccessor::set_boundary_indicator() used above. With this change, +easily fixed by using the function TriaAccessor::set_all_boundary_ids() +instead of TriaAccessor::set_boundary_id() used above. With this change, the grid now looks like this: 5) && face_center[1] >= 3) - cell->face(f)->set_all_boundary_indicators(8); + cell->face(f)->set_all_boundary_ids(8); if (face_center[2] > 2.5 && face_center[2] < 5 && face_center[1] >= 3) - cell->face(f)->set_all_boundary_indicators(9); + cell->face(f)->set_all_boundary_ids(9); } } } diff --git a/examples/step-49/step-49.cc b/examples/step-49/step-49.cc index 1e5bdaead5..e4bedf5d07 100644 --- a/examples/step-49/step-49.cc +++ b/examples/step-49/step-49.cc @@ -80,7 +80,7 @@ void mesh_info(const Triangulation &tria, for (unsigned int face=0; face::faces_per_cell; ++face) { if (cell->face(face)->at_boundary()) - boundary_count[cell->face(face)->boundary_indicator()]++; + boundary_count[cell->face(face)->boundary_id()]++; } } diff --git a/examples/step-51/step-51.cc b/examples/step-51/step-51.cc index d6c7ff72ca..8581cfcf6d 100644 --- a/examples/step-51/step-51.cc +++ b/examples/step-51/step-51.cc @@ -882,7 +882,7 @@ namespace Step51 if (cell->face(face)->at_boundary() && - (cell->face(face)->boundary_indicator() == 1)) + (cell->face(face)->boundary_id() == 1)) { const double neumann_value = - scratch.exact_solution.gradient (quadrature_point) * normal @@ -1323,7 +1323,7 @@ namespace Step51 if ((std::fabs(cell->face(face)->center()(0) - (-1)) < 1e-12) || (std::fabs(cell->face(face)->center()(1) - (-1)) < 1e-12)) - cell->face(face)->set_boundary_indicator (1); + cell->face(face)->set_boundary_id (1); } // @sect4{HDG::run} diff --git a/examples/step-52/step-52.cc b/examples/step-52/step-52.cc index 10071ebdc6..47a9289be9 100644 --- a/examples/step-52/step-52.cc +++ b/examples/step-52/step-52.cc @@ -614,9 +614,9 @@ namespace Step52 if (cell->face(f)->at_boundary()) { if ((cell->face(f)->center()[0]==0.) || (cell->face(f)->center()[0]==5.)) - cell->face(f)->set_boundary_indicator(1); + cell->face(f)->set_boundary_id(1); else - cell->face(f)->set_boundary_indicator(0); + cell->face(f)->set_boundary_id(0); } // Next, we set up the linear systems and fill them with content so that diff --git a/examples/step-53/step-53.cc b/examples/step-53/step-53.cc index 2e5822fae7..2db49a7df3 100644 --- a/examples/step-53/step-53.cc +++ b/examples/step-53/step-53.cc @@ -413,7 +413,7 @@ namespace Step53 for (Triangulation<3>::active_cell_iterator cell=triangulation.begin_active(); cell!=triangulation.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->face(f)->boundary_indicator() == 5) + if (cell->face(f)->boundary_id() == 5) { cell->set_refine_flag (); break; diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index d2996618a6..99c677258d 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -668,7 +668,7 @@ namespace Step7 for (unsigned int face_number=0; face_number::faces_per_cell; ++face_number) if (cell->face(face_number)->at_boundary() && - (cell->face(face_number)->boundary_indicator() == 1)) + (cell->face(face_number)->boundary_id() == 1)) { // If we came into here, then we have found an external face // belonging to Gamma2. Next, we have to compute the values of @@ -991,7 +991,7 @@ namespace Step7 if ((std::fabs(cell->face(face_number)->center()(0) - (-1)) < 1e-12) || (std::fabs(cell->face(face_number)->center()(1) - (-1)) < 1e-12)) - cell->face(face_number)->set_boundary_indicator (1); + cell->face(face_number)->set_boundary_id (1); } else refine_grid (); diff --git a/include/deal.II/distributed/tria.h b/include/deal.II/distributed/tria.h index 4ff5a9e68c..495a9566ac 100644 --- a/include/deal.II/distributed/tria.h +++ b/include/deal.II/distributed/tria.h @@ -242,7 +242,7 @@ namespace parallel * #include * * template - * void set_boundary_indicators (parallel::distributed::Triangulation &triangulation) + * void set_boundary_ids (parallel::distributed::Triangulation &triangulation) * { * ... set boundary indicators on the triangulation object ... * } @@ -255,7 +255,7 @@ namespace parallel * ... create the coarse mesh ... * * coarse_grid.signals.post_refinement.connect - * (std_cxx11::bind (&set_boundary_indicators, + * (std_cxx11::bind (&set_boundary_ids, * std_cxx11::ref(coarse_grid))); * * } @@ -267,7 +267,7 @@ namespace parallel * argument but permanently fix this one argument to a reference to the * coarse grid triangulation. After each refinement step, the * triangulation will then call the object so created which will in turn - * call set_boundary_indicators with the reference to + * call set_boundary_ids with the reference to * the coarse grid as argument. * * This approach can be generalized. In the example above, we have used a @@ -275,7 +275,7 @@ namespace parallel * that this function is in fact a member function of the class that * generates the mesh, for example because it needs to access run-time * parameters. This can be achieved as follows: assuming the - * set_boundary_indicators() function has been declared as a + * set_boundary_ids() function has been declared as a * (non-static, but possibly private) member function of the * MyClass class, then the following will work: * @code @@ -284,7 +284,7 @@ namespace parallel * template * void * MyClass:: - * set_boundary_indicators (parallel::distributed::Triangulation &triangulation) const + * set_boundary_ids (parallel::distributed::Triangulation &triangulation) const * { * ... set boundary indicators on the triangulation object ... * } @@ -297,21 +297,21 @@ namespace parallel * ... create the coarse mesh ... * * coarse_grid.signals.post_refinement.connect - * (std_cxx11::bind (&MyGeometry::set_boundary_indicators, + * (std_cxx11::bind (&MyGeometry::set_boundary_ids, * std_cxx11::cref(*this), * std_cxx11::ref(coarse_grid))); * } * @endcode * Here, like any other member function, - * set_boundary_indicators implicitly takes a pointer or + * set_boundary_ids implicitly takes a pointer or * reference to the object it belongs to as first argument. * std::bind again creates an object that can be called like * a global function with no arguments, and this object in turn calls - * set_boundary_indicators with a pointer to the current + * set_boundary_ids with a pointer to the current * object and a reference to the triangulation to work on. Note that * because the create_coarse_mesh function is declared as * const, it is necessary that the - * set_boundary_indicators function is also declared + * set_boundary_ids function is also declared * const. * * Note:For reasons that have to do with the way the diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index 3625041aab..b515a91899 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -706,14 +706,14 @@ public: * function. */ types::global_dof_index - n_boundary_dofs (const FunctionMap &boundary_indicators) const; + n_boundary_dofs (const FunctionMap &boundary_ids) const; /** * Same function, but with different data type of the argument, which is * here simply a list of the boundary indicators under consideration. */ types::global_dof_index - n_boundary_dofs (const std::set &boundary_indicators) const; + n_boundary_dofs (const std::set &boundary_ids) const; /** * Access to an object informing of the block structure of the dof handler. diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index fa2b2df70e..ddf74145ea 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -558,7 +558,7 @@ namespace DoFTools template void make_boundary_sparsity_pattern (const DH &dof, - const typename FunctionMap::type &boundary_indicators, + const typename FunctionMap::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SparsityPattern &sparsity); @@ -1027,7 +1027,7 @@ namespace DoFTools * @ref GlossFaceOrientation "standard orientation". * * Instead of defining a 'first' and 'second' boundary with the help of two - * boundary_indicators this function defines a 'left' boundary as all faces + * boundary_ids this function defines a 'left' boundary as all faces * with local face index 2*dimension and boundary indicator @p * b_id and, similarly, a 'right' boundary consisting of all face with local * face index 2*dimension+1 and boundary indicator @p b_id. @@ -1202,7 +1202,7 @@ namespace DoFTools * of freedom is at the boundary and belongs to one of the selected * components, and @p false otherwise. The function is used in step-15. * - * By specifying the @p boundary_indicator variable, you can select which + * By specifying the @p boundary_id variable, you can select which * boundary indicators the faces have to have on which the degrees of * freedom are located that shall be extracted. If it is an empty list, then * all boundary indicators are accepted. @@ -1236,8 +1236,8 @@ namespace DoFTools * contain the indices of degrees of freedom that are located on the * boundary (and correspond to the selected vector components and boundary * indicators, depending on the values of the @p component_mask and @p - * boundary_indicators arguments). - * @param boundary_indicators If empty, this function extracts the indices + * boundary_ids arguments). + * @param boundary_ids If empty, this function extracts the indices * of the degrees of freedom for all parts of the boundary. If it is a non- * empty list, then the function only considers boundary faces with the * boundary indicators listed in this argument. @@ -1250,7 +1250,7 @@ namespace DoFTools extract_boundary_dofs (const DH &dof_handler, const ComponentMask &component_mask, std::vector &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_ids = std::set()); /** * This function does the same as the previous one but it returns its result @@ -1273,8 +1273,8 @@ namespace DoFTools * contain the indices of degrees of freedom that are located on the * boundary (and correspond to the selected vector components and boundary * indicators, depending on the values of the @p component_mask and @p - * boundary_indicators arguments). - * @param boundary_indicators If empty, this function extracts the indices + * boundary_ids arguments). + * @param boundary_ids If empty, this function extracts the indices * of the degrees of freedom for all parts of the boundary. If it is a non- * empty list, then the function only considers boundary faces with the * boundary indicators listed in this argument. @@ -1287,7 +1287,7 @@ namespace DoFTools extract_boundary_dofs (const DH &dof_handler, const ComponentMask &component_mask, IndexSet &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_ids = std::set()); /** * This function is similar to the extract_boundary_dofs() function but it @@ -1310,7 +1310,7 @@ namespace DoFTools extract_dofs_with_support_on_boundary (const DH &dof_handler, const ComponentMask &component_mask, std::vector &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_ids = std::set()); /** * Extract a vector that represents the constant modes of the DoFHandler for @@ -1906,7 +1906,7 @@ namespace DoFTools template void map_dof_to_boundary_indices (const DH &dof_handler, - const std::set &boundary_indicators, + const std::set &boundary_ids, std::vector &mapping); /** @@ -2031,7 +2031,7 @@ namespace DoFTools * A variant of this function with different arguments is used in step-36. * * @param dof The DoFHandler to work on. - * @param boundary_indicator The indicator of that part of the boundary for + * @param boundary_id The indicator of that part of the boundary for * which constraints should be computed. If this number equals * numbers::invalid_boundary_id then all boundaries of the domain will be * treated. @@ -2064,7 +2064,7 @@ namespace DoFTools template class DH> void make_zero_boundary_constraints (const DH &dof, - const types::boundary_id boundary_indicator, + const types::boundary_id boundary_id, ConstraintMatrix &zero_boundary_constraints, const ComponentMask &component_mask = ComponentMask()); diff --git a/include/deal.II/grid/grid_generator.h b/include/deal.II/grid/grid_generator.h index c219ed3d0b..e77f265252 100644 --- a/include/deal.II/grid/grid_generator.h +++ b/include/deal.II/grid/grid_generator.h @@ -99,7 +99,7 @@ namespace GridGenerator * Create a coordinate-parallel brick from the two diagonally opposite * corner points @p p1 and @p p2. * - * If the @p colorize flag is set, the @p boundary_indicators of the + * If the @p colorize flag is set, the @p boundary_ids of the * surfaces are assigned, such that the lower one in @p x-direction is 0, * the upper one is 1. The indicators for the surfaces in @p y-direction are * 2 and 3, the ones for @p z are 4 and 5. Additionally, material ids are @@ -127,7 +127,7 @@ namespace GridGenerator * a list of integers denoting the number of subdivisions in each coordinate * direction. * - * If the @p colorize flag is set, the @p boundary_indicators of the + * If the @p colorize flag is set, the @p boundary_ids of the * surfaces are assigned, such that the lower one in @p x-direction is 0, * the upper one is 1 (the left and the right vertical face). The indicators * for the surfaces in @p y-direction are 2 and 3, the ones for @p z are 4 diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index c51e06208a..a51822ebaf 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -1115,7 +1115,7 @@ namespace GridTools * @ref GlossFaceOrientation "standard orientation". * * Instead of defining a 'first' and 'second' boundary with the help of two - * boundary_indicators this function defines a 'left' boundary as all faces + * boundary_ids this function defines a 'left' boundary as all faces * with local face index 2*dimension and boundary indicator @p * b_id and, similarly, a 'right' boundary consisting of all face with local * face index 2*dimension+1 and boundary indicator @p b_id. diff --git a/include/deal.II/hp/dof_handler.h b/include/deal.II/hp/dof_handler.h index 4dda6a8fc0..6c6a0de394 100644 --- a/include/deal.II/hp/dof_handler.h +++ b/include/deal.II/hp/dof_handler.h @@ -527,14 +527,14 @@ namespace hp * function. */ types::global_dof_index - n_boundary_dofs (const FunctionMap &boundary_indicators) const; + n_boundary_dofs (const FunctionMap &boundary_ids) const; /** * Same function, but with different data type of the argument, which is * here simply a list of the boundary indicators under consideration. */ types::global_dof_index - n_boundary_dofs (const std::set &boundary_indicators) const; + n_boundary_dofs (const std::set &boundary_ids) const; /** * Return the number of degrees of freedom that belong to this process. diff --git a/include/deal.II/numerics/vector_tools.h b/include/deal.II/numerics/vector_tools.h index 8ce08b1a38..b4c5c2b041 100644 --- a/include/deal.II/numerics/vector_tools.h +++ b/include/deal.II/numerics/vector_tools.h @@ -653,7 +653,7 @@ namespace VectorTools * * The parameter @p function_map provides a list of boundary indicators to * be handled by this function and corresponding boundary value functions. - * The keys of this map correspond to the number @p boundary_indicator of + * The keys of this map correspond to the number @p boundary_id of * the face. numbers::internal_face_boundary_id is an illegal value for * this key since it is reserved for interior faces. * @@ -784,7 +784,7 @@ namespace VectorTools * @ref constraints. * * The parameter @p boundary_component corresponds to the number @p - * boundary_indicator of the face. + * boundary_id of the face. * * The flags in the last parameter, @p component_mask denote which * components of the finite element space shall be interpolated. If it is @@ -1063,7 +1063,7 @@ namespace VectorTools * $z$-component. * * The parameter @p boundary_component corresponds to the number @p - * boundary_indicator of the face. numbers::internal_face_boundary_id is an + * boundary_id of the face. numbers::internal_face_boundary_id is an * illegal value, since it is reserved for interior faces. * * The last argument is denoted to compute the normal vector $\vec{n}$ at @@ -1180,7 +1180,7 @@ namespace VectorTools * that are ordered in the same way as we usually order the coordinate directions, * i.e. $x$-, $y$-, and finally $z$-component. * - * The parameter @p boundary_component corresponds to the number @p boundary_indicator + * The parameter @p boundary_component corresponds to the number @p boundary_id * of the face. numbers::internal_face_boundary_id is an illegal value, since it is * reserved for interior faces. * @@ -1245,7 +1245,7 @@ namespace VectorTools * $z$-component. * * The parameter @p boundary_component corresponds to the @p - * boundary_indicator of the faces where the boundary conditions are + * boundary_id of the faces where the boundary conditions are * applied. numbers::internal_face_boundary_id is an illegal value, since it * is reserved for interior faces. The @p mapping is used to compute the * normal vector $\vec{n}$ at the boundary points. @@ -1719,7 +1719,7 @@ namespace VectorTools const Quadrature &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_ids = std::set()); /** * Calls the create_boundary_right_hand_side() function, see above, with @@ -1733,7 +1733,7 @@ namespace VectorTools const Quadrature &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_ids = std::set()); /** * Same as the set of functions above, but for hp objects. @@ -1747,7 +1747,7 @@ namespace VectorTools const hp::QCollection &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_ids = std::set()); /** * Calls the create_boundary_right_hand_side() function, see above, with a @@ -1762,7 +1762,7 @@ namespace VectorTools const hp::QCollection &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_ids = std::set()); //@} /** diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index 7a9e5dc298..93fc02cc9e 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -684,11 +684,11 @@ namespace VectorTools // function to hold on // all parts of the boundary const std::vector - used_boundary_indicators = dof.get_tria().get_boundary_indicators(); + used_boundary_ids = dof.get_tria().get_boundary_ids(); typename FunctionMap::type boundary_functions; - for (unsigned int i=0; i &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_ids) { const FiniteElement &fe = dof_handler.get_fe(); Assert (fe.n_components() == rhs_function.n_components, @@ -1368,10 +1368,10 @@ namespace VectorTools for (; cell!=endc; ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary () && - (boundary_indicators.empty() || - (boundary_indicators.find (cell->face(face)->boundary_indicator()) + (boundary_ids.empty() || + (boundary_ids.find (cell->face(face)->boundary_id()) != - boundary_indicators.end()))) + boundary_ids.end()))) { fe_values.reinit(cell, face); @@ -1398,10 +1398,10 @@ namespace VectorTools for (; cell!=endc; ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary () && - (boundary_indicators.empty() || - (boundary_indicators.find (cell->face(face)->boundary_indicator()) + (boundary_ids.empty() || + (boundary_ids.find (cell->face(face)->boundary_id()) != - boundary_indicators.end()))) + boundary_ids.end()))) { fe_values.reinit(cell, face); @@ -1458,12 +1458,12 @@ namespace VectorTools const Quadrature &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_ids) { create_boundary_right_hand_side(StaticMappingQ1::mapping, dof_handler, quadrature, rhs_function, rhs_vector, - boundary_indicators); + boundary_ids); } @@ -1475,7 +1475,7 @@ namespace VectorTools const hp::QCollection &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_ids) { const hp::FECollection &fe = dof_handler.get_fe(); Assert (fe.n_components() == rhs_function.n_components, @@ -1506,10 +1506,10 @@ namespace VectorTools for (; cell!=endc; ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary () && - (boundary_indicators.empty() || - (boundary_indicators.find (cell->face(face)->boundary_indicator()) + (boundary_ids.empty() || + (boundary_ids.find (cell->face(face)->boundary_id()) != - boundary_indicators.end()))) + boundary_ids.end()))) { x_fe_values.reinit(cell, face); @@ -1543,10 +1543,10 @@ namespace VectorTools for (; cell!=endc; ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->face(face)->at_boundary () && - (boundary_indicators.empty() || - (boundary_indicators.find (cell->face(face)->boundary_indicator()) + (boundary_ids.empty() || + (boundary_ids.find (cell->face(face)->boundary_id()) != - boundary_indicators.end()))) + boundary_ids.end()))) { x_fe_values.reinit(cell, face); @@ -1609,12 +1609,12 @@ namespace VectorTools const hp::QCollection &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_ids) { create_boundary_right_hand_side(hp::StaticMappingQ1::mapping_collection, dof_handler, quadrature, rhs_function, rhs_vector, - boundary_indicators); + boundary_ids); } @@ -1660,10 +1660,10 @@ namespace VectorTools direction::faces_per_cell; ++direction) if (cell->at_boundary(direction) && - (function_map.find(cell->face(direction)->boundary_indicator()) != function_map.end())) + (function_map.find(cell->face(direction)->boundary_id()) != function_map.end())) { const Function &boundary_function - = *function_map.find(cell->face(direction)->boundary_indicator())->second; + = *function_map.find(cell->face(direction)->boundary_id())->second; // get the FE corresponding to this // cell @@ -1848,7 +1848,7 @@ namespace VectorTools } const typename DH::face_iterator face = cell->face(face_no); - const types::boundary_id boundary_component = face->boundary_indicator(); + const types::boundary_id boundary_component = face->boundary_id(); // see if this face is part of the boundaries for which we are // supposed to do something, and also see if the finite element @@ -3451,7 +3451,7 @@ namespace VectorTools for (; cell != dof_handler.end (); ++cell) if (cell->at_boundary () && cell->is_locally_owned ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // if the FE is a // FE_Nothing object @@ -3535,7 +3535,7 @@ namespace VectorTools for (; cell != dof_handler.end (); ++cell) if (cell->at_boundary () && cell->is_locally_owned ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // if the FE is a // FE_Nothing object @@ -3656,7 +3656,7 @@ namespace VectorTools for (; cell != dof_handler.end (); ++cell) if (cell->at_boundary () && cell->is_locally_owned ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // if the FE is a FE_Nothing object there is no work to do if (dynamic_cast*> (&cell->get_fe ()) != 0) @@ -3733,7 +3733,7 @@ namespace VectorTools for (; cell != dof_handler.end (); ++cell) if (cell->at_boundary () && cell->is_locally_owned ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // if the FE is a FE_Nothing object there is no work to do if (dynamic_cast*> (&cell->get_fe ()) != 0) @@ -4501,7 +4501,7 @@ namespace VectorTools { for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) { - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // If the FE is an FE_Nothing object there is no work to do if (dynamic_cast*> (&cell->get_fe ()) != 0) @@ -4596,7 +4596,7 @@ namespace VectorTools { for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) { - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // If the FE is an FE_Nothing object there is no work to do if (dynamic_cast*> (&cell->get_fe ()) != 0) @@ -4946,7 +4946,7 @@ namespace VectorTools cell != dof_handler.end (); ++cell) if (cell->at_boundary ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // if the FE is a // FE_Nothing object @@ -5017,7 +5017,7 @@ namespace VectorTools cell != dof_handler.end (); ++cell) if (cell->at_boundary ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // This is only // implemented, if the @@ -5107,7 +5107,7 @@ namespace VectorTools cell != dof_handler.end (); ++cell) if (cell->at_boundary ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // This is only // implemented, if the @@ -5154,7 +5154,7 @@ namespace VectorTools cell != dof_handler.end (); ++cell) if (cell->at_boundary ()) for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) - if (cell->face (face)->boundary_indicator () == boundary_component) + if (cell->face (face)->boundary_id () == boundary_component) { // This is only // implemented, if the @@ -5300,7 +5300,7 @@ namespace VectorTools if (!cell->is_artificial()) for (unsigned int face_no=0; face_no < GeometryInfo::faces_per_cell; ++face_no) - if ((b_id=boundary_ids.find(cell->face(face_no)->boundary_indicator())) + if ((b_id=boundary_ids.find(cell->face(face_no)->boundary_id())) != boundary_ids.end()) { const FiniteElement &fe = cell->get_fe (); @@ -5872,7 +5872,7 @@ namespace VectorTools if (!cell->is_artificial()) for (unsigned int face_no=0; face_no < GeometryInfo::faces_per_cell; ++face_no) - if ((b_id=boundary_ids.find(cell->face(face_no)->boundary_indicator())) + if ((b_id=boundary_ids.find(cell->face(face_no)->boundary_id())) != boundary_ids.end()) { const FiniteElement &fe = cell->get_fe(); diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 9f2c038022..42753e08db 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -992,33 +992,33 @@ types::global_dof_index DoFHandler<1>::n_boundary_dofs () const template <> -types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const +types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_ids) const { // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (FunctionMap::const_iterator i=boundary_indicators.begin(); - i!=boundary_indicators.end(); ++i) + for (FunctionMap::const_iterator i=boundary_ids.begin(); + i!=boundary_ids.end(); ++i) Assert ((i->first == 0) || (i->first == 1), ExcInvalidBoundaryIndicator()); - return boundary_indicators.size()*get_fe().dofs_per_vertex; + return boundary_ids.size()*get_fe().dofs_per_vertex; } template <> -types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set &boundary_indicators) const +types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set &boundary_ids) const { // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (std::set::const_iterator i=boundary_indicators.begin(); - i!=boundary_indicators.end(); ++i) + for (std::set::const_iterator i=boundary_ids.begin(); + i!=boundary_ids.end(); ++i) Assert ((*i == 0) || (*i == 1), ExcInvalidBoundaryIndicator()); - return boundary_indicators.size()*get_fe().dofs_per_vertex; + return boundary_ids.size()*get_fe().dofs_per_vertex; } @@ -1031,33 +1031,33 @@ types::global_dof_index DoFHandler<1,2>::n_boundary_dofs () const template <> -types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &boundary_indicators) const +types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &boundary_ids) const { // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (FunctionMap::const_iterator i=boundary_indicators.begin(); - i!=boundary_indicators.end(); ++i) + for (FunctionMap::const_iterator i=boundary_ids.begin(); + i!=boundary_ids.end(); ++i) Assert ((i->first == 0) || (i->first == 1), ExcInvalidBoundaryIndicator()); - return boundary_indicators.size()*get_fe().dofs_per_vertex; + return boundary_ids.size()*get_fe().dofs_per_vertex; } template <> -types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const std::set &boundary_indicators) const +types::global_dof_index DoFHandler<1,2>::n_boundary_dofs (const std::set &boundary_ids) const { // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (std::set::const_iterator i=boundary_indicators.begin(); - i!=boundary_indicators.end(); ++i) + for (std::set::const_iterator i=boundary_ids.begin(); + i!=boundary_ids.end(); ++i) Assert ((*i == 0) || (*i == 1), ExcInvalidBoundaryIndicator()); - return boundary_indicators.size()*get_fe().dofs_per_vertex; + return boundary_ids.size()*get_fe().dofs_per_vertex; } @@ -1102,9 +1102,9 @@ types::global_dof_index DoFHandler::n_boundary_dofs () const template types::global_dof_index -DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicators) const +DoFHandler::n_boundary_dofs (const FunctionMap &boundary_ids) const { - Assert (boundary_indicators.find(numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find(numbers::internal_face_boundary_id) == boundary_ids.end(), ExcInvalidBoundaryIndicator()); std::set boundary_dofs; @@ -1121,8 +1121,8 @@ DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicator for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f) && - (boundary_indicators.find(cell->face(f)->boundary_indicator()) != - boundary_indicators.end())) + (boundary_ids.find(cell->face(f)->boundary_id()) != + boundary_ids.end())) { cell->face(f)->get_dof_indices (dofs_on_face); for (unsigned int i=0; i::n_boundary_dofs (const FunctionMap &boundary_indicator template types::global_dof_index -DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const +DoFHandler::n_boundary_dofs (const std::set &boundary_ids) const { - Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find (numbers::internal_face_boundary_id) == boundary_ids.end(), ExcInvalidBoundaryIndicator()); std::set boundary_dofs; @@ -1155,10 +1155,10 @@ DoFHandler::n_boundary_dofs (const std::set &b for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f) && - (std::find (boundary_indicators.begin(), - boundary_indicators.end(), - cell->face(f)->boundary_indicator()) != - boundary_indicators.end())) + (std::find (boundary_ids.begin(), + boundary_ids.end(), + cell->face(f)->boundary_id()) != + boundary_ids.end())) { cell->face(f)->get_dof_indices (dofs_on_face); for (unsigned int i=0; i &selected_dofs, - const std::set &boundary_indicators) + const std::set &boundary_ids) { Assert ((dynamic_cast*> (&dof_handler.get_tria()) @@ -525,7 +525,7 @@ namespace DoFTools IndexSet indices; extract_boundary_dofs (dof_handler, component_mask, - indices, boundary_indicators); + indices, boundary_ids); // clear and reset array by default values selected_dofs.clear (); @@ -541,11 +541,11 @@ namespace DoFTools extract_boundary_dofs (const DH &dof_handler, const ComponentMask &component_mask, IndexSet &selected_dofs, - const std::set &boundary_indicators) + const std::set &boundary_ids) { Assert (component_mask.represents_n_components(n_components(dof_handler)), ExcMessage ("Component mask has invalid size.")); - Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find (numbers::internal_face_boundary_id) == boundary_ids.end(), ExcInvalidBoundaryIndicator()); const unsigned int dim=DH::dimension; @@ -555,7 +555,7 @@ namespace DoFTools // let's see whether we have to check for certain boundary indicators // or whether we can accept all - const bool check_boundary_indicator = (boundary_indicators.size() != 0); + const bool check_boundary_id = (boundary_ids.size() != 0); // also see whether we have to check whether a certain vector component // is selected, or all @@ -583,9 +583,9 @@ namespace DoFTools for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->at_boundary(face)) - if (! check_boundary_indicator || - (boundary_indicators.find (cell->face(face)->boundary_indicator()) - != boundary_indicators.end())) + if (! check_boundary_id || + (boundary_ids.find (cell->face(face)->boundary_id()) + != boundary_ids.end())) { const FiniteElement &fe = cell->get_fe(); @@ -648,16 +648,16 @@ namespace DoFTools extract_dofs_with_support_on_boundary (const DH &dof_handler, const ComponentMask &component_mask, std::vector &selected_dofs, - const std::set &boundary_indicators) + const std::set &boundary_ids) { Assert (component_mask.represents_n_components (n_components(dof_handler)), ExcMessage ("This component mask has the wrong size.")); - Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find (numbers::internal_face_boundary_id) == boundary_ids.end(), ExcInvalidBoundaryIndicator()); // let's see whether we have to check for certain boundary indicators // or whether we can accept all - const bool check_boundary_indicator = (boundary_indicators.size() != 0); + const bool check_boundary_id = (boundary_ids.size() != 0); // also see whether we have to check whether a certain vector component // is selected, or all @@ -681,9 +681,9 @@ namespace DoFTools for (unsigned int face=0; face::faces_per_cell; ++face) if (cell->at_boundary(face)) - if (! check_boundary_indicator || - (boundary_indicators.find (cell->face(face)->boundary_indicator()) - != boundary_indicators.end())) + if (! check_boundary_id || + (boundary_ids.find (cell->face(face)->boundary_id()) + != boundary_ids.end())) { const FiniteElement &fe = cell->get_fe(); @@ -1580,10 +1580,10 @@ namespace DoFTools template void map_dof_to_boundary_indices ( const DH &dof_handler, - const std::set &boundary_indicators, + const std::set &boundary_ids, std::vector &mapping) { - Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find (numbers::internal_face_boundary_id) == boundary_ids.end(), ExcInvalidBoundaryIndicator()); mapping.clear (); @@ -1591,7 +1591,7 @@ namespace DoFTools DH::invalid_dof_index); // return if there is nothing to do - if (boundary_indicators.size() == 0) + if (boundary_ids.size() == 0) return; std::vector dofs_on_face; @@ -1602,8 +1602,8 @@ namespace DoFTools endc = dof_handler.end(); for (; cell!=endc; ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) - if (boundary_indicators.find (cell->face(f)->boundary_indicator()) != - boundary_indicators.end()) + if (boundary_ids.find (cell->face(f)->boundary_id()) != + boundary_ids.end()) { const unsigned int dofs_per_face = cell->get_fe().dofs_per_face; dofs_on_face.resize (dofs_per_face); @@ -1614,7 +1614,7 @@ namespace DoFTools } AssertDimension (next_boundary_index, - dof_handler.n_boundary_dofs (boundary_indicators)); + dof_handler.n_boundary_dofs (boundary_ids)); } namespace internal diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index def686d5b4..b329b0c31a 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -2974,7 +2974,7 @@ namespace DoFTools template class DH> void make_zero_boundary_constraints (const DH &dof, - const types::boundary_id boundary_indicator, + const types::boundary_id boundary_id, ConstraintMatrix &zero_boundary_constraints, const ComponentMask &component_mask) { @@ -3018,9 +3018,9 @@ namespace DoFTools // boundary id property if (face->at_boundary () && - ((boundary_indicator == numbers::invalid_boundary_id) + ((boundary_id == numbers::invalid_boundary_id) || - (face->boundary_indicator() == boundary_indicator))) + (face->boundary_id() == boundary_id))) { // get indices and physical location on this face face_dofs.resize (fe.dofs_per_face); diff --git a/source/dofs/dof_tools_sparsity.cc b/source/dofs/dof_tools_sparsity.cc index b377639e91..a3f034c3e5 100644 --- a/source/dofs/dof_tools_sparsity.cc +++ b/source/dofs/dof_tools_sparsity.cc @@ -335,11 +335,11 @@ namespace DoFTools { // there are only 2 boundary indicators in 1d, so it is no // performance problem to call the other function - typename DH::FunctionMap boundary_indicators; - boundary_indicators[0] = 0; - boundary_indicators[1] = 0; + typename DH::FunctionMap boundary_ids; + boundary_ids[0] = 0; + boundary_ids[1] = 0; make_boundary_sparsity_pattern (dof, - boundary_indicators, + boundary_ids, dof_to_boundary_mapping, sparsity); return; @@ -395,7 +395,7 @@ namespace DoFTools template void make_boundary_sparsity_pattern ( const DH &dof, - const typename FunctionMap::type &boundary_indicators, + const typename FunctionMap::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SparsityPattern &sparsity) { @@ -405,8 +405,8 @@ namespace DoFTools for (unsigned int direction=0; direction<2; ++direction) { // if this boundary is not requested, then go on with next one - if (boundary_indicators.find(direction) == - boundary_indicators.end()) + if (boundary_ids.find(direction) == + boundary_ids.end()) continue; // find active cell at that boundary: first go to left/right, @@ -436,12 +436,12 @@ namespace DoFTools const types::global_dof_index n_dofs = dof.n_dofs(); AssertDimension (dof_to_boundary_mapping.size(), n_dofs); - Assert (boundary_indicators.find(numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find(numbers::internal_face_boundary_id) == boundary_ids.end(), typename DH::ExcInvalidBoundaryIndicator()); - Assert (sparsity.n_rows() == dof.n_boundary_dofs (boundary_indicators), - ExcDimensionMismatch (sparsity.n_rows(), dof.n_boundary_dofs (boundary_indicators))); - Assert (sparsity.n_cols() == dof.n_boundary_dofs (boundary_indicators), - ExcDimensionMismatch (sparsity.n_cols(), dof.n_boundary_dofs (boundary_indicators))); + Assert (sparsity.n_rows() == dof.n_boundary_dofs (boundary_ids), + ExcDimensionMismatch (sparsity.n_rows(), dof.n_boundary_dofs (boundary_ids))); + Assert (sparsity.n_cols() == dof.n_boundary_dofs (boundary_ids), + ExcDimensionMismatch (sparsity.n_cols(), dof.n_boundary_dofs (boundary_ids))); #ifdef DEBUG if (sparsity.n_rows() != 0) { @@ -461,8 +461,8 @@ namespace DoFTools endc = dof.end(); for (; cell!=endc; ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) - if (boundary_indicators.find(cell->face(f)->boundary_indicator()) != - boundary_indicators.end()) + if (boundary_ids.find(cell->face(f)->boundary_id()) != + boundary_ids.end()) { const unsigned int dofs_per_face = cell->get_fe().dofs_per_face; dofs_on_this_face.resize (dofs_per_face); diff --git a/source/dofs/dof_tools_sparsity.inst.in b/source/dofs/dof_tools_sparsity.inst.in index 1bad13cfef..dc2f35246c 100644 --- a/source/dofs/dof_tools_sparsity.inst.in +++ b/source/dofs/dof_tools_sparsity.inst.in @@ -78,14 +78,14 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) template void DoFTools::make_boundary_sparsity_pattern,SP> (const DoFHandler& dof, - const FunctionMap::type &boundary_indicators, + const FunctionMap::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SP &sparsity); template void DoFTools::make_boundary_sparsity_pattern,SP> (const hp::DoFHandler& dof, - const FunctionMap::type &boundary_indicators, + const FunctionMap::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SP &sparsity); @@ -93,7 +93,7 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) template void DoFTools::make_boundary_sparsity_pattern,SP> (const hp::DoFHandler& dof, - const FunctionMap::type &boundary_indicators, + const FunctionMap::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SP &sparsity); #endif @@ -204,14 +204,14 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) template void DoFTools::make_boundary_sparsity_pattern,SP> (const DoFHandler& dof, - const FunctionMap::type &boundary_indicators, + const FunctionMap::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SP &sparsity); //template void //DoFTools::make_boundary_sparsity_pattern,SP> //(const hp::DoFHandler& dof, - // const FunctionMap::type &boundary_indicators, + // const FunctionMap::type &boundary_ids, // const std::vector &dof_to_boundary_mapping, // SP &sparsity); @@ -281,14 +281,14 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) template void DoFTools::make_boundary_sparsity_pattern,SP> (const DoFHandler<1,3>& dof, - const FunctionMap<3>::type &boundary_indicators, + const FunctionMap<3>::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SP &sparsity); template void DoFTools::make_boundary_sparsity_pattern,SP> (const hp::DoFHandler<1,3>& dof, - const FunctionMap<3>::type &boundary_indicators, + const FunctionMap<3>::type &boundary_ids, const std::vector &dof_to_boundary_mapping, SP &sparsity); diff --git a/source/fe/mapping_c1.cc b/source/fe/mapping_c1.cc index 1f19b4fec5..2a03de0376 100644 --- a/source/fe/mapping_c1.cc +++ b/source/fe/mapping_c1.cc @@ -64,7 +64,7 @@ MappingC1<2>::add_line_support_points (const Triangulation<2>::cell_iterator &ce // first get the normal vectors at the two vertices of this line // from the boundary description const Boundary &boundary - = line->get_triangulation().get_boundary(line->boundary_indicator()); + = line->get_triangulation().get_boundary(line->boundary_id()); Boundary::FaceVertexNormals face_vertex_normals; boundary.get_normals_at_vertices (line, face_vertex_normals); diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 093feed06a..44add74bcd 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -77,7 +77,7 @@ namespace GridGenerator const typename Triangulation::cell_iterator cell = tria.begin(); for (unsigned int f=0; f::faces_per_cell; ++f) - cell->face(f)->set_boundary_indicator (f); + cell->face(f)->set_boundary_id (f); } } @@ -118,21 +118,21 @@ namespace GridGenerator endface = tria.end_face(); for (; face!=endface; ++face) { - if (face->boundary_indicator() == 0) + if (face->boundary_id() == 0) { const Point center (face->center()); if (std::abs(center(0)-p1[0]) < epsilon) - face->set_boundary_indicator(0); + face->set_boundary_id(0); else if (std::abs(center(0) - p2[0]) < epsilon) - face->set_boundary_indicator(1); + face->set_boundary_id(1); else if (dim > 1 && std::abs(center(1) - p1[1]) < epsilon) - face->set_boundary_indicator(2); + face->set_boundary_id(2); else if (dim > 1 && std::abs(center(1) - p2[1]) < epsilon) - face->set_boundary_indicator(3); + face->set_boundary_id(3); else if (dim > 2 && std::abs(center(2) - p1[2]) < epsilon) - face->set_boundary_indicator(4); + face->set_boundary_id(4); else if (dim > 2 && std::abs(center(2) - p2[2]) < epsilon) - face->set_boundary_indicator(5); + face->set_boundary_id(5); else // triangulation says it // is on the boundary, @@ -173,7 +173,7 @@ namespace GridGenerator cell != tria.end (); ++cell) { Assert(cell->face(2)->at_boundary(), ExcInternalError()); - cell->face (2)->set_all_boundary_indicators (1); + cell->face (2)->set_all_boundary_ids (1); } } @@ -197,27 +197,27 @@ namespace GridGenerator Triangulation<3>::cell_iterator cell = tria.begin(); Assert (cell->face(4)->at_boundary(), ExcInternalError()); - cell->face(4)->set_all_boundary_indicators(1); + cell->face(4)->set_all_boundary_ids(1); ++cell; Assert (cell->face(2)->at_boundary(), ExcInternalError()); - cell->face(2)->set_all_boundary_indicators(1); + cell->face(2)->set_all_boundary_ids(1); ++cell; Assert (cell->face(2)->at_boundary(), ExcInternalError()); - cell->face(2)->set_all_boundary_indicators(1); + cell->face(2)->set_all_boundary_ids(1); ++cell; Assert (cell->face(0)->at_boundary(), ExcInternalError()); - cell->face(0)->set_all_boundary_indicators(1); + cell->face(0)->set_all_boundary_ids(1); ++cell; Assert (cell->face(2)->at_boundary(), ExcInternalError()); - cell->face(2)->set_all_boundary_indicators(1); + cell->face(2)->set_all_boundary_ids(1); ++cell; Assert (cell->face(0)->at_boundary(), ExcInternalError()); - cell->face(0)->set_all_boundary_indicators(1); + cell->face(0)->set_all_boundary_ids(1); } else if (tria.n_cells() == 12) { @@ -227,7 +227,7 @@ namespace GridGenerator cell != tria.end(); ++cell) { Assert (cell->face(5)->at_boundary(), ExcInternalError()); - cell->face(5)->set_all_boundary_indicators(1); + cell->face(5)->set_all_boundary_ids(1); } } else if (tria.n_cells() == 96) @@ -248,7 +248,7 @@ namespace GridGenerator cell != tria.end(); ++cell) if (cell->face(5)->at_boundary()) { - cell->face(5)->set_all_boundary_indicators(1); + cell->face(5)->set_all_boundary_ids(1); ++count; } Assert (count == 48, ExcInternalError()); @@ -286,43 +286,43 @@ namespace GridGenerator double radius = cell->face(f)->center().norm() - center.norm(); if (std::fabs(cell->face(f)->center()(0)) < eps ) // x = 0 set boundary 2 { - cell->face(f)->set_boundary_indicator(2); + cell->face(f)->set_boundary_id(2); for (unsigned int j=0; j::lines_per_face; ++j) if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) > eps) - cell->face(f)->line(j)->set_boundary_indicator(2); + cell->face(f)->line(j)->set_boundary_id(2); } else if (std::fabs(cell->face(f)->center()(1)) < eps) // y = 0 set boundary 3 { - cell->face(f)->set_boundary_indicator(3); + cell->face(f)->set_boundary_id(3); for (unsigned int j=0; j::lines_per_face; ++j) if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) > eps) - cell->face(f)->line(j)->set_boundary_indicator(3); + cell->face(f)->line(j)->set_boundary_id(3); } else if (std::fabs(cell->face(f)->center()(2)) < eps ) // z = 0 set boundary 4 { - cell->face(f)->set_boundary_indicator(4); + cell->face(f)->set_boundary_id(4); for (unsigned int j=0; j::lines_per_face; ++j) if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) > eps) - cell->face(f)->line(j)->set_boundary_indicator(4); + cell->face(f)->line(j)->set_boundary_id(4); } else if (radius < middle) // inner radius set boundary 0 { - cell->face(f)->set_boundary_indicator(0); + cell->face(f)->set_boundary_id(0); for (unsigned int j=0; j::lines_per_face; ++j) if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) < eps) - cell->face(f)->line(j)->set_boundary_indicator(0); + cell->face(f)->line(j)->set_boundary_id(0); } else if (radius > middle) // outer radius set boundary 1 { - cell->face(f)->set_boundary_indicator(1); + cell->face(f)->set_boundary_id(1); for (unsigned int j=0; j::lines_per_face; ++j) if (cell->face(f)->line(j)->at_boundary()) if (std::fabs(cell->face(f)->line(j)->vertex(0).norm() - cell->face(f)->line(j)->vertex(1).norm()) < eps) - cell->face(f)->line(j)->set_boundary_indicator(1); + cell->face(f)->line(j)->set_boundary_id(1); } else AssertThrow (false, ExcInternalError()); @@ -1511,15 +1511,15 @@ namespace GridGenerator { Point<2> cell_center = cell->center(); for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->face(f)->boundary_indicator() == 0) + if (cell->face(f)->boundary_id() == 0) { Point<2> face_center = cell->face(f)->center(); for (unsigned int i=0; i<2; ++i) { if (face_center[i]face(f)->set_boundary_indicator(i*2); + cell->face(f)->set_boundary_id(i*2); if (face_center[i]>cell_center[i]+eps) - cell->face(f)->set_boundary_indicator(i*2+1); + cell->face(f)->set_boundary_id(i*2+1); } } } @@ -1625,15 +1625,15 @@ namespace GridGenerator { Point cell_center = cell->center(); for (unsigned int f=0; f::faces_per_cell; ++f) - if (cell->face(f)->boundary_indicator() == 0) + if (cell->face(f)->boundary_id() == 0) { Point face_center = cell->face(f)->center(); for (unsigned int i=0; iface(f)->set_boundary_indicator(i*2); + cell->face(f)->set_boundary_id(i*2); if (face_center[i]>cell_center[i]+eps) - cell->face(f)->set_boundary_indicator(i*2+1); + cell->face(f)->set_boundary_id(i*2+1); } } } @@ -1850,9 +1850,9 @@ namespace GridGenerator if (colorize) { Triangulation<2>::cell_iterator cell = tria.begin(); - cell->face(1)->set_boundary_indicator(1); + cell->face(1)->set_boundary_id(1); ++cell; - cell->face(3)->set_boundary_indicator(2); + cell->face(3)->set_boundary_id(2); } } @@ -1887,11 +1887,11 @@ namespace GridGenerator Triangulation<2>::cell_iterator cell = triangulation.begin (); - cell->face (0)->set_boundary_indicator (1); - cell->face (1)->set_boundary_indicator (2); + cell->face (0)->set_boundary_id (1); + cell->face (1)->set_boundary_id (2); for (unsigned int i = 2; i < 4; ++i) - cell->face (i)->set_boundary_indicator (0); + cell->face (i)->set_boundary_id (0); } @@ -2061,16 +2061,16 @@ namespace GridGenerator Triangulation<2>::face_iterator end = tria.end_face(); while (f != end) { - switch (f->boundary_indicator()) + switch (f->boundary_id()) { case 0: - f->set_boundary_indicator(1); + f->set_boundary_id(1); break; case 1: - f->set_boundary_indicator(2); + f->set_boundary_id(2); break; default: - f->set_boundary_indicator(0); + f->set_boundary_id(0); break; } ++f; @@ -2140,12 +2140,12 @@ namespace GridGenerator { for (unsigned int i=0; i::faces_per_cell; ++i) { - if (cell->face(i)->boundary_indicator() == numbers::internal_face_boundary_id) + if (cell->face(i)->boundary_id() == numbers::internal_face_boundary_id) continue; // If x is zero, then this is part of the plane if (cell->face(i)->center()(0) < p(0)+1.e-5) - cell->face(i)->set_boundary_indicator(1); + cell->face(i)->set_boundary_id(1); } ++cell; } @@ -2227,11 +2227,11 @@ namespace GridGenerator Triangulation<2>::cell_iterator cell = tria.begin(); for (; cell!=tria.end(); ++cell) { - cell->face(2)->set_boundary_indicator(1); + cell->face(2)->set_boundary_id(1); } - tria.begin()->face(0)->set_boundary_indicator(3); + tria.begin()->face(0)->set_boundary_id(3); - tria.last()->face(1)->set_boundary_indicator(2); + tria.last()->face(1)->set_boundary_id(2); } } @@ -2307,11 +2307,11 @@ namespace GridGenerator Triangulation<2>::cell_iterator cell = tria.begin(); for (; cell!=tria.end(); ++cell) { - cell->face(2)->set_boundary_indicator(1); + cell->face(2)->set_boundary_id(1); } - tria.begin()->face(0)->set_boundary_indicator(3); + tria.begin()->face(0)->set_boundary_id(3); - tria.last()->face(1)->set_boundary_indicator(2); + tria.last()->face(1)->set_boundary_id(2); } } @@ -2371,9 +2371,9 @@ namespace GridGenerator { Assert(false, ExcNotImplemented()); Triangulation<3>::cell_iterator cell = tria.begin(); - cell->face(1)->set_boundary_indicator(1); + cell->face(1)->set_boundary_id(1); ++cell; - cell->face(3)->set_boundary_indicator(2); + cell->face(3)->set_boundary_id(2); } } @@ -2504,22 +2504,22 @@ namespace GridGenerator { if (cell->vertex (0) (0) == -half_length) { - cell->face (4)->set_boundary_indicator (1); + cell->face (4)->set_boundary_id (1); for (unsigned int i = 0; i < 4; ++i) - cell->line (i)->set_boundary_indicator (0); + cell->line (i)->set_boundary_id (0); } if (cell->vertex (4) (0) == half_length) { - cell->face (5)->set_boundary_indicator (2); + cell->face (5)->set_boundary_id (2); for (unsigned int i = 4; i < 8; ++i) - cell->line (i)->set_boundary_indicator (0); + cell->line (i)->set_boundary_id (0); } for (unsigned int i = 0; i < 4; ++i) - cell->face (i)->set_boundary_indicator (0); + cell->face (i)->set_boundary_id (0); } } @@ -2749,25 +2749,25 @@ namespace GridGenerator { if (cell->face(i)->center()(0) > half_length-1.e-5) { - cell->face(i)->set_boundary_indicator(2); + cell->face(i)->set_boundary_id(2); for (unsigned int e=0; e::lines_per_face; ++e) if ((std::fabs(cell->face(i)->line(e)->vertex(0)[1]) == a) || (std::fabs(cell->face(i)->line(e)->vertex(0)[2]) == a) || (std::fabs(cell->face(i)->line(e)->vertex(1)[1]) == a) || (std::fabs(cell->face(i)->line(e)->vertex(1)[2]) == a)) - cell->face(i)->line(e)->set_boundary_indicator(2); + cell->face(i)->line(e)->set_boundary_id(2); } else if (cell->face(i)->center()(0) < -half_length+1.e-5) { - cell->face(i)->set_boundary_indicator(1); + cell->face(i)->set_boundary_id(1); for (unsigned int e=0; e::lines_per_face; ++e) if ((std::fabs(cell->face(i)->line(e)->vertex(0)[1]) == a) || (std::fabs(cell->face(i)->line(e)->vertex(0)[2]) == a) || (std::fabs(cell->face(i)->line(e)->vertex(1)[1]) == a) || (std::fabs(cell->face(i)->line(e)->vertex(1)[2]) == a)) - cell->face(i)->line(e)->set_boundary_indicator(1); + cell->face(i)->line(e)->set_boundary_id(1); } } } @@ -2856,7 +2856,7 @@ namespace GridGenerator // bounding faces unless both vertices are on the perimeter if (cell->face(i)->center()(0) < center(0)+1.e-5*radius) { - cell->face(i)->set_boundary_indicator(1); + cell->face(i)->set_boundary_id(1); for (unsigned int j=0; j::lines_per_face; ++j) { const Point<3> line_vertices[2] @@ -2868,7 +2868,7 @@ namespace GridGenerator || (std::fabs(line_vertices[1].distance(center)-radius) > 1e-5*radius)) - cell->face(i)->line(j)->set_boundary_indicator(1); + cell->face(i)->line(j)->set_boundary_id(1); } } } @@ -3550,7 +3550,7 @@ namespace GridGenerator for (unsigned int f=0; f<4; ++f) if (cell->at_boundary(f)) { - quad.boundary_id = cell->face(f)->boundary_indicator(); + quad.boundary_id = cell->face(f)->boundary_id(); bid = std::max(bid, quad.boundary_id); for (unsigned int slice=0; sliceface(f)->set_boundary_indicator(0); + cell->face(f)->set_boundary_id(0); else if (std::abs(dx - outer_radius) < eps) - cell->face(f)->set_boundary_indicator(1); + cell->face(f)->set_boundary_id(1); else if (std::abs(dy + outer_radius) < eps) - cell->face(f)->set_boundary_indicator(2); + cell->face(f)->set_boundary_id(2); else if (std::abs(dy - outer_radius) < eps) - cell->face(f)->set_boundary_indicator(3); + cell->face(f)->set_boundary_id(3); else - cell->face(f)->set_boundary_indicator(4); + cell->face(f)->set_boundary_id(4); } else { double d = (cell->face(f)->center() - center).norm(); if (d-inner_radius < 0) - cell->face(f)->set_boundary_indicator(1); + cell->face(f)->set_boundary_id(1); else - cell->face(f)->set_boundary_indicator(0); + cell->face(f)->set_boundary_id(0); } } } @@ -3764,28 +3764,28 @@ namespace GridGenerator if (colorize) { if (std::abs(dx + outer_radius) < eps) - cell->face(f)->set_boundary_indicator(0); + cell->face(f)->set_boundary_id(0); else if (std::abs(dx - outer_radius) < eps) - cell->face(f)->set_boundary_indicator(1); + cell->face(f)->set_boundary_id(1); else if (std::abs(dy + outer_radius) < eps) - cell->face(f)->set_boundary_indicator(2); + cell->face(f)->set_boundary_id(2); else if (std::abs(dy - outer_radius) < eps) - cell->face(f)->set_boundary_indicator(3); + cell->face(f)->set_boundary_id(3); else if (std::abs(dz) < eps) - cell->face(f)->set_boundary_indicator(4); + cell->face(f)->set_boundary_id(4); else if (std::abs(dz - L) < eps) - cell->face(f)->set_boundary_indicator(5); + cell->face(f)->set_boundary_id(5); else { - cell->face(f)->set_boundary_indicator(6); + cell->face(f)->set_boundary_id(6); for (unsigned int l=0; l::lines_per_face; ++l) - cell->face(f)->line(l)->set_boundary_indicator(6); + cell->face(f)->line(l)->set_boundary_id(6); } } @@ -3796,12 +3796,12 @@ namespace GridGenerator double d = c.norm(); if (d-inner_radius < 0) { - cell->face(f)->set_boundary_indicator(1); + cell->face(f)->set_boundary_id(1); for (unsigned int l=0; l::lines_per_face; ++l) - cell->face(f)->line(l)->set_boundary_indicator(1); + cell->face(f)->line(l)->set_boundary_id(1); } else - cell->face(f)->set_boundary_indicator(0); + cell->face(f)->set_boundary_id(0); } } } @@ -3860,7 +3860,7 @@ namespace GridGenerator { for (unsigned int i=0; i::vertices_per_face; ++i) subcelldata.boundary_lines[f].vertices[i] = face->vertex_index(i); - subcelldata.boundary_lines[f].boundary_id = face->boundary_indicator(); + subcelldata.boundary_lines[f].boundary_id = face->boundary_id(); subcelldata.boundary_lines[f].manifold_id = face->manifold_id(); ++f; } @@ -3875,7 +3875,7 @@ namespace GridGenerator { for (unsigned int i=0; i::vertices_per_face; ++i) subcelldata.boundary_quads[f].vertices[i] = face->vertex_index(i); - subcelldata.boundary_quads[f].boundary_id = face->boundary_indicator(); + subcelldata.boundary_quads[f].boundary_id = face->boundary_id(); subcelldata.boundary_quads[f].manifold_id = face->manifold_id(); ++f; } @@ -3991,7 +3991,7 @@ namespace GridGenerator if ( face->at_boundary() && (boundary_ids.empty() || - ( boundary_ids.find(face->boundary_indicator()) != boundary_ids.end())) ) + ( boundary_ids.find(face->boundary_id()) != boundary_ids.end())) ) { for (unsigned int j=0; j::vertices_per_cell; ++j) @@ -4006,7 +4006,7 @@ namespace GridGenerator } c_data.vertices[j] = map_vert_index[v_index]; - c_data.material_id = static_cast(face->boundary_indicator()); + c_data.material_id = static_cast(face->boundary_id()); } cells.push_back(c_data); diff --git a/source/grid/grid_out.cc b/source/grid/grid_out.cc index eb0fd39109..e709eb6883 100644 --- a/source/grid/grid_out.cc +++ b/source/grid/grid_out.cc @@ -845,7 +845,7 @@ void GridOut::write_dx (const Triangulation &tria, // Little trick to get -1 // for the interior for (unsigned int f=0; f::faces_per_cell; ++f) - out << ' ' << (int)(signed char)cell->face(f)->boundary_indicator(); + out << ' ' << (int)(signed char)cell->face(f)->boundary_id(); out << '\n'; } out << "attribute \"dep\" string \"connections\"" << '\n' << '\n'; @@ -1355,7 +1355,7 @@ void GridOut::write_xfig ( { Triangulation::face_iterator face = cell->face(face_reorder[f]); - const types::boundary_id bi = face->boundary_indicator(); + const types::boundary_id bi = face->boundary_id(); if (bi != numbers::internal_face_boundary_id) { // Code for polyline @@ -2550,7 +2550,7 @@ unsigned int GridOut::n_boundary_faces (const Triangulation &tria) for (face=tria.begin_active_face(), endf=tria.end_face(); face != endf; ++face) if ((face->at_boundary()) && - (face->boundary_indicator() != 0)) + (face->boundary_id() != 0)) n_faces++; return n_faces; @@ -2579,7 +2579,7 @@ unsigned int GridOut::n_boundary_lines (const Triangulation &tria for (unsigned int l=0; l::lines_per_cell; ++l) if (cell->line(l)->at_boundary() && - (cell->line(l)->boundary_indicator() != 0) + (cell->line(l)->boundary_id() != 0) && (cell->line(l)->user_flag_set() == false)) { @@ -2672,7 +2672,7 @@ void GridOut::write_msh_faces (const Triangulation &tria, for (face=tria.begin_active_face(), endf=tria.end_face(); face != endf; ++face) if (face->at_boundary() && - (face->boundary_indicator() != 0)) + (face->boundary_id() != 0)) { out << index << ' '; switch (dim) @@ -2686,9 +2686,9 @@ void GridOut::write_msh_faces (const Triangulation &tria, default: Assert (false, ExcNotImplemented()); } - out << static_cast(face->boundary_indicator()) + out << static_cast(face->boundary_id()) << ' ' - << static_cast(face->boundary_indicator()) + << static_cast(face->boundary_id()) << ' ' << GeometryInfo::vertices_per_face; // note: vertex numbers are 1-base for (unsigned int vertex=0; vertex::vertices_per_face; ++vertex) @@ -2724,14 +2724,14 @@ void GridOut::write_msh_lines (const Triangulation &tria, for (unsigned int l=0; l::lines_per_cell; ++l) if (cell->line(l)->at_boundary() && - (cell->line(l)->boundary_indicator() != 0) + (cell->line(l)->boundary_id() != 0) && (cell->line(l)->user_flag_set() == false)) { out << index << " 1 "; - out << static_cast(cell->line(l)->boundary_indicator()) + out << static_cast(cell->line(l)->boundary_id()) << ' ' - << static_cast(cell->line(l)->boundary_indicator()) + << static_cast(cell->line(l)->boundary_id()) << " 2 "; // note: vertex numbers are 1-base for (unsigned int vertex=0; vertex<2; ++vertex) @@ -2826,10 +2826,10 @@ void GridOut::write_ucd_faces (const Triangulation &tria, for (face=tria.begin_active_face(), endf=tria.end_face(); face != endf; ++face) if (face->at_boundary() && - (face->boundary_indicator() != 0)) + (face->boundary_id() != 0)) { out << index << " " - << static_cast(face->boundary_indicator()) + << static_cast(face->boundary_id()) << " "; switch (dim) { @@ -2876,12 +2876,12 @@ void GridOut::write_ucd_lines (const Triangulation &tria, for (unsigned int l=0; l::lines_per_cell; ++l) if (cell->line(l)->at_boundary() && - (cell->line(l)->boundary_indicator() != 0) + (cell->line(l)->boundary_id() != 0) && (cell->line(l)->user_flag_set() == false)) { out << index << " " - << static_cast(cell->line(l)->boundary_indicator()) + << static_cast(cell->line(l)->boundary_id()) << " line "; // note: vertex numbers in ucd format are 1-base for (unsigned int vertex=0; vertex<2; ++vertex) diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 6e0f5b7357..81b3be4ba0 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -2810,14 +2810,14 @@ next_cell: for (unsigned int i = 0; i < GeometryInfo::faces_per_cell; ++i) { const typename CONTAINER::face_iterator face = cell->face(i); - if (face->at_boundary() && face->boundary_indicator() == b_id1) + if (face->at_boundary() && face->boundary_id() == b_id1) { const std::pair pair1 = std::make_pair(cell, i); pairs1.insert(pair1); } - if (face->at_boundary() && face->boundary_indicator() == b_id2) + if (face->at_boundary() && face->boundary_id() == b_id2) { const std::pair pair2 = std::make_pair(cell, i); @@ -2867,14 +2867,14 @@ next_cell: const typename CONTAINER::face_iterator face_1 = cell->face(2*direction); const typename CONTAINER::face_iterator face_2 = cell->face(2*direction+1); - if (face_1->at_boundary() && face_1->boundary_indicator() == b_id) + if (face_1->at_boundary() && face_1->boundary_id() == b_id) { const std::pair pair1 = std::make_pair(cell, 2*direction); pairs1.insert(pair1); } - if (face_2->at_boundary() && face_2->boundary_indicator() == b_id) + if (face_2->at_boundary() && face_2->boundary_id() == b_id) { const std::pair pair2 = std::make_pair(cell, 2*direction+1); @@ -2920,9 +2920,9 @@ next_cell: if (cell->face(f)->at_boundary()) { cell->face(f)->set_manifold_id - (static_cast(cell->face(f)->boundary_indicator())); + (static_cast(cell->face(f)->boundary_id())); if (reset_boundary_ids == true) - cell->face(f)->set_boundary_indicator(0); + cell->face(f)->set_boundary_id(0); } } diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index f6402b4adb..fde77d8414 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1823,15 +1823,15 @@ namespace hp template <> - types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicators) const + types::global_dof_index DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_ids) const { Assert (finite_elements != 0, ExcNoFESelected()); // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (FunctionMap::const_iterator i=boundary_indicators.begin(); - i!=boundary_indicators.end(); ++i) + for (FunctionMap::const_iterator i=boundary_ids.begin(); + i!=boundary_ids.end(); ++i) Assert ((i->first == 0) || (i->first == 1), ExcInvalidBoundaryIndicator()); @@ -1839,7 +1839,7 @@ namespace hp types::global_dof_index n = 0; // search left-most cell - if (boundary_indicators.find (0) != boundary_indicators.end()) + if (boundary_ids.find (0) != boundary_ids.end()) { cell = this->begin_active(); while (!cell->at_boundary(0)) @@ -1848,7 +1848,7 @@ namespace hp } // same with right-most cell - if (boundary_indicators.find (1) != boundary_indicators.end()) + if (boundary_ids.find (1) != boundary_ids.end()) { cell = this->begin_active(); while (!cell->at_boundary(1)) @@ -1862,15 +1862,15 @@ namespace hp template <> - types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set &boundary_indicators) const + types::global_dof_index DoFHandler<1>::n_boundary_dofs (const std::set &boundary_ids) const { Assert (finite_elements != 0, ExcNoFESelected()); // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (std::set::const_iterator i=boundary_indicators.begin(); - i!=boundary_indicators.end(); ++i) + for (std::set::const_iterator i=boundary_ids.begin(); + i!=boundary_ids.end(); ++i) Assert ((*i == 0) || (*i == 1), ExcInvalidBoundaryIndicator()); @@ -1878,7 +1878,7 @@ namespace hp types::global_dof_index n = 0; // search left-most cell - if (boundary_indicators.find (0) != boundary_indicators.end()) + if (boundary_ids.find (0) != boundary_ids.end()) { cell = this->begin_active(); while (!cell->at_boundary(0)) @@ -1887,7 +1887,7 @@ namespace hp } // same with right-most cell - if (boundary_indicators.find (1) != boundary_indicators.end()) + if (boundary_ids.find (1) != boundary_ids.end()) { cell = this->begin_active(); while (!cell->at_boundary(1)) @@ -1984,10 +1984,10 @@ namespace hp template types::global_dof_index - DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicators) const + DoFHandler::n_boundary_dofs (const FunctionMap &boundary_ids) const { Assert (finite_elements != 0, ExcNoFESelected()); - Assert (boundary_indicators.find(numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find(numbers::internal_face_boundary_id) == boundary_ids.end(), ExcInvalidBoundaryIndicator()); // same as above, but with @@ -2002,8 +2002,8 @@ namespace hp for (; cell!=endc; ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f) && - (boundary_indicators.find(cell->face(f)->boundary_indicator()) != - boundary_indicators.end())) + (boundary_ids.find(cell->face(f)->boundary_id()) != + boundary_ids.end())) { const unsigned int dofs_per_face = cell->get_fe().dofs_per_face; dofs_on_face.resize (dofs_per_face); @@ -2020,10 +2020,10 @@ namespace hp template types::global_dof_index - DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const + DoFHandler::n_boundary_dofs (const std::set &boundary_ids) const { Assert (finite_elements != 0, ExcNoFESelected()); - Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_ids.find (numbers::internal_face_boundary_id) == boundary_ids.end(), ExcInvalidBoundaryIndicator()); // same as above, but with @@ -2038,8 +2038,8 @@ namespace hp for (; cell!=endc; ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->at_boundary(f) && - (boundary_indicators.find(cell->face(f)->boundary_indicator()) != - boundary_indicators.end())) + (boundary_ids.find(cell->face(f)->boundary_id()) != + boundary_ids.end())) { const unsigned int dofs_per_face = cell->get_fe().dofs_per_face; dofs_on_face.resize (dofs_per_face); diff --git a/source/multigrid/mg_tools.cc b/source/multigrid/mg_tools.cc index 781456810a..764aaa1d33 100644 --- a/source/multigrid/mg_tools.cc +++ b/source/multigrid/mg_tools.cc @@ -1219,7 +1219,7 @@ namespace MGTools { const typename DoFHandler::face_iterator face = cell->face(face_no); - const types::boundary_id bi = face->boundary_indicator(); + const types::boundary_id bi = face->boundary_id(); // Face is listed in // boundary map if (function_map.find(bi) != function_map.end()) @@ -1276,7 +1276,7 @@ namespace MGTools } typename DoFHandler::face_iterator face = cell->face(face_no); - const types::boundary_id boundary_component = face->boundary_indicator(); + const types::boundary_id boundary_component = face->boundary_id(); if (function_map.find(boundary_component) != function_map.end()) // face is of the right component { diff --git a/source/numerics/error_estimator.cc b/source/numerics/error_estimator.cc index 2d6e2fe6fd..39b4a7b820 100644 --- a/source/numerics/error_estimator.cc +++ b/source/numerics/error_estimator.cc @@ -409,16 +409,16 @@ namespace internal // neumann boundary face. compute difference between normal derivative // and boundary function { - const types::boundary_id boundary_indicator = face->boundary_indicator(); + const types::boundary_id boundary_id = face->boundary_id(); - Assert (parallel_data.neumann_bc->find(boundary_indicator) != + Assert (parallel_data.neumann_bc->find(boundary_id) != parallel_data.neumann_bc->end(), ExcInternalError ()); // get the values of the boundary function at the quadrature points if (n_components == 1) { std::vector g(n_q_points); - parallel_data.neumann_bc->find(boundary_indicator)->second + parallel_data.neumann_bc->find(boundary_id)->second ->value_list (fe_face_values_cell.get_present_fe_values() .get_quadrature_points(), g); @@ -430,7 +430,7 @@ namespace internal { std::vector > g(n_q_points, dealii::Vector(n_components)); - parallel_data.neumann_bc->find(boundary_indicator)->second + parallel_data.neumann_bc->find(boundary_id)->second ->vector_value_list (fe_face_values_cell.get_present_fe_values() .get_quadrature_points(), g); @@ -689,7 +689,7 @@ namespace internal // face into the list of faces with contribution zero. if (face->at_boundary() && - (parallel_data.neumann_bc->find(face->boundary_indicator()) == + (parallel_data.neumann_bc->find(face->boundary_id()) == parallel_data.neumann_bc->end())) { local_face_integrals[face] diff --git a/source/numerics/matrix_tools.cc b/source/numerics/matrix_tools.cc index eeec3f0743..bbb429d07d 100644 --- a/source/numerics/matrix_tools.cc +++ b/source/numerics/matrix_tools.cc @@ -925,7 +925,7 @@ namespace MatrixCreator for (unsigned int face=0; face::faces_per_cell; ++face) // check if this face is on that part of // the boundary we are interested in - if (boundary_functions.find(cell->face(face)->boundary_indicator()) != + if (boundary_functions.find(cell->face(face)->boundary_id()) != boundary_functions.end()) { copy_data.cell_matrix.push_back(FullMatrix (copy_data.dofs_per_cell, @@ -936,7 +936,7 @@ namespace MatrixCreator if (fe_is_system) // FE has several components { - boundary_functions.find(cell->face(face)->boundary_indicator()) + boundary_functions.find(cell->face(face)->boundary_id()) ->second->vector_value_list (fe_values.get_quadrature_points(), rhs_values_system); @@ -1029,7 +1029,7 @@ namespace MatrixCreator else // FE is a scalar one { - boundary_functions.find(cell->face(face)->boundary_indicator()) + boundary_functions.find(cell->face(face)->boundary_id()) ->second->value_list (fe_values.get_quadrature_points(), rhs_values_scalar); if (coefficient != 0) @@ -1106,7 +1106,7 @@ namespace MatrixCreator { // check if this face is on that part of // the boundary we are interested in - if (boundary_functions.find(copy_data.cell->face(face)->boundary_indicator()) != + if (boundary_functions.find(copy_data.cell->face(face)->boundary_id()) != boundary_functions.end()) { for (unsigned int i=0; i::faces_per_cell; ++face) // check if this face is on that part of // the boundary we are interested in - if (boundary_functions.find(cell->face(face)->boundary_indicator()) != + if (boundary_functions.find(cell->face(face)->boundary_id()) != boundary_functions.end()) { x_fe_values.reinit (cell, face); @@ -1299,7 +1299,7 @@ namespace MatrixCreator { rhs_values_system.resize (fe_values.n_quadrature_points, Vector(n_function_components)); - boundary_functions.find(cell->face(face)->boundary_indicator()) + boundary_functions.find(cell->face(face)->boundary_id()) ->second->vector_value_list (fe_values.get_quadrature_points(), rhs_values_system); @@ -1384,7 +1384,7 @@ namespace MatrixCreator // FE is a scalar one { rhs_values_scalar.resize (fe_values.n_quadrature_points); - boundary_functions.find(cell->face(face)->boundary_indicator()) + boundary_functions.find(cell->face(face)->boundary_id()) ->second->value_list (fe_values.get_quadrature_points(), rhs_values_scalar); if (coefficient != 0) @@ -1482,7 +1482,7 @@ namespace MatrixCreator { // check if this face is on that part of // the boundary we are interested in - if (boundary_functions.find(copy_data.cell->face(face)->boundary_indicator()) != + if (boundary_functions.find(copy_data.cell->face(face)->boundary_id()) != boundary_functions.end()) { #ifdef DEBUG