From: goll Date: Mon, 27 Feb 2012 18:22:33 +0000 (+0000) Subject: Introduction of types::boundary_id_t and types::material_id_t X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a38fca23143783b63c5b5c054de3b2a96c0df83;p=dealii-svn.git Introduction of types::boundary_id_t and types::material_id_t git-svn-id: https://svn.dealii.org/trunk@25179 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 5c25d1f47a..14b3ec7851 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -24,7 +24,9 @@ inconvenience this causes.

    -
  1. None so far. +
  2. Changed: The the argument material_id of the estimate-functions of the KellyErrorEstimator class are now of type types::material_id_type with the default value types::invalid_material_id instead of type unsigned int with the default value numbers::invalid_unsigned_int. The member functions Triangulation::set_boundary and Triangulation::get_boundary now take a types::boundary_id_t instead of an unsigned int. +
    +(Wolfgang Bangerth, Christian Goll 2012/02/27)
@@ -34,6 +36,13 @@ inconvenience this causes.

General

    +
  1. Changed: Material and Boundary indicators have been both of the type unsigned char. Throughout the library, we changed their datatype to types::material_id_t resp. types::boundary_id_t, both typedefs of unsigned char. Internal faces are now characterized by types::internal_face_boundary_id(=static_cast(-1)) instead of 255, +so we get rid of that mysterious numberin the source code. +Material_ids are also assumed to lie in the range from 0 to types::invalid_material_id-1 (where types::invalid_material_id = static_cast(-1)). With this change, it is now much easier to extend the range of boundary or material ids, if needed. + +
    +(Wolfgang Bangerth, Christian Goll 2012/02/27) +
  2. New: Functions like FEValues::get_function_values have long been able to extract values from pretty much any vector kind given to it (e.g. of kind Vector, BlockVector, PETScWrappers::Vector, etc). The list of diff --git a/deal.II/include/deal.II/base/types.h b/deal.II/include/deal.II/base/types.h index ad51855a31..5e6c16a4ef 100644 --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@ -77,6 +77,29 @@ namespace types * of freedom. */ const global_dof_index invalid_dof_index = static_cast(-1); + + /** + * The type used to denote boundary_indicators. + */ + typedef unsigned char boundary_id_t; + + /** + * The number which we reserve for internal faces. + * We assume that all boundary_ids lie in the range [0, internal_face_boundary_id). + */ + const boundary_id_t internal_face_boundary_id = static_cast(-1); + + /** + * The type used to denote boundary_indicators. + */ + typedef unsigned char material_id_t; + + /** + * Invalid material_id which we need in several places as a default value. + * We assume that all material_ids lie in the range [0, invalid_material_id). + */ + const material_id_t invalid_material_id = static_cast(-1); + } diff --git a/deal.II/include/deal.II/dofs/dof_handler.h b/deal.II/include/deal.II/dofs/dof_handler.h index 7b74135fe1..531d00776d 100644 --- a/deal.II/include/deal.II/dofs/dof_handler.h +++ b/deal.II/include/deal.II/dofs/dof_handler.h @@ -1073,7 +1073,7 @@ class DoFHandler : public Subscriptor * consideration. */ unsigned int - n_boundary_dofs (const std::set &boundary_indicators) const; + n_boundary_dofs (const std::set &boundary_indicators) const; /** * Access to an object informing @@ -1419,7 +1419,7 @@ class DoFHandler : public Subscriptor template <> unsigned int DoFHandler<1>::n_boundary_dofs () const; template <> unsigned int DoFHandler<1>::n_boundary_dofs (const FunctionMap &) const; -template <> unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &) const; +template <> unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &) const; /* ----------------------- Inline functions ---------------------------------- */ diff --git a/deal.II/include/deal.II/dofs/dof_tools.h b/deal.II/include/deal.II/dofs/dof_tools.h index d8d3d4e6a1..10c844e3d4 100644 --- a/deal.II/include/deal.II/dofs/dof_tools.h +++ b/deal.II/include/deal.II/dofs/dof_tools.h @@ -1120,7 +1120,7 @@ namespace DoFTools extract_boundary_dofs (const DH &dof_handler, const std::vector &component_select, std::vector &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * This function is similar to @@ -1157,7 +1157,7 @@ namespace DoFTools extract_dofs_with_support_on_boundary (const DH &dof_handler, const std::vector &component_select, std::vector &selected_dofs, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * @name Hanging Nodes @@ -2168,7 +2168,7 @@ namespace DoFTools template void map_dof_to_boundary_indices (const DH &dof_handler, - const std::set &boundary_indicators, + const std::set &boundary_indicators, std::vector &mapping); /** diff --git a/deal.II/include/deal.II/dofs/function_map.h b/deal.II/include/deal.II/dofs/function_map.h index 1b2fb7f652..0ed1c1fb19 100644 --- a/deal.II/include/deal.II/dofs/function_map.h +++ b/deal.II/include/deal.II/dofs/function_map.h @@ -48,7 +48,7 @@ struct FunctionMap * name it in the fashion of the * STL local typedefs. */ - typedef std::map*> type; + typedef std::map*> type; }; DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/include/deal.II/grid/grid_generator.h b/deal.II/include/deal.II/grid/grid_generator.h index 988640668d..6f8d623cce 100644 --- a/deal.II/include/deal.II/grid/grid_generator.h +++ b/deal.II/include/deal.II/grid/grid_generator.h @@ -280,7 +280,7 @@ class GridGenerator subdivided_hyper_rectangle (Triangulation &tria, const std::vector< std::vector > &spacing, const Point &p, - const Table &material_id, + const Table &material_id, const bool colorize=false); /** diff --git a/deal.II/include/deal.II/grid/grid_out.h b/deal.II/include/deal.II/grid/grid_out.h index 742d2ef249..9863ae3894 100644 --- a/deal.II/include/deal.II/grid/grid_out.h +++ b/deal.II/include/deal.II/grid/grid_out.h @@ -1530,7 +1530,8 @@ class GridOut * indicator not equal to zero. Only * these faces are explicitly printed * in the write_* functions; - * all faces with indicator 255 are + * all faces with indicator + * types::internal_face_boundary_id are * interior ones and an indicator with * value zero for faces at the boundary * are considered default. @@ -1564,7 +1565,8 @@ class GridOut * indicator not equal to zero. Only * these lines are explicitly printed * in the write_* functions; - * all lines with indicator 255 are + * all lines with indicator + * types::internal_face_boundary_id are * interior ones and an indicator with * value zero for faces at the boundary * are considered default. diff --git a/deal.II/include/deal.II/grid/grid_tools.h b/deal.II/include/deal.II/grid/grid_tools.h index f17b2c0f3f..2bcbfe3e85 100644 --- a/deal.II/include/deal.II/grid/grid_tools.h +++ b/deal.II/include/deal.II/grid/grid_tools.h @@ -898,8 +898,8 @@ namespace GridTools typename Container::face_iterator> extract_boundary_mesh (const Container &volume_mesh, Container &surface_mesh, - const std::set &boundary_ids - = std::set()); + const std::set &boundary_ids + = std::set()); /** * Exception diff --git a/deal.II/include/deal.II/grid/tria.h b/deal.II/include/deal.II/grid/tria.h index 15d04bc3ed..c5117562c1 100644 --- a/deal.II/include/deal.II/grid/tria.h +++ b/deal.II/include/deal.II/grid/tria.h @@ -97,20 +97,22 @@ struct CellData unsigned int vertices[GeometryInfo::vertices_per_cell]; /** - * Material indicator of this - * cell. May be used to denote + * Material or boundary indicator + * of this cell. The material_id + * may be used to denote * different coefficients, etc. * * Note that if this object is part of a * SubCellData object, then it represents - * a face or edge of a cell. Since - * deal.II only allows material_id tags - * on cells, this field is re-interpreted - * to indicate the boundary_indicator of - * a face or edge. In other words, for - * faces, this field is a misnomer. - */ - unsigned char material_id; + * a face or edge of a cell. In this case + * one should use the field boundary_id + * instead of material_id. + */ + union + { + types::boundary_id_t boundary_id; + types::material_id_t material_id; + }; }; @@ -133,10 +135,10 @@ struct CellData * boundary component is a list of lines which are given a common * number describing the boundary condition to hold on this part of the * boundary. The triangulation creation function gives lines not in this - * list either the boundary indicator zero (if on the boundary) or 255 - * (if in the interior). Explicitely giving a line the indicator 255 - * will result in an error, as well as giving an interior line a boundary - * indicator. + * list either the boundary indicator zero (if on the boundary) or + * types::internal_face_boundary_id (if in the interior). Explicitely giving a + * line the indicator types::internal_face_boundary_id will result in an error, as well as giving + * an interior line a boundary indicator. * * @ingroup grid */ @@ -338,7 +340,6 @@ namespace internal const unsigned int version); }; -//TODO: Replace boundary[255] by a std::vector so we can use constructor of SmartPointer /** * Cache class used to store the number of used and active elements @@ -975,11 +976,13 @@ namespace internal * side vector to indicate these different parts of the model (this * use is like the material id of cells). - * Material and boundary indicators may be in the range from zero to - * 254. The value 255 is reserved to denote interior lines (in 2D) + * Boundary indicators may be in the range from zero to + * types::internal_face_boundary_id-1. The value + * types::internal_face_boundary_id is reserved to denote interior lines (in 2D) * and interior lines and quads (in 3D), which do not have a - * boundary or material indicator. This way, a program can easily + * boundary indicator. This way, a program can easily * determine, whether such an object is at the boundary or not. + * Material indicators may be in the range from zero to types::invalid_material_id-1. * * Lines in two dimensions and quads in three dimensions inherit their * boundary indicator to their children upon refinement. You should therefore @@ -1806,10 +1809,11 @@ class Triangulation : public Subscriptor * boundary, for instance the material id * in a UCD input file. They are not * necessarily consecutive but must be in - * the range 0-254. Material IDs on - * boundaries are also called boundary - * indicators and are accessed with - * accessor functions of that name. + * the range 0-(types::boundary_id_t-1). + * Material IDs on boundaries are also + * called boundary indicators and are + * accessed with accessor functions + * of that name. * * The @p boundary_object is not copied * and MUST persist until the @@ -1832,7 +1836,7 @@ class Triangulation : public Subscriptor * before by a straight boundary * approximation. */ - void set_boundary (const unsigned int number, + void set_boundary (const types::boundary_id_t number, const Boundary &boundary_object); /** @@ -1844,7 +1848,7 @@ class Triangulation : public Subscriptor * boundary object by the function of * same name and two arguments. */ - void set_boundary (const unsigned int number); + void set_boundary (const types::boundary_id_t number); /** * Return a constant reference to @@ -1853,7 +1857,7 @@ class Triangulation : public Subscriptor * the same as in * @p set_boundary */ - const Boundary & get_boundary (const unsigned int number) const; + const Boundary & get_boundary (const types::boundary_id_t number) const; /** * Returns a vector containing @@ -1868,7 +1872,7 @@ class Triangulation : public Subscriptor * indicators (which is greater * or equal one). */ - std::vector get_boundary_indicators() const; + std::vector get_boundary_indicators() const; /** * Copy a triangulation. This @@ -3699,14 +3703,11 @@ class Triangulation : public Subscriptor /** * Collection of boundary - * objects. We only need 255 - * objects rather than 256, - * since the indicator 255 is - * reserved for interior faces - * and can thus never be - * associated with a boundary. + * objects. We store only + * objects, which are not + * of type StraightBoundary. */ - SmartPointer,Triangulation > boundary[255]; + std::map , Triangulation > > boundary; /** * Flag indicating whether @@ -3765,7 +3766,7 @@ class Triangulation : public Subscriptor * TriaAccessor::set_boundary_indicator) * were not a pointer. */ - std::map *vertex_to_boundary_id_map_1d; + std::map *vertex_to_boundary_id_map_1d; /** * A map that correlates each refinement listener that has been added diff --git a/deal.II/include/deal.II/grid/tria_accessor.h b/deal.II/include/deal.II/grid/tria_accessor.h index bba126f20e..0c9afcfa53 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.h +++ b/deal.II/include/deal.II/grid/tria_accessor.h @@ -1018,10 +1018,11 @@ class TriaAccessor : public TriaAccessorBase * object. * * If the return value is the special - * value 255, then this object is in the + * value types::internal_face_boundary_id, + * then this object is in the * interior of the domain. */ - unsigned char boundary_indicator () const; + types::boundary_id_t boundary_indicator () const; /** * Set the boundary indicator. @@ -1049,21 +1050,23 @@ class TriaAccessor : public TriaAccessorBase * boundary indicator of an interior face * (a face not at the boundary of the * domain), or set set the boundary - * indicator of an exterior face to 255 + * indicator of an exterior face to + * types::internal_face_boundary_id * (this value is reserved for another * purpose). Algorithms may not work or * produce very confusing results if * boundary cells have a boundary - * indicator of 255 or if interior cells - * have boundary indicators other than - * 255. Unfortunately, the current object + * indicator of types::internal_face_boundary_id + * or if interior cells have boundary + * indicators other than types::internal_face_boundary_id. + * Unfortunately, the current object * has no means of finding out whether it * really is at the boundary of the * domain and so cannot determine whether * the value you are trying to set makes * sense under the current circumstances. */ - void set_boundary_indicator (const unsigned char) const; + void set_boundary_indicator (const types::boundary_id_t) const; /** * Do as set_boundary_indicator() @@ -1081,7 +1084,7 @@ class TriaAccessor : public TriaAccessorBase * at the same time using the * current function. */ - void set_all_boundary_indicators (const unsigned char) const; + void set_all_boundary_indicators (const types::boundary_id_t) const; /** * Return whether this object is at the @@ -1922,10 +1925,11 @@ class TriaAccessor<0, 1, spacedim> * boundary indicator one. * * If the return value is the special - * value 255, then this object is in the + * value types::internal_face_boundary_id, + * then this object is in the * interior of the domain. */ - unsigned char boundary_indicator () const; + types::boundary_id_t boundary_indicator () const; /** * @name Orientation of sub-objects @@ -2034,14 +2038,16 @@ class TriaAccessor<0, 1, spacedim> * boundary indicator of an interior face * (a face not at the boundary of the * domain), or set set the boundary - * indicator of an exterior face to 255 + * indicator of an exterior face to + * types::internal_face_boundary_id * (this value is reserved for another * purpose). Algorithms may not work or * produce very confusing results if * boundary cells have a boundary - * indicator of 255 or if interior cells - * have boundary indicators other than - * 255. Unfortunately, the current object + * indicator of types::internal_face_boundary_id + * or if interior cells have boundary + * indicators other than types::internal_face_boundary_id. + * Unfortunately, the current object * has no means of finding out whether it * really is at the boundary of the * domain and so cannot determine whether @@ -2049,7 +2055,7 @@ class TriaAccessor<0, 1, spacedim> * sense under the current circumstances. */ void - set_boundary_indicator (const unsigned char); + set_boundary_indicator (const types::boundary_id_t); /** * Since this object only represents a @@ -2058,7 +2064,7 @@ class TriaAccessor<0, 1, spacedim> * argument. */ void - set_all_boundary_indicators (const unsigned char); + set_all_boundary_indicators (const types::boundary_id_t); /** * Return whether the vertex @@ -2593,7 +2599,7 @@ class CellAccessor : public TriaAccessor * "glossary" for more * information. */ - unsigned char material_id () const; + types::material_id_t material_id () const; /** * Set the material id of this @@ -2607,7 +2613,7 @@ class CellAccessor : public TriaAccessor * "glossary" for more * information. */ - void set_material_id (const unsigned char new_material_id) const; + void set_material_id (const types::material_id_t new_material_id) const; /** * Set the material id of this @@ -2619,7 +2625,7 @@ class CellAccessor : public TriaAccessor * "glossary" for more * information. */ - void recursively_set_material_id (const unsigned char new_material_id) const; + void recursively_set_material_id (const types::material_id_t new_material_id) const; /** * @} */ diff --git a/deal.II/include/deal.II/grid/tria_accessor.templates.h b/deal.II/include/deal.II/grid/tria_accessor.templates.h index 06ab8003ea..dcbc34982d 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -1812,13 +1812,13 @@ TriaAccessor::number_of_children () const template -unsigned char +types::boundary_id_t TriaAccessor::boundary_indicator () const { Assert (structdimused(), TriaAccessorExceptions::ExcCellNotUsed()); - return this->objects().material_id[this->present_index]; + return this->objects().boundary_or_material_id[this->present_index].boundary_id; } @@ -1826,12 +1826,12 @@ TriaAccessor::boundary_indicator () const template void TriaAccessor:: -set_boundary_indicator (const unsigned char boundary_ind) const +set_boundary_indicator (const types::boundary_id_t boundary_ind) const { Assert (structdimused(), TriaAccessorExceptions::ExcCellNotUsed()); - this->objects().material_id[this->present_index] = boundary_ind; + this->objects().boundary_or_material_id[this->present_index].boundary_id = boundary_ind; } @@ -1839,10 +1839,9 @@ set_boundary_indicator (const unsigned char boundary_ind) const template void TriaAccessor:: -set_all_boundary_indicators (const unsigned char boundary_ind) const +set_all_boundary_indicators (const types::boundary_id_t boundary_ind) const { set_boundary_indicator (boundary_ind); - set_boundary_indicator (boundary_ind); switch (structdim) { @@ -1871,7 +1870,7 @@ TriaAccessor::at_boundary () const { // error checking is done // in boundary_indicator() - return (boundary_indicator() != 255); + return (boundary_indicator() != types::internal_face_boundary_id); } @@ -1884,7 +1883,7 @@ TriaAccessor::get_boundary () const Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed()); return this->tria->get_boundary(this->objects() - .material_id[this->present_index]); + .boundary_or_material_id[this->present_index].boundary_id); } @@ -2229,7 +2228,7 @@ TriaAccessor<0, 1, spacedim>::at_boundary () const template inline -unsigned char +types::boundary_id_t TriaAccessor<0, 1, spacedim>::boundary_indicator () const { switch (vertex_kind) @@ -2245,7 +2244,7 @@ TriaAccessor<0, 1, spacedim>::boundary_indicator () const } default: - return 255; + return types::internal_face_boundary_id; } } @@ -2366,7 +2365,7 @@ int TriaAccessor<0, 1, spacedim>::isotropic_child_index (const unsigned int) template inline void -TriaAccessor<0, 1, spacedim>::set_boundary_indicator (const unsigned char b) +TriaAccessor<0, 1, spacedim>::set_boundary_indicator (const types::boundary_id_t b) { Assert (tria->vertex_to_boundary_id_map_1d->find (this->vertex_index()) != tria->vertex_to_boundary_id_map_1d->end(), @@ -2379,7 +2378,7 @@ TriaAccessor<0, 1, spacedim>::set_boundary_indicator (const unsigned char b) template inline -void TriaAccessor<0, 1, spacedim>::set_all_boundary_indicators (const unsigned char b) +void TriaAccessor<0, 1, spacedim>::set_all_boundary_indicators (const types::boundary_id_t b) { set_boundary_indicator (b); } diff --git a/deal.II/include/deal.II/grid/tria_objects.h b/deal.II/include/deal.II/grid/tria_objects.h index 646655e491..214d13ee99 100644 --- a/deal.II/include/deal.II/grid/tria_objects.h +++ b/deal.II/include/deal.II/grid/tria_objects.h @@ -127,12 +127,29 @@ namespace internal * Triangulation::clear_user_flags(). */ std::vector user_flags; - + + + /** + * We use this union to store boundary and material + * data. Because only one one out of these two is + * actually needed here, we use an union. + */ + union BoundaryOrMaterialId + { + types::boundary_id_t boundary_id; + types::material_id_t material_id; + + std::size_t memory_consumption () const + { + return std::max(sizeof(material_id),sizeof(boundary_id)); + } + }; /** * Store boundary and material data. For * example, in one dimension, this field * stores the material id of a line, which - * is a number between 0 and 254. In more + * is a number between 0 and + * types::invalid_material_id-1. In more * than one dimension, lines have no * material id, but they may be at the * boundary; then, we store the @@ -141,36 +158,39 @@ namespace internal * boundary this line belongs and which * boundary conditions hold on this * part. The boundary indicator also - * is a number between zero and 254; - * the id 255 is reserved for lines + * is a number between zero and + * types::internal_face_boundary_id-1; + * the id types::internal_face_boundary_id + * is reserved for lines * in the interior and may be used * to check whether a line is at the * boundary or not, which otherwise * is not possible if you don't know * which cell it belongs to. */ - std::vector material_id; - /** - * Assert that enough space - * is allocated to - * accomodate - * new_objs_in_pairs - * new objects, stored in - * pairs, plus - * new_obj_single - * stored individually. - * This function does not - * only call - * vector::reserve(), - * but does really append - * the needed elements. - * - * In 2D e.g. refined lines have to be - * stored in pairs, whereas new lines in the - * interior of refined cells can be stored as - * single lines. - */ + std::vector boundary_or_material_id; + + /** + * Assert that enough space + * is allocated to + * accomodate + * new_objs_in_pairs + * new objects, stored in + * pairs, plus + * new_obj_single + * stored individually. + * This function does not + * only call + * vector::reserve(), + * but does really append + * the needed elements. + * + * In 2D e.g. refined lines have to be + * stored in pairs, whereas new lines in the + * interior of refined cells can be stored as + * single lines. + */ void reserve_space (const unsigned int new_objs_in_pairs, const unsigned int new_objs_single = 0); @@ -792,7 +812,7 @@ namespace internal ar & refinement_cases; ar & used; ar & user_flags; - ar & material_id; + ar & boundary_or_material_id; ar & next_free_single & next_free_pair & reverse_order_next_free_single; ar & user_data & user_data_type; } diff --git a/deal.II/include/deal.II/hp/dof_handler.h b/deal.II/include/deal.II/hp/dof_handler.h index 80f7d2bd3b..302593fed0 100644 --- a/deal.II/include/deal.II/hp/dof_handler.h +++ b/deal.II/include/deal.II/hp/dof_handler.h @@ -863,7 +863,7 @@ namespace hp * consideration. */ unsigned int - n_boundary_dofs (const std::set &boundary_indicators) const; + n_boundary_dofs (const std::set &boundary_indicators) const; /** * Return the number of diff --git a/deal.II/include/deal.II/numerics/error_estimator.h b/deal.II/include/deal.II/numerics/error_estimator.h index b5b9049a08..6fdb184536 100644 --- a/deal.II/include/deal.II/numerics/error_estimator.h +++ b/deal.II/include/deal.II/numerics/error_estimator.h @@ -285,12 +285,12 @@ class KellyErrorEstimator * neighboring cells as well, even if * they belong to a different subdomain. * - * The @p material_id parameter has a - * similar meaning: if not set to its - * default value, it means that - * indicators will only be computed for - * cells with this particular material - * id. + * The @p material_id parameter has a similar + * meaning: if not set to its default value + * (which is types::invalid_material_id), + * it means that indicators will only be + * computed for cells with this particular + * material id. * * The @p n_threads parameter used to * indicate the number of threads to be @@ -336,7 +336,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = numbers::invalid_unsigned_int, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** * Calls the @p estimate @@ -353,7 +353,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** * Same function as above, but @@ -393,7 +393,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** * Calls the @p estimate @@ -410,7 +410,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -430,7 +430,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -449,7 +449,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -469,7 +469,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -488,7 +488,7 @@ class KellyErrorEstimator const Function* coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -599,7 +599,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** * Calls the @p estimate @@ -616,7 +616,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** * Same function as above, but @@ -656,7 +656,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** * Calls the @p estimate @@ -673,7 +673,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -693,7 +693,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -712,7 +712,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -732,7 +732,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** @@ -751,7 +751,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id_t subdomain_id = types::invalid_subdomain_id, - const unsigned int material_id = numbers::invalid_unsigned_int); + const types::material_id_t material_id = types::invalid_material_id); /** * Exception diff --git a/deal.II/include/deal.II/numerics/vectors.h b/deal.II/include/deal.II/numerics/vectors.h index d34c18b888..93dcc69c1a 100644 --- a/deal.II/include/deal.II/numerics/vectors.h +++ b/deal.II/include/deal.II/numerics/vectors.h @@ -121,8 +121,9 @@ class ConstraintMatrix; * the trace of the function to the boundary is done with the * VectorTools::project_boundary_values() (see below) function, * which is called with a map of boundary functions FunctioMap in - * which all boundary indicators from zero to 254 (255 is used for - * other purposes, see the Triangulation class documentation) point + * which all boundary indicators from zero to types::internal_face_boundary_id-1 + * (types::internal_face_boundary_id is used for other purposes, + * see the Triangulation class documentation) point * to the function to be projected. The projection to the boundary * takes place using a second quadrature formula on the boundary * given to the project() function. The first quadrature formula is @@ -193,7 +194,7 @@ class ConstraintMatrix; * of boundary nodes and their values. You can get such a list by interpolation * of a boundary function using the interpolate_boundary_values() function. * To use it, you have to - * specify a list of pairs of boundary indicators (of type unsigned char; + * specify a list of pairs of boundary indicators (of type types::boundary_id_t; * see the section in the documentation of the Triangulation class for more * details) and the according functions denoting the dirichlet boundary values * of the nodes on boundary faces with this boundary indicator. @@ -688,9 +689,9 @@ namespace VectorTools * @p boundary_component * corresponds to the number * @p boundary_indicator of the - * face. 255 is an illegal - * value, since it is reserved - * for interior faces. + * face. types::internal_face_boundary_id + * is an illegal value, since + * it is reserved for interior faces. * * The flags in the last * parameter, @p component_mask @@ -762,7 +763,7 @@ namespace VectorTools void interpolate_boundary_values (const Mapping &mapping, const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, std::map &boundary_values, const std::vector &component_mask = std::vector()); @@ -777,7 +778,7 @@ namespace VectorTools void interpolate_boundary_values (const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, std::map &boundary_values, const std::vector &component_mask = std::vector()); @@ -837,7 +838,8 @@ namespace VectorTools * * The parameter @p boundary_component * corresponds to the number @p - * boundary_indicator of the face. 255 + * boundary_indicator of the face. + * types::internal_face_boundary_id * is an illegal value, since it is * reserved for interior faces. * @@ -905,7 +907,7 @@ namespace VectorTools void interpolate_boundary_values (const Mapping &mapping, const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, ConstraintMatrix &constraints, const std::vector &component_mask = std::vector()); @@ -922,7 +924,7 @@ namespace VectorTools void interpolate_boundary_values (const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, ConstraintMatrix &constraints, const std::vector &component_mask = std::vector()); @@ -1145,7 +1147,8 @@ namespace VectorTools * * The parameter @p boundary_component * corresponds to the number - * @p boundary_indicator of the face. 255 + * @p boundary_indicator of the face. + * types::internal_face_boundary_id * is an illegal value, since it is * reserved for interior faces. * @@ -1177,7 +1180,7 @@ namespace VectorTools void project_boundary_values_curl_conforming (const DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const Mapping& mapping = StaticMappingQ1::mapping); @@ -1190,7 +1193,7 @@ namespace VectorTools void project_boundary_values_curl_conforming (const hp::DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const hp::MappingCollection& mapping_collection = hp::StaticMappingQ1::mapping_collection); @@ -1239,7 +1242,8 @@ namespace VectorTools * * The parameter @p boundary_component * corresponds to the number - * @p boundary_indicator of the face. 255 + * @p boundary_indicator of the face. + * types::internal_face_boundary_id * is an illegal value, since it is * reserved for interior faces. * @@ -1262,7 +1266,7 @@ namespace VectorTools void project_boundary_values_div_conforming (const DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const Mapping& mapping = StaticMappingQ1::mapping); @@ -1275,7 +1279,7 @@ namespace VectorTools void project_boundary_values_div_conforming (const hp::DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const hp::MappingCollection& mapping_collection = hp::StaticMappingQ1::mapping_collection); @@ -1600,7 +1604,7 @@ namespace VectorTools void compute_no_normal_flux_constraints (const DH &dof_handler, const unsigned int first_vector_component, - const std::set &boundary_ids, + const std::set &boundary_ids, ConstraintMatrix &constraints, const Mapping &mapping = StaticMappingQ1::mapping); @@ -1726,7 +1730,7 @@ namespace VectorTools const Quadrature &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * Calls the @@ -1739,7 +1743,7 @@ namespace VectorTools const Quadrature &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * Same as the set of functions above, @@ -1751,7 +1755,7 @@ namespace VectorTools const hp::QCollection &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); /** * Calls the @@ -1768,7 +1772,7 @@ namespace VectorTools const hp::QCollection &q, const Function &rhs, Vector &rhs_vector, - const std::set &boundary_indicators = std::set()); + const std::set &boundary_indicators = std::set()); //@} /** diff --git a/deal.II/include/deal.II/numerics/vectors.templates.h b/deal.II/include/deal.II/numerics/vectors.templates.h index 8cb8243a06..cebeaefb47 100644 --- a/deal.II/include/deal.II/numerics/vectors.templates.h +++ b/deal.II/include/deal.II/numerics/vectors.templates.h @@ -306,7 +306,7 @@ namespace VectorTools // count, how often we have // added to this dof - Assert (touch_count[local_dof_indices[j]] < 255, + Assert (touch_count[local_dof_indices[j]] < types::internal_face_boundary_id, ExcInternalError()); ++touch_count[local_dof_indices[j]]; }; @@ -569,7 +569,7 @@ namespace VectorTools // function to hold on // all parts of the boundary typename FunctionMap::type boundary_functions; - for (unsigned char c=0; c<255; ++c) + for (types::boundary_id_t c=0; c &, const Function<1> &, Vector &, - const std::set &) + const std::set &) { Assert (false, ExcImpossibleInDim(1)); } @@ -1030,7 +1030,7 @@ namespace VectorTools const Quadrature<0> &, const Function<2> &, Vector &, - const std::set &) + const std::set &) { Assert (false, ExcImpossibleInDim(1)); } @@ -1044,7 +1044,7 @@ namespace VectorTools const Quadrature &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_indicators) { const FiniteElement &fe = dof_handler.get_fe(); Assert (fe.n_components() == rhs_function.n_components, @@ -1166,7 +1166,7 @@ namespace VectorTools const Quadrature &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_indicators) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); @@ -1187,7 +1187,7 @@ namespace VectorTools const hp::QCollection<0> &, const Function<1> &, Vector &, - const std::set &) + const std::set &) { Assert (false, ExcImpossibleInDim(1)); } @@ -1201,7 +1201,7 @@ namespace VectorTools const hp::QCollection<0> &, const Function<2> &, Vector &, - const std::set &) + const std::set &) { Assert (false, ExcImpossibleInDim(1)); } @@ -1215,7 +1215,7 @@ namespace VectorTools const hp::QCollection &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_indicators) { const hp::FECollection &fe = dof_handler.get_fe(); Assert (fe.n_components() == rhs_function.n_components, @@ -1349,7 +1349,7 @@ namespace VectorTools const hp::QCollection &quadrature, const Function &rhs_function, Vector &rhs_vector, - const std::set &boundary_indicators) + const std::set &boundary_indicators) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); create_boundary_right_hand_side(hp::StaticMappingQ1::mapping_collection, @@ -1487,7 +1487,7 @@ namespace VectorTools if (function_map.size() == 0) return; - Assert (function_map.find(255) == function_map.end(), + Assert (function_map.find(types::internal_face_boundary_id) == function_map.end(), ExcInvalidBoundaryIndicator()); const unsigned int n_components = DoFTools::n_components(dof); @@ -1645,7 +1645,7 @@ namespace VectorTools // cast the face iterator to a DoFHandler // iterator so that we can access the boundary // indicators - const unsigned char boundary_component = face->boundary_indicator(); + const types::boundary_id_t boundary_component = face->boundary_indicator(); if (function_map.find(boundary_component) != function_map.end()) { // face is of the right component @@ -1833,7 +1833,7 @@ namespace VectorTools void interpolate_boundary_values (const Mapping &mapping, const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, std::map &boundary_values, const std::vector &component_mask) @@ -1849,7 +1849,7 @@ namespace VectorTools template void interpolate_boundary_values (const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, std::map &boundary_values, const std::vector &component_mask) @@ -1916,7 +1916,7 @@ namespace VectorTools interpolate_boundary_values (const Mapping &mapping, const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, ConstraintMatrix &constraints, const std::vector &component_mask) @@ -1933,7 +1933,7 @@ namespace VectorTools void interpolate_boundary_values (const DH &dof, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, const Function &boundary_function, ConstraintMatrix &constraints, const std::vector &component_mask) @@ -2033,7 +2033,7 @@ namespace VectorTools AssertDimension (dof.get_fe().n_components(), component_mapping.size()); std::vector dof_to_boundary_mapping; - std::set selected_boundary_components; + std::set selected_boundary_components; for (typename FunctionMap::type::const_iterator i=boundary_functions.begin(); i!=boundary_functions.end(); ++i) selected_boundary_components.insert (i->first); @@ -3248,7 +3248,7 @@ namespace VectorTools project_boundary_values_curl_conforming (const DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const Mapping& mapping) { @@ -3549,7 +3549,7 @@ namespace VectorTools project_boundary_values_curl_conforming (const hp::DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const hp::MappingCollection& mapping_collection) { @@ -3968,7 +3968,7 @@ namespace VectorTools project_boundary_values_div_conforming (const DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const Mapping& mapping) { @@ -4133,7 +4133,7 @@ namespace VectorTools project_boundary_values_div_conforming (const hp::DoFHandler& dof_handler, const unsigned int first_vector_component, const Function& boundary_function, - const unsigned char boundary_component, + const types::boundary_id_t boundary_component, ConstraintMatrix& constraints, const hp::MappingCollection& mapping_collection) { @@ -4269,7 +4269,7 @@ namespace VectorTools compute_no_normal_flux_constraints (const DH &dof_handler, const unsigned int first_vector_component, - const std::set &boundary_ids, + const std::set &boundary_ids, ConstraintMatrix &constraints, const Mapping &mapping) { diff --git a/deal.II/source/dofs/dof_handler.cc b/deal.II/source/dofs/dof_handler.cc index 5caa9d6983..9e42a724f8 100644 --- a/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/source/dofs/dof_handler.cc @@ -1489,12 +1489,12 @@ unsigned int DoFHandler<1>::n_boundary_dofs (const FunctionMap &boundary_indicat template <> -unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &boundary_indicators) const +unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &boundary_indicators) const { // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (std::set::const_iterator i=boundary_indicators.begin(); + for (std::set::const_iterator i=boundary_indicators.begin(); i!=boundary_indicators.end(); ++i) Assert ((*i == 0) || (*i == 1), ExcInvalidBoundaryIndicator()); @@ -1528,12 +1528,12 @@ unsigned int DoFHandler<1,2>::n_boundary_dofs (const FunctionMap &boundary_indic template <> -unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set &boundary_indicators) const +unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set &boundary_indicators) const { // check that only boundary // indicators 0 and 1 are allowed // in 1d - for (std::set::const_iterator i=boundary_indicators.begin(); + for (std::set::const_iterator i=boundary_indicators.begin(); i!=boundary_indicators.end(); ++i) Assert ((*i == 0) || (*i == 1), ExcInvalidBoundaryIndicator()); @@ -1579,7 +1579,7 @@ template unsigned int DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicators) const { - Assert (boundary_indicators.find(255) == boundary_indicators.end(), + Assert (boundary_indicators.find(types::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); std::set boundary_dofs; @@ -1603,9 +1603,9 @@ DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicator template unsigned int -DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const +DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const { - Assert (boundary_indicators.find (255) == boundary_indicators.end(), + Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); std::set boundary_dofs; diff --git a/deal.II/source/dofs/dof_tools.cc b/deal.II/source/dofs/dof_tools.cc index 5adc456716..9afc362c00 100644 --- a/deal.II/source/dofs/dof_tools.cc +++ b/deal.II/source/dofs/dof_tools.cc @@ -472,7 +472,7 @@ namespace DoFTools const unsigned int n_dofs = dof.n_dofs(); AssertDimension (dof_to_boundary_mapping.size(), n_dofs); - Assert (boundary_indicators.find(255) == boundary_indicators.end(), + Assert (boundary_indicators.find(types::internal_face_boundary_id) == boundary_indicators.end(), typename DH::ExcInvalidBoundaryIndicator()); Assert (sparsity.n_rows() == dof.n_boundary_dofs (boundary_indicators), ExcDimensionMismatch (sparsity.n_rows(), dof.n_boundary_dofs (boundary_indicators))); @@ -3732,10 +3732,10 @@ namespace DoFTools extract_boundary_dofs (const DH &dof_handler, const std::vector &component_select, std::vector &selected_dofs, - const std::set &boundary_indicators) + const std::set &boundary_indicators) { AssertDimension (component_select.size(),n_components(dof_handler)); - Assert (boundary_indicators.find (255) == boundary_indicators.end(), + Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); const unsigned int dim=DH::dimension; @@ -3856,10 +3856,10 @@ namespace DoFTools extract_dofs_with_support_on_boundary (const DH &dof_handler, const std::vector &component_select, std::vector &selected_dofs, - const std::set &boundary_indicators) + const std::set &boundary_indicators) { AssertDimension (component_select.size(), n_components(dof_handler)); - Assert (boundary_indicators.find (255) == boundary_indicators.end(), + Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); // let's see whether we have to @@ -5652,11 +5652,11 @@ namespace DoFTools template void map_dof_to_boundary_indices ( const DH &dof_handler, - const std::set &boundary_indicators, + const std::set &boundary_indicators, std::vector &mapping) { Assert (&dof_handler.get_fe() != 0, ExcNoFESelected()); - Assert (boundary_indicators.find (255) == boundary_indicators.end(), + Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); mapping.clear (); diff --git a/deal.II/source/dofs/dof_tools.inst.in b/deal.II/source/dofs/dof_tools.inst.in index af7cdb324f..cc83666673 100644 --- a/deal.II/source/dofs/dof_tools.inst.in +++ b/deal.II/source/dofs/dof_tools.inst.in @@ -312,14 +312,14 @@ DoFTools::extract_boundary_dofs > (const DoFHandler &, const std::vector &, std::vector &, - const std::set &); + const std::set &); template void DoFTools::extract_boundary_dofs > (const hp::DoFHandler &, const std::vector &, std::vector &, - const std::set &); + const std::set &); template void @@ -327,14 +327,14 @@ DoFTools::extract_dofs_with_support_on_boundary > (const DoFHandler &, const std::vector &, std::vector &, - const std::set &); + const std::set &); template void DoFTools::extract_dofs_with_support_on_boundary > (const hp::DoFHandler &, const std::vector &, std::vector &, - const std::set &); + const std::set &); template void @@ -453,7 +453,7 @@ DoFTools::extract_boundary_dofs &, const std::vector &, std::vector &, - const std::set &); + const std::set &); template unsigned int DoFTools::count_dofs_with_subdomain_association > @@ -586,7 +586,7 @@ template void DoFTools::map_dof_to_boundary_indices > (const DoFHandler &, - const std::set &, + const std::set &, std::vector &); template @@ -601,7 +601,7 @@ template void DoFTools::map_dof_to_boundary_indices > (const hp::DoFHandler &, - const std::set &, + const std::set &, std::vector &); template @@ -695,7 +695,7 @@ template void DoFTools::map_dof_to_boundary_indices > (const DoFHandler &, - const std::set &, + const std::set &, std::vector &); template @@ -711,18 +711,18 @@ DoFTools::extract_hanging_node_dofs (const DoFHandler &dof_handler, std::vector &selected_dofs); -// template -// void -// DoFTools::map_dof_to_boundary_indices > -// (const hp::DoFHandler &, -// const std::set &, -// std::vector &); - -// template -// void -// DoFTools::map_dof_to_boundary_indices > -// (const hp::DoFHandler &, -// std::vector &); + template + void + DoFTools::map_dof_to_boundary_indices > + (const hp::DoFHandler &, + const std::set &, + std::vector &); + + template + void + DoFTools::map_dof_to_boundary_indices > + (const hp::DoFHandler &, + std::vector &); #endif diff --git a/deal.II/source/grid/grid_generator.cc b/deal.II/source/grid/grid_generator.cc index 1e4bd92f11..73f6e36614 100644 --- a/deal.II/source/grid/grid_generator.cc +++ b/deal.II/source/grid/grid_generator.cc @@ -891,7 +891,7 @@ GridGenerator::subdivided_hyper_rectangle ( Triangulation<1>& tria, const std::vector< std::vector >& spacing, const Point<1>& p, - const Table<1,unsigned char>& material_id, + const Table<1,types::material_id_t>& material_id, const bool colorize) { // contributed by Yaqi Wang 2006 @@ -920,12 +920,12 @@ GridGenerator::subdivided_hyper_rectangle ( // create the cells unsigned int n_val_cells = 0; for (unsigned int i=0; i > cells(n_val_cells); unsigned int id = 0; for (unsigned int x=0; x& tria, const std::vector< std::vector >& spacing, const Point<2>& p, - const Table<2,unsigned char>& material_id, + const Table<2,types::material_id_t>& material_id, const bool colorize) { // contributed by Yaqi Wang 2006 @@ -993,14 +993,14 @@ GridGenerator::subdivided_hyper_rectangle ( unsigned int n_val_cells = 0; for (unsigned int i=0; i > cells(n_val_cells); unsigned int id = 0; for (unsigned int y=0; y& tria, const std::vector< std::vector >& spacing, const Point<3>& p, - const Table<3,unsigned char>& material_id, + const Table<3,types::material_id_t>& material_id, const bool colorize) { // contributed by Yaqi Wang 2006 @@ -1100,7 +1100,7 @@ GridGenerator::subdivided_hyper_rectangle ( for (unsigned int i=0; i > cells(n_val_cells); @@ -1110,7 +1110,7 @@ GridGenerator::subdivided_hyper_rectangle ( for (unsigned int z=0; z &tria, for (unsigned int i1=0;i1<4;++i1) vertices[k++] = Point<2>(coords[i1], coords[i0]); - const unsigned char materials[9] = { 5, 4, 6, + const types::material_id_t materials[9] = { 5, 4, 6, 1, 0, 2, 9, 8,10 }; @@ -1751,7 +1751,7 @@ GridGenerator::half_hyper_ball (Triangulation<2> &tria, { for (unsigned int i=0;i::faces_per_cell;++i) { - if (cell->face(i)->boundary_indicator() == 255) + if (cell->face(i)->boundary_indicator() == types::internal_face_boundary_id) continue; // If x is zero, then this is part of the plane @@ -2012,7 +2012,7 @@ void GridGenerator::enclosed_hyper_cube (Triangulation<3> &tria, for (unsigned int x=0;x<4;++x) vertices[k++] = Point<3>(coords[x], coords[y], coords[z]); - const unsigned char materials[27] = { + const types::material_id_t materials[27] = { 21,20,22, 17,16,18, 25,24,26, diff --git a/deal.II/source/grid/grid_in.cc b/deal.II/source/grid/grid_in.cc index a371e6aaed..97dba60d06 100644 --- a/deal.II/source/grid/grid_in.cc +++ b/deal.II/source/grid/grid_in.cc @@ -107,10 +107,13 @@ void GridIn::read_ucd (std::istream &in) AssertThrow (in, ExcIO()); std::string cell_type; - int material_id; + + // we use an unsigned int because we + // fill this variable through an read-in process + unsigned int material_id; in >> dummy // cell number - >> material_id; + >> material_id; in >> cell_type; if (((cell_type == "line") && (dim == 1)) || @@ -122,7 +125,15 @@ void GridIn::read_ucd (std::istream &in) cells.push_back (CellData()); for (unsigned int i=0; i::vertices_per_cell; ++i) in >> cells.back().vertices[i]; - cells.back().material_id = material_id; + + // to make sure that the cast wont fail + Assert(material_id<= std::numeric_limits::max(), + ExcIndexRange(material_id,0,std::numeric_limits::max())); + // we use only material_ids in the range from 0 to types::invalid_material_id-1 + Assert(material_id < types::invalid_material_id, + ExcIndexRange(material_id,0,types::invalid_material_id)); + + cells.back().material_id = static_cast(material_id); // transform from ucd to // consecutive numbering @@ -144,7 +155,16 @@ void GridIn::read_ucd (std::istream &in) subcelldata.boundary_lines.push_back (CellData<1>()); in >> subcelldata.boundary_lines.back().vertices[0] >> subcelldata.boundary_lines.back().vertices[1]; - subcelldata.boundary_lines.back().material_id = material_id; + + // to make sure that the cast wont fail + Assert(material_id<= std::numeric_limits::max(), + ExcIndexRange(material_id,0,std::numeric_limits::max())); + // we use only boundary_ids in the range from 0 to types::internal_face_boundary_id-1 + Assert(material_id < types::internal_face_boundary_id, + ExcIndexRange(material_id,0,types::internal_face_boundary_id)); + + subcelldata.boundary_lines.back().boundary_id + = static_cast(material_id); // transform from ucd to // consecutive numbering @@ -174,7 +194,15 @@ void GridIn::read_ucd (std::istream &in) >> subcelldata.boundary_quads.back().vertices[2] >> subcelldata.boundary_quads.back().vertices[3]; - subcelldata.boundary_quads.back().material_id = material_id; + // to make sure that the cast wont fail + Assert(material_id<= std::numeric_limits::max(), + ExcIndexRange(material_id,0,std::numeric_limits::max())); + // we use only boundary_ids in the range from 0 to types::internal_face_boundary_id-1 + Assert(material_id < types::internal_face_boundary_id, + ExcIndexRange(material_id,0,types::internal_face_boundary_id)); + + subcelldata.boundary_quads.back().boundary_id + = static_cast(material_id); // transform from ucd to // consecutive numbering @@ -740,7 +768,15 @@ void GridIn::read_msh (std::istream &in) cells.push_back (CellData()); for (unsigned int i=0; i::vertices_per_cell; ++i) in >> cells.back().vertices[i]; - cells.back().material_id = material_id; + + // to make sure that the cast wont fail + Assert(material_id<= std::numeric_limits::max(), + ExcIndexRange(material_id,0,std::numeric_limits::max())); + // we use only material_ids in the range from 0 to types::invalid_material_id-1 + Assert(material_id < types::invalid_material_id, + ExcIndexRange(material_id,0,types::invalid_material_id)); + + cells.back().material_id = static_cast(material_id); // transform from ucd to // consecutive numbering @@ -761,7 +797,16 @@ void GridIn::read_msh (std::istream &in) subcelldata.boundary_lines.push_back (CellData<1>()); in >> subcelldata.boundary_lines.back().vertices[0] >> subcelldata.boundary_lines.back().vertices[1]; - subcelldata.boundary_lines.back().material_id = material_id; + + // to make sure that the cast wont fail + Assert(material_id<= std::numeric_limits::max(), + ExcIndexRange(material_id,0,std::numeric_limits::max())); + // we use only boundary_ids in the range from 0 to types::internal_face_boundary_id-1 + Assert(material_id < types::internal_face_boundary_id, + ExcIndexRange(material_id,0,types::internal_face_boundary_id)); + + subcelldata.boundary_lines.back().boundary_id + = static_cast(material_id); // transform from ucd to // consecutive numbering @@ -791,7 +836,15 @@ void GridIn::read_msh (std::istream &in) >> subcelldata.boundary_quads.back().vertices[2] >> subcelldata.boundary_quads.back().vertices[3]; - subcelldata.boundary_quads.back().material_id = material_id; + // to make sure that the cast wont fail + Assert(material_id<= std::numeric_limits::max(), + ExcIndexRange(material_id,0,std::numeric_limits::max())); + // we use only boundary_ids in the range from 0 to types::internal_face_boundary_id-1 + Assert(material_id < types::internal_face_boundary_id, + ExcIndexRange(material_id,0,types::internal_face_boundary_id)); + + subcelldata.boundary_quads.back().boundary_id + = static_cast(material_id); // transform from gmsh to // consecutive numbering @@ -1336,11 +1389,11 @@ void GridIn<3>::read_netcdf (const std::string &filename) bmarker_var->get(&*bmarker.begin(), n_bquads); // we only handle boundary // indicators that fit into an - // unsigned char. Also, we don't - // take 255 as it denotes an - // internal face + // types::boundary_id_t. Also, we don't + // take types::internal_face_boundary_id + // as it denotes an internal face for (unsigned int i=0; i::read_netcdf (const std::string &filename) for (unsigned int v=0; v::vertices_per_face; ++v) subcelldata.boundary_quads[i].vertices[v]=bvertex_indices[ i*GeometryInfo::vertices_per_face+v]; - subcelldata.boundary_quads[i].material_id=bmarker[i]; + subcelldata.boundary_quads[i].boundary_id + = static_cast(bmarker[i]); } GridTools::delete_unused_vertices(vertices, cells, subcelldata); diff --git a/deal.II/source/grid/grid_out.cc b/deal.II/source/grid/grid_out.cc index cbd6f33ea2..215a5e4ad6 100644 --- a/deal.II/source/grid/grid_out.cc +++ b/deal.II/source/grid/grid_out.cc @@ -1162,8 +1162,8 @@ void GridOut::write_xfig ( { Triangulation::face_iterator face = cell->face(face_reorder[f]); - const unsigned char bi = face->boundary_indicator(); - if (bi != 255) + const types::boundary_id_t bi = face->boundary_indicator(); + if (bi != types::internal_face_boundary_id) { // Code for polyline out << "2 1 " @@ -2304,7 +2304,7 @@ namespace internal if (eps_flags_base.color_lines_level && (line->level > 0)) // lines colored according to // refinement level, - // contributed by Jörg + // contributed by J�rg // R. Weimar out << line->level << " l " diff --git a/deal.II/source/grid/grid_tools.cc b/deal.II/source/grid/grid_tools.cc index 65218d46f7..c0046989cc 100644 --- a/deal.II/source/grid/grid_tools.cc +++ b/deal.II/source/grid/grid_tools.cc @@ -1895,7 +1895,7 @@ namespace GridTools typename Container::face_iterator> extract_boundary_mesh (const Container &volume_mesh, Container &surface_mesh, - const std::set &boundary_ids) + const std::set &boundary_ids) { // Assumption: // We are relying below on the fact that Triangulation::create_triangulation(...) will keep the order diff --git a/deal.II/source/grid/grid_tools.inst.in b/deal.II/source/grid/grid_tools.inst.in index 8061610c62..7f7e2b67df 100644 --- a/deal.II/source/grid/grid_tools.inst.in +++ b/deal.II/source/grid/grid_tools.inst.in @@ -244,7 +244,7 @@ for (deal_II_dimension : DIMENSIONS) Triangulation::face_iterator> extract_boundary_mesh (const Triangulation &volume_mesh, Triangulation &surface_mesh, - const std::set &boundary_ids); + const std::set &boundary_ids); #endif \} } @@ -259,7 +259,7 @@ for (deal_II_dimension : DIMENSIONS; Container : DOFHANDLER_TEMPLATES) Container::face_iterator> extract_boundary_mesh (const Container &volume_mesh, Container &surface_mesh, - const std::set &boundary_ids); + const std::set &boundary_ids); #endif \} } diff --git a/deal.II/source/grid/tria.cc b/deal.II/source/grid/tria.cc index e39dc92d71..f7d2484ba0 100644 --- a/deal.II/source/grid/tria.cc +++ b/deal.II/source/grid/tria.cc @@ -1789,8 +1789,8 @@ namespace internal if (n_adj_cells == 1) line->set_boundary_indicator (0); else - // interior line -> 255 - line->set_boundary_indicator (255); + // interior line -> types::internal_face_boundary_id + line->set_boundary_indicator (types::internal_face_boundary_id); } // set boundary indicators where @@ -1824,16 +1824,16 @@ namespace internal // assert that we only set // boundary info once AssertThrow (! (line->boundary_indicator() != 0 && - line->boundary_indicator() != 255), + line->boundary_indicator() != types::internal_face_boundary_id), ExcMultiplySetLineInfoOfLine(line_vertices.first, line_vertices.second)); // Assert that only exterior lines // are given a boundary indicator - AssertThrow (! (line->boundary_indicator() == 255), + AssertThrow (! (line->boundary_indicator() == types::internal_face_boundary_id), ExcInteriorLineCantBeBoundary()); - line->set_boundary_indicator (boundary_line->material_id); + line->set_boundary_indicator (boundary_line->boundary_id); } @@ -2509,8 +2509,8 @@ namespace internal if (n_adj_cells == 1) quad->set_boundary_indicator (0); else - // interior quad -> 255 - quad->set_boundary_indicator (255); + // interior quad -> types::internal_face_boundary_id + quad->set_boundary_indicator (types::internal_face_boundary_id); } ///////////////////////////////////////// @@ -2522,7 +2522,7 @@ namespace internal // as interior for (typename Triangulation::line_iterator line=triangulation.begin_line(); line!=triangulation.end_line(); ++line) - line->set_boundary_indicator (255); + line->set_boundary_indicator (types::internal_face_boundary_id); // next reset all lines bounding // boundary quads as on the // boundary also. note that since @@ -2590,11 +2590,11 @@ namespace internal // different than the // previously set value if (line->boundary_indicator() != 0) - AssertThrow (line->boundary_indicator() == boundary_line->material_id, + AssertThrow (line->boundary_indicator() == boundary_line->boundary_id, ExcMessage ("Duplicate boundary lines are only allowed " "if they carry the same boundary indicator.")); - line->set_boundary_indicator (boundary_line->material_id); + line->set_boundary_indicator (boundary_line->boundary_id); } @@ -2722,11 +2722,11 @@ namespace internal // different than the // previously set value if (quad->boundary_indicator() != 0) - AssertThrow (quad->boundary_indicator() == boundary_quad->material_id, + AssertThrow (quad->boundary_indicator() == boundary_quad->boundary_id, ExcMessage ("Duplicate boundary quads are only allowed " "if they carry the same boundary indicator.")); - quad->set_boundary_indicator (boundary_quad->material_id); + quad->set_boundary_indicator (boundary_quad->boundary_id); } @@ -3561,7 +3561,7 @@ namespace internal switch_1->line_orientation(1), switch_1->line_orientation(2), switch_1->line_orientation(3)}; - const unsigned char switch_1_boundary_indicator=switch_1->boundary_indicator(); + const types::boundary_id_t switch_1_boundary_indicator=switch_1->boundary_indicator(); const unsigned int switch_1_user_index=switch_1->user_index(); const bool switch_1_user_flag=switch_1->user_flag_set(); @@ -4007,6 +4007,14 @@ namespace internal // set or not cell->clear_user_flag(); + + + // An assert to make sure that the + // static_cast in the next line has + // the chance to give reasonable results. + Assert(cell->material_id()<= std::numeric_limits::max(), + ExcIndexRange(cell->material_id(),0,std::numeric_limits::max())); + // new vertex is // placed on the // surface according @@ -4014,8 +4022,8 @@ namespace internal // stored in the // boundary class triangulation.vertices[next_unused_vertex] = - triangulation.boundary[cell->material_id()] - ->get_new_point_on_quad (cell); + triangulation.get_boundary(static_cast(cell->material_id())) + .get_new_point_on_quad (cell); } } @@ -4109,7 +4117,7 @@ namespace internal new_lines[l]->clear_user_data(); new_lines[l]->clear_children(); // interior line - new_lines[l]->set_boundary_indicator(255); + new_lines[l]->set_boundary_indicator(types::internal_face_boundary_id); } // Now add the four (two) @@ -4403,8 +4411,8 @@ namespace internal (cell->vertex(0) + cell->vertex(1)) / 2; else triangulation.vertices[next_unused_vertex] = - triangulation.boundary[cell->material_id()] - ->get_new_point_on_line(cell); + triangulation.get_boundary(static_cast(cell->material_id())) + .get_new_point_on_line(cell); triangulation.vertices_used[next_unused_vertex] = true; // search for next two @@ -4816,8 +4824,8 @@ namespace internal // the two vertices: if (line->at_boundary()) triangulation.vertices[next_unused_vertex] - = triangulation.boundary[line->boundary_indicator()] - ->get_new_point_on_line (line); + = triangulation.get_boundary(line->boundary_indicator()) + .get_new_point_on_line (line); else triangulation.vertices[next_unused_vertex] = (line->vertex(0) + line->vertex(1)) / 2; @@ -4828,7 +4836,7 @@ namespace internal // boundary object for its // answer triangulation.vertices[next_unused_vertex] - = triangulation.boundary[line->user_index()]->get_new_point_on_line (line); + = triangulation.get_boundary(line->user_index()).get_new_point_on_line (line); // now that we created // the right point, make @@ -5356,7 +5364,7 @@ namespace internal if (line->at_boundary()) triangulation.vertices[next_unused_vertex] - = triangulation.boundary[line->boundary_indicator()]->get_new_point_on_line (line); + = triangulation.get_boundary(line->boundary_indicator()).get_new_point_on_line (line); else triangulation.vertices[next_unused_vertex] = (line->vertex(0) + line->vertex(1)) / 2; @@ -5810,7 +5818,7 @@ namespace internal switch_1->line_orientation(1), switch_1->line_orientation(2), switch_1->line_orientation(3)}; - const unsigned char switch_1_boundary_indicator=switch_1->boundary_indicator(); + const types::boundary_id_t switch_1_boundary_indicator=switch_1->boundary_indicator(); const unsigned int switch_1_user_index=switch_1->user_index(); const bool switch_1_user_flag=switch_1->user_flag_set(); const RefinementCase switch_1_refinement_case=switch_1->refinement_case(); @@ -6011,7 +6019,7 @@ namespace internal // appropriately if (quad->at_boundary()) triangulation.vertices[next_unused_vertex] - = triangulation.boundary[quad->boundary_indicator()]->get_new_point_on_quad (quad); + = triangulation.get_boundary(quad->boundary_indicator()).get_new_point_on_quad (quad); else // it might be that the // quad itself is not @@ -6367,7 +6375,7 @@ namespace internal new_lines[i]->clear_user_data(); new_lines[i]->clear_children(); // interior line - new_lines[i]->set_boundary_indicator(255); + new_lines[i]->set_boundary_indicator(types::internal_face_boundary_id); } // find some space for the newly to @@ -6386,7 +6394,7 @@ namespace internal new_quads[i]->clear_user_data(); new_quads[i]->clear_children(); // interior quad - new_quads[i]->set_boundary_indicator (255); + new_quads[i]->set_boundary_indicator (types::internal_face_boundary_id); // set all line orientation // flags to true by default, // change this afterwards, if @@ -9001,8 +9009,8 @@ namespace internal // boundary would be // this one. const Point new_bound - = triangulation.boundary[face->boundary_indicator()] - ->get_new_point_on_face (face); + = triangulation.get_boundary(face->boundary_indicator()) + .get_new_point_on_face (face); // to check it, // transform to the // unit cell with @@ -9394,14 +9402,15 @@ Triangulation (const MeshSmoothing smooth_grid, check_for_distorted_cells(check_for_distorted_cells), vertex_to_boundary_id_map_1d (0) { - // set default boundary for all - // possible components - for (unsigned int i=0;i<255;++i) - boundary[i] = &straight_boundary; + //Set default value at types::internal_face_boundary_id. + //Because this value is reserved for inner faces, we + //will never set this one to anything else. + //TODO This line vanishes, if we resolve the TODO in the get_boundary function + boundary[types::internal_face_boundary_id] = &straight_boundary; if (dim == 1) vertex_to_boundary_id_map_1d - = new std::map(); + = new std::map(); // connect the any_change signal to the other signals signals.create.connect (signals.any_change); @@ -9466,10 +9475,10 @@ Triangulation::set_mesh_smoothing(const MeshSmoothing mesh_smooth template void -Triangulation::set_boundary (const unsigned int number, +Triangulation::set_boundary (const types::boundary_id_t number, const Boundary& boundary_object) { - Assert(number<255, ExcIndexRange(number,0,255)); + Assert(number < types::internal_face_boundary_id, ExcIndexRange(number,0,types::internal_face_boundary_id)); boundary[number] = &boundary_object; } @@ -9478,25 +9487,50 @@ Triangulation::set_boundary (const unsigned int number, template void -Triangulation::set_boundary (const unsigned int number) +Triangulation::set_boundary (const types::boundary_id_t number) { - set_boundary (number, straight_boundary); + Assert(number < types::internal_face_boundary_id, ExcIndexRange(number,0,types::internal_face_boundary_id)); + + //delete the entry located at number. + boundary.erase(number); } template const Boundary & -Triangulation::get_boundary (const unsigned int number) const +Triangulation::get_boundary (const types::boundary_id_t number) const { - Assert(number<255, ExcIndexRange(number,0,255)); + Assert(number, Triangulation > >::const_iterator it + = boundary.find(number); - return *(boundary[number]); + if(it != boundary.end()) + { + //if we have found an entry, return it + return *(it->second); + } + else + { + //if we have not found an entry + //connected with number, we return + //straight_boundary, stored at types::internal_face_boundary_id + it = boundary.find(types::internal_face_boundary_id); + + return *(it->second); + // TODO: This should get returned, atm there are some errors + // connected to Boundary<1,3>. If this issue is resolved, the TODOs in + // the constructor and clear_despite_subscriptions can also get resolved. + //return straight_boundary; + } } template -std::vector +std::vector Triangulation::get_boundary_indicators () const { // in 1d, we store a map of all used @@ -9504,8 +9538,8 @@ Triangulation::get_boundary_indicators () const // purposes if (dim == 1) { - std::vector boundary_indicators; - for (std::map::const_iterator + std::vector boundary_indicators; + for (std::map::const_iterator p = vertex_to_boundary_id_map_1d->begin(); p != vertex_to_boundary_id_map_1d->end(); ++p) @@ -9515,7 +9549,7 @@ Triangulation::get_boundary_indicators () const } else { - std::vector bi_exists(255, false); + std::vector bi_exists(types::internal_face_boundary_id, false); active_cell_iterator cell=begin_active(); for (; cell!=end(); ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) @@ -9525,7 +9559,7 @@ Triangulation::get_boundary_indicators () const const unsigned int n_bi= std::count(bi_exists.begin(), bi_exists.end(), true); - std::vector boundary_indicators(n_bi); + std::vector boundary_indicators(n_bi); unsigned int bi_counter=0; for (unsigned int i=0; i &old_tria) faces = new internal::Triangulation::TriaFaces(*old_tria.faces); - for (unsigned i=0;i<255;++i) - boundary[i] = old_tria.boundary[i]; + typename std::map , Triangulation > >::const_iterator + bdry_iterator = old_tria.boundary.begin(); + for (; bdry_iterator != old_tria.boundary.end() ; bdry_iterator++) + boundary[bdry_iterator->first] = bdry_iterator->second; + levels.reserve (old_tria.levels.size()); for (unsigned int level=0; level &old_tria) { delete vertex_to_boundary_id_map_1d; vertex_to_boundary_id_map_1d - = (new std::map + = (new std::map (*old_tria.vertex_to_boundary_id_map_1d)); } @@ -12531,8 +12568,10 @@ Triangulation::clear_despite_subscriptions() vertices.clear (); vertices_used.clear (); - for (unsigned int i=0; i<255; ++i) - boundary[i] = &straight_boundary; + boundary.clear(); + //TODO: This is connected with the TODO in get_boundary and vanishes, if + //this TODO has been dealt with. + boundary[types::internal_face_boundary_id] = &straight_boundary; number_cache = internal::Triangulation::NumberCache(); } @@ -14620,7 +14659,7 @@ Triangulation::remove_refinement_listener (RefinementListener &li // functions that currently only exist for <1,1> and <1,2> template const Boundary<1,3> & -Triangulation<1,3>::get_boundary (const unsigned int number) const; +Triangulation<1,3>::get_boundary (const types::boundary_id_t number) const; DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/grid/tria_accessor.cc b/deal.II/source/grid/tria_accessor.cc index 367c5dd9ac..49bc93cc0e 100644 --- a/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/source/grid/tria_accessor.cc @@ -1235,25 +1235,26 @@ bool CellAccessor::at_boundary () const template -unsigned char CellAccessor::material_id () const +types::material_id_t CellAccessor::material_id () const { Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed()); - return this->tria->levels[this->present_level]->cells.material_id[this->present_index]; + return this->tria->levels[this->present_level]->cells.boundary_or_material_id[this->present_index].material_id; } template -void CellAccessor::set_material_id (const unsigned char mat_id) const +void CellAccessor::set_material_id (const types::material_id_t mat_id) const { Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed()); - this->tria->levels[this->present_level]->cells.material_id[this->present_index] = mat_id; + Assert ( mat_id < types::invalid_material_id, ExcIndexRange(mat_id,0,types::invalid_material_id)); + this->tria->levels[this->present_level]->cells.boundary_or_material_id[this->present_index].material_id = mat_id; } template -void CellAccessor::recursively_set_material_id (const unsigned char mat_id) const +void CellAccessor::recursively_set_material_id (const types::material_id_t mat_id) const { set_material_id (mat_id); diff --git a/deal.II/source/grid/tria_objects.cc b/deal.II/source/grid/tria_objects.cc index 6ddced3350..f1c8900ac4 100644 --- a/deal.II/source/grid/tria_objects.cc +++ b/deal.II/source/grid/tria_objects.cc @@ -105,10 +105,10 @@ namespace internal new_size-children.size(), -1); - material_id.reserve (new_size); - material_id.insert (material_id.end(), - new_size-material_id.size(), - 255); + boundary_or_material_id.reserve (new_size); + boundary_or_material_id.insert (boundary_or_material_id.end(), + new_size-boundary_or_material_id.size(), + BoundaryOrMaterialId()); user_data.reserve (new_size); user_data.insert (user_data.end(), @@ -307,10 +307,10 @@ namespace internal RefinementCase<2>::no_refinement); - material_id.reserve (new_size); - material_id.insert (material_id.end(), - new_size-material_id.size(), - 255); + boundary_or_material_id.reserve (new_size); + boundary_or_material_id.insert (boundary_or_material_id.end(), + new_size-boundary_or_material_id.size(), + BoundaryOrMaterialId()); user_data.reserve (new_size); user_data.insert (user_data.end(), @@ -490,10 +490,10 @@ namespace internal 4*new_size-children.size(), -1); - material_id.reserve (new_size); - material_id.insert (material_id.end(), - new_size-material_id.size(), - 255); + boundary_or_material_id.reserve (new_size); + boundary_or_material_id.insert (boundary_or_material_id.end(), + new_size-boundary_or_material_id.size(), + BoundaryOrMaterialId()); user_data.reserve (new_size); user_data.insert (user_data.end(), @@ -633,8 +633,8 @@ namespace internal ExcMemoryInexact (cells.size(), user_flags.size())); Assert (cells.size() == children.size(), ExcMemoryInexact (cells.size(), children.size())); - Assert (cells.size() == material_id.size(), - ExcMemoryInexact (cells.size(), material_id.size())); + Assert (cells.size() == boundary_or_material_id.size(), + ExcMemoryInexact (cells.size(), boundary_or_material_id.size())); Assert (cells.size() == user_data.size(), ExcMemoryInexact (cells.size(), user_data.size())); } @@ -675,8 +675,8 @@ namespace internal ExcMemoryInexact (cells.size(), children.size())); Assert (cells.size() == refinement_cases.size(), ExcMemoryInexact (cells.size(), refinement_cases.size())); - Assert (cells.size() == material_id.size(), - ExcMemoryInexact (cells.size(), material_id.size())); + Assert (cells.size() == boundary_or_material_id.size(), + ExcMemoryInexact (cells.size(), boundary_or_material_id.size())); Assert (cells.size() == user_data.size(), ExcMemoryInexact (cells.size(), user_data.size())); } @@ -714,8 +714,8 @@ namespace internal ExcMemoryInexact (cells.size(), user_flags.size())); Assert (4*cells.size() == children.size(), ExcMemoryInexact (cells.size(), children.size())); - Assert (cells.size() == material_id.size(), - ExcMemoryInexact (cells.size(), material_id.size())); + Assert (cells.size() == boundary_or_material_id.size(), + ExcMemoryInexact (cells.size(), boundary_or_material_id.size())); Assert (cells.size() == user_data.size(), ExcMemoryInexact (cells.size(), user_data.size())); Assert (cells.size() * GeometryInfo<3>::faces_per_cell @@ -761,7 +761,7 @@ namespace internal refinement_cases.clear(); used.clear(); user_flags.clear(); - material_id.clear(); + boundary_or_material_id.clear(); user_data.clear(); user_data_type = data_unknown; } @@ -793,7 +793,7 @@ namespace internal MemoryConsumption::memory_consumption (children) + MemoryConsumption::memory_consumption (used) + MemoryConsumption::memory_consumption (user_flags) + - MemoryConsumption::memory_consumption (material_id) + + MemoryConsumption::memory_consumption (boundary_or_material_id) + MemoryConsumption::memory_consumption (refinement_cases) + user_data.capacity() * sizeof(UserData) + sizeof(user_data)); } diff --git a/deal.II/source/hp/dof_handler.cc b/deal.II/source/hp/dof_handler.cc index 4526e71623..f1c819d171 100644 --- a/deal.II/source/hp/dof_handler.cc +++ b/deal.II/source/hp/dof_handler.cc @@ -2745,14 +2745,14 @@ namespace hp template <> - unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &boundary_indicators) const + unsigned int DoFHandler<1>::n_boundary_dofs (const std::set &boundary_indicators) 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(); + for (std::set::const_iterator i=boundary_indicators.begin(); i!=boundary_indicators.end(); ++i) Assert ((*i == 0) || (*i == 1), ExcInvalidBoundaryIndicator()); @@ -2797,7 +2797,7 @@ namespace hp } template <> - unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set &) const + unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set &) const { Assert(false,ExcNotImplemented()); return 0; @@ -2848,7 +2848,7 @@ namespace hp DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicators) const { Assert (finite_elements != 0, ExcNoFESelected()); - Assert (boundary_indicators.find(255) == boundary_indicators.end(), + Assert (boundary_indicators.find(types::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); // same as above, but with @@ -2881,10 +2881,10 @@ namespace hp template unsigned int - DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const + DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const { Assert (finite_elements != 0, ExcNoFESelected()); - Assert (boundary_indicators.find (255) == boundary_indicators.end(), + Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); // same as above, but with @@ -2933,7 +2933,7 @@ namespace hp template <> - unsigned int DoFHandler<2,3>::n_boundary_dofs (const std::set &) const + unsigned int DoFHandler<2,3>::n_boundary_dofs (const std::set &) const { Assert(false,ExcNotImplemented()); return 0; diff --git a/deal.II/source/multigrid/mg_tools.cc b/deal.II/source/multigrid/mg_tools.cc index dea49b7463..ba15d25fde 100644 --- a/deal.II/source/multigrid/mg_tools.cc +++ b/deal.II/source/multigrid/mg_tools.cc @@ -1204,7 +1204,7 @@ namespace MGTools { const typename MGDoFHandler::face_iterator face = cell->face(face_no); - const unsigned char bi = face->boundary_indicator(); + const types::boundary_id_t bi = face->boundary_indicator(); // Face is listed in // boundary map if (function_map.find(bi) != function_map.end()) @@ -1259,7 +1259,7 @@ namespace MGTools } typename MGDoFHandler::face_iterator face = cell->face(face_no); - const unsigned char boundary_component = face->boundary_indicator(); + const types::boundary_id_t boundary_component = face->boundary_indicator(); if (function_map.find(boundary_component) != function_map.end()) // face is of the right component { diff --git a/deal.II/source/numerics/error_estimator.cc b/deal.II/source/numerics/error_estimator.cc index 041f58b090..a4fba0a952 100644 --- a/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/source/numerics/error_estimator.cc @@ -233,7 +233,7 @@ namespace internal * The material id we are to care * for. */ - const unsigned int material_id; + const types::material_id_t material_id; /** * Some more references to input data to @@ -254,7 +254,7 @@ namespace internal const bool need_quadrature_points, const unsigned int n_solution_vectors, const types::subdomain_id_t subdomain_id, - const unsigned int material_id, + const types::material_id_t material_id, const typename FunctionMap::type *neumann_bc, const std::vector component_mask, const Function *coefficients); @@ -278,7 +278,7 @@ namespace internal const bool need_quadrature_points, const unsigned int n_solution_vectors, const types::subdomain_id_t subdomain_id, - const unsigned int material_id, + const types::material_id_t material_id, const typename FunctionMap::type *neumann_bc, const std::vector component_mask, const Function *coefficients) @@ -547,7 +547,7 @@ namespace internal // difference between normal // derivative and boundary function { - const unsigned char boundary_indicator = face->boundary_indicator(); + const types::boundary_id_t boundary_indicator = face->boundary_indicator(); Assert (parallel_data.neumann_bc->find(boundary_indicator) != parallel_data.neumann_bc->end(), @@ -907,7 +907,7 @@ namespace internal || (cell->subdomain_id() == subdomain_id)) && - ((material_id == numbers::invalid_unsigned_int) + ((material_id == types::invalid_material_id) || (cell->material_id() == material_id))) ) { @@ -927,7 +927,7 @@ namespace internal && ((cell->neighbor(face_no)->material_id() == material_id) || - (material_id == numbers::invalid_unsigned_int)); + (material_id == types::invalid_material_id)); else { for (unsigned int sf=0; sfn_children(); ++sf) @@ -935,7 +935,7 @@ namespace internal ->subdomain_id() == subdomain_id) && (material_id == - numbers::invalid_unsigned_int)) + types::invalid_material_id)) || ((cell->neighbor_child_on_subface(face_no,sf) ->material_id() == material_id) @@ -1017,7 +1017,7 @@ estimate (const Mapping<1,spacedim> &mapping, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { // just pass on to the other function const std::vector solutions (1, &solution); @@ -1041,7 +1041,7 @@ estimate (const DH &dof_handler, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution, @@ -1063,7 +1063,7 @@ estimate (const DH &dof_handler, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions, @@ -1086,7 +1086,7 @@ estimate (const Mapping<1,spacedim> &mapping, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { // just pass on to the other function const std::vector solutions (1, &solution); @@ -1109,7 +1109,7 @@ estimate (const DH &dof_handler, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solution, @@ -1131,7 +1131,7 @@ estimate (const DH &dof_handler, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1<1,spacedim>::mapping, dof_handler, quadrature, neumann_bc, solutions, @@ -1154,7 +1154,7 @@ estimate (const Mapping<1,spacedim> &/*mapping*/, const Function */*coefficient*/, const unsigned int, const types::subdomain_id_t /*subdomain_id*/, - const unsigned int /*material_id*/) + const types::material_id_t /*material_id*/) { Assert (false, ExcInternalError()); } @@ -1174,7 +1174,7 @@ estimate (const Mapping<1,spacedim> &mapping, const Function *coefficient, const unsigned int, const types::subdomain_id_t subdomain_id_, - const unsigned int material_id) + const types::material_id_t material_id) { #ifdef DEAL_II_USE_P4EST if (dynamic_cast*> @@ -1207,7 +1207,7 @@ estimate (const Mapping<1,spacedim> &mapping, const unsigned int n_solution_vectors = solutions.size(); // sanity checks - Assert (neumann_bc.find(255) == neumann_bc.end(), + Assert (neumann_bc.find(types::internal_face_boundary_id) == neumann_bc.end(), ExcInvalidBoundaryIndicator()); for (typename FunctionMap::type::const_iterator i=neumann_bc.begin(); @@ -1305,7 +1305,7 @@ estimate (const Mapping<1,spacedim> &mapping, || (cell->subdomain_id() == subdomain_id)) && - ((material_id == numbers::invalid_unsigned_int) + ((material_id == types::invalid_material_id) || (cell->material_id() == material_id))) { @@ -1444,7 +1444,7 @@ estimate (const Mapping &mapping, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { // just pass on to the other function const std::vector solutions (1, &solution); @@ -1467,7 +1467,7 @@ estimate (const DH &dof_handler, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1::mapping, dof_handler, quadrature, neumann_bc, solution, @@ -1490,7 +1490,7 @@ estimate (const Mapping &mapping, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { // just pass on to the other function const std::vector solutions (1, &solution); @@ -1513,7 +1513,7 @@ estimate (const DH &dof_handler, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1::mapping, dof_handler, quadrature, neumann_bc, solution, @@ -1538,7 +1538,7 @@ estimate (const Mapping &mapping, const Function *coefficients, const unsigned int , const types::subdomain_id_t subdomain_id_, - const unsigned int material_id) + const types::material_id_t material_id) { #ifdef DEAL_II_USE_P4EST if (dynamic_cast*> @@ -1668,7 +1668,7 @@ estimate (const Mapping &mapping, || (cell->subdomain_id() == subdomain_id)) && - ((material_id == numbers::invalid_unsigned_int) + ((material_id == types::invalid_material_id) || (cell->material_id() == material_id))) { @@ -1715,7 +1715,7 @@ estimate (const Mapping &mapping, const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { // forward to the function with the QCollection estimate (mapping, dof_handler, @@ -1737,7 +1737,7 @@ void KellyErrorEstimator::estimate (const DH const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1::mapping, dof_handler, quadrature, neumann_bc, solutions, @@ -1758,7 +1758,7 @@ void KellyErrorEstimator::estimate (const DH const Function *coefficients, const unsigned int n_threads, const types::subdomain_id_t subdomain_id, - const unsigned int material_id) + const types::material_id_t material_id) { Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); estimate(StaticMappingQ1::mapping, dof_handler, quadrature, neumann_bc, solutions, diff --git a/deal.II/source/numerics/error_estimator.inst.in b/deal.II/source/numerics/error_estimator.inst.in index fcb724d93b..3512bd02e6 100644 --- a/deal.II/source/numerics/error_estimator.inst.in +++ b/deal.II/source/numerics/error_estimator.inst.in @@ -39,7 +39,7 @@ estimate > (const Mapping *, \ const unsigned int , \ const unsigned int , \ - const unsigned int); \ + const types::material_id_t); \ \ template \ void \ @@ -53,7 +53,7 @@ estimate > (const DH &, const Function *, \ const unsigned int , \ const unsigned int , \ - const unsigned int); \ + const types::material_id_t); \ \ template \ void \ @@ -68,7 +68,7 @@ estimate > (const Mapping *, \ const unsigned int , \ const unsigned int , \ - const unsigned int); \ + const types::material_id_t); \ \ template \ void \ @@ -82,7 +82,7 @@ estimate > (const DH const Function *, \ const unsigned int , \ const unsigned int , \ - const unsigned int);\ + const types::material_id_t);\ #if deal_II_dimension == 2 || deal_II_dimension == 1 @@ -100,7 +100,7 @@ estimate > (const Mapping< const Function *, \ const unsigned int , \ const unsigned int , \ - const unsigned int); \ + const types::material_id_t); \ \ template \ void \ @@ -114,7 +114,7 @@ estimate > (const DH *, \ const unsigned int , \ const unsigned int , \ - const unsigned int); \ + const types::material_id_t); \ \ template \ void \ @@ -129,7 +129,7 @@ estimate > (const Mapping< const Function *, \ const unsigned int , \ const unsigned int , \ - const unsigned int); \ + const types::material_id_t); \ \ template \ void \ @@ -143,7 +143,7 @@ estimate > (const DH *, \ const unsigned int , \ const unsigned int , \ - const unsigned int);\ + const types::material_id_t);\ #else #define INSTANTIATE_CODIM(InputVector,DH,Q) diff --git a/deal.II/source/numerics/vectors.inst.in b/deal.II/source/numerics/vectors.inst.in index ad50778264..23479924be 100644 --- a/deal.II/source/numerics/vectors.inst.in +++ b/deal.II/source/numerics/vectors.inst.in @@ -428,7 +428,7 @@ create_boundary_right_hand_side const Quadrature &, const Function &, Vector &, - const std::set &); + const std::set &); #endif template @@ -438,7 +438,7 @@ create_boundary_right_hand_side const Quadrature &, const Function &, Vector &, - const std::set &); + const std::set &); #if deal_II_dimension > 1 template @@ -449,7 +449,7 @@ create_boundary_right_hand_side const hp::QCollection &, const Function &, Vector &, - const std::set &); + const std::set &); #endif template @@ -459,12 +459,12 @@ create_boundary_right_hand_side const hp::QCollection &, const Function &, Vector &, - const std::set &); + const std::set &); template void interpolate_boundary_values ( const DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &); @@ -472,7 +472,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const hp::DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &); @@ -480,7 +480,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const MGDoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &); @@ -488,7 +488,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, ConstraintMatrix &, const std::vector &); @@ -496,7 +496,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const hp::DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, ConstraintMatrix &, const std::vector &); @@ -504,7 +504,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const MGDoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, ConstraintMatrix &, const std::vector &); @@ -558,7 +558,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &); @@ -566,7 +566,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const hp::DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &); @@ -574,7 +574,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const MGDoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &); @@ -582,7 +582,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, ConstraintMatrix &, const std::vector &); @@ -590,7 +590,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const hp::DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, ConstraintMatrix &, const std::vector &); @@ -598,7 +598,7 @@ void interpolate_boundary_values ( template void interpolate_boundary_values ( const MGDoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, ConstraintMatrix &, const std::vector &); @@ -689,7 +689,7 @@ void project_boundary_values_curl_conforming (const DoFHandler&, const unsigned int, const Function&, - const unsigned char, + const types::boundary_id_t, ConstraintMatrix&, const Mapping&); template @@ -697,7 +697,7 @@ void project_boundary_values_curl_conforming (const hp::DoFHandler&, const unsigned int, const Function&, - const unsigned char, + const types::boundary_id_t, ConstraintMatrix&, const hp::MappingCollection&); template @@ -705,7 +705,7 @@ void project_boundary_values_div_conforming (const DoFHandler&, const unsigned int, const Function&, - const unsigned char, + const types::boundary_id_t, ConstraintMatrix&, const Mapping&); template @@ -713,21 +713,21 @@ void project_boundary_values_div_conforming (const hp::DoFHandler&, const unsigned int, const Function&, - const unsigned char, + const types::boundary_id_t, ConstraintMatrix&, const hp::MappingCollection&); template void compute_no_normal_flux_constraints (const DoFHandler &dof_handler, const unsigned int first_vector_component, - const std::set &boundary_ids, + const std::set &boundary_ids, ConstraintMatrix &constraints, const Mapping &mapping); template void compute_no_normal_flux_constraints (const hp::DoFHandler &dof_handler, const unsigned int first_vector_component, - const std::set &boundary_ids, + const std::set &boundary_ids, ConstraintMatrix &constraints, const Mapping &mapping); #endif @@ -762,7 +762,7 @@ template void interpolate_boundary_values (const Mapping &, const DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &); @@ -771,7 +771,7 @@ template void interpolate_boundary_values (const Mapping &, const hp::DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, ConstraintMatrix &, const std::vector &); @@ -789,7 +789,7 @@ template void interpolate_boundary_values (const Mapping &, const DoFHandler &, - const unsigned char, + const types::boundary_id_t, const Function &, std::map &, const std::vector &);