From 0a38fca23143783b63c5b5c054de3b2a96c0df83 Mon Sep 17 00:00:00 2001
From: goll
Date: Mon, 27 Feb 2012 18:22:33 +0000
Subject: [PATCH] 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
---
deal.II/doc/news/changes.h | 11 +-
deal.II/include/deal.II/base/types.h | 23 +++
deal.II/include/deal.II/dofs/dof_handler.h | 4 +-
deal.II/include/deal.II/dofs/dof_tools.h | 6 +-
deal.II/include/deal.II/dofs/function_map.h | 2 +-
deal.II/include/deal.II/grid/grid_generator.h | 2 +-
deal.II/include/deal.II/grid/grid_out.h | 6 +-
deal.II/include/deal.II/grid/grid_tools.h | 4 +-
deal.II/include/deal.II/grid/tria.h | 69 ++++-----
deal.II/include/deal.II/grid/tria_accessor.h | 44 +++---
.../deal.II/grid/tria_accessor.templates.h | 23 ++-
deal.II/include/deal.II/grid/tria_objects.h | 72 +++++----
deal.II/include/deal.II/hp/dof_handler.h | 2 +-
.../deal.II/numerics/error_estimator.h | 44 +++---
deal.II/include/deal.II/numerics/vectors.h | 48 +++---
.../deal.II/numerics/vectors.templates.h | 44 +++---
deal.II/source/dofs/dof_handler.cc | 14 +-
deal.II/source/dofs/dof_tools.cc | 14 +-
deal.II/source/dofs/dof_tools.inst.in | 40 ++---
deal.II/source/grid/grid_generator.cc | 24 +--
deal.II/source/grid/grid_in.cc | 80 ++++++++--
deal.II/source/grid/grid_out.cc | 6 +-
deal.II/source/grid/grid_tools.cc | 2 +-
deal.II/source/grid/grid_tools.inst.in | 4 +-
deal.II/source/grid/tria.cc | 141 +++++++++++-------
deal.II/source/grid/tria_accessor.cc | 11 +-
deal.II/source/grid/tria_objects.cc | 40 ++---
deal.II/source/hp/dof_handler.cc | 14 +-
deal.II/source/multigrid/mg_tools.cc | 4 +-
deal.II/source/numerics/error_estimator.cc | 52 +++----
.../source/numerics/error_estimator.inst.in | 16 +-
deal.II/source/numerics/vectors.inst.in | 50 +++----
32 files changed, 537 insertions(+), 379 deletions(-)
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.
-- None so far.
+
- 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
+- 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)
+
- 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