From: bangerth Date: Wed, 29 Aug 2012 20:54:41 +0000 (+0000) Subject: Rename types::invalid_material_id to numbers::invalid_material_id and similar for... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d0743909371a0eaf354d727b9184ef415dc1ded;p=dealii-svn.git Rename types::invalid_material_id to numbers::invalid_material_id and similar for boundary_id. git-svn-id: https://svn.dealii.org/trunk@26165 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index df12f77d71..2ff709a695 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -38,7 +38,7 @@ and then copy it into a vector with ghost elements.
  • Changed: The argument material_id of the estimate-functions of the KellyErrorEstimator class is now of type types::material_id -with default value types::invalid_material_id, instead of type +with default value numbers::invalid_material_id, instead of type unsigned int with default value numbers::invalid_unsigned_int. This should not make a difference to most users unless you specified the argument's default value by hand. @@ -63,12 +63,12 @@ used to store boundary indicators internally.
    1. -New: we now support parallel output using HDF5/xdmf. +New: We now support parallel output using HDF5/xdmf.
      (Eric Heien, Timo Heister, 2012/08/28)
    2. -New: we are now compatible with Trilinos 10.4.2, 10.8.5, and 10.12.2. See the +New: We are now compatible with Trilinos 10.4.2, 10.8.5, and 10.12.2. See the readme for more information.
      (Timo Heister, 2012/08/24) @@ -210,10 +210,10 @@ type unsigned char. Throughout the library, we changed their datatype to types::material_id resp. types::boundary_id, both typedefs of unsigned char. Internal faces are now characterized by -types::internal_face_boundary_id(=static_cast@(-1)) +numbers::internal_face_boundary_id(=static_cast@(-1)) instead of 255, so we get rid of that mysterious number in 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 = +numbers::invalid_material_id-1 (where numbers::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. diff --git a/deal.II/include/deal.II/base/types.h b/deal.II/include/deal.II/base/types.h index b94be7f37b..a59a8f06e6 100644 --- a/deal.II/include/deal.II/base/types.h +++ b/deal.II/include/deal.II/base/types.h @@ -29,6 +29,11 @@ namespace types * * See the @ref GlossSubdomainId * "glossary" for more information. + * + * There is a special value, + * numbers::invalid_subdomain_id + * that is used to indicate an + * invalid value of this type. */ typedef unsigned int subdomain_id; @@ -62,6 +67,12 @@ namespace types * The type used to denote boundary indicators associated with every * piece of the boundary and, in the case of meshes that describe * manifolds in higher dimensions, associated with every cell. + * + * There is a special value, numbers::internal_face_boundary_id + * that is used to indicate an invalid value of this type and that + * is used as the boundary indicator for faces that are in the interior + * of the domain and therefore not part of any addressable boundary + * component. */ typedef unsigned char boundary_id; @@ -70,14 +81,12 @@ namespace types */ typedef boundary_id boundary_id_t; - /** - * @deprecated Use numbers::internal_face_boundary_id - */ - const boundary_id internal_face_boundary_id = static_cast(-1); - /** * The type used to denote material indicators associated with every * cell. + * + * There is a special value, numbers::invalid_material_id + * that is used to indicate an invalid value of this type. */ typedef unsigned char material_id; @@ -86,11 +95,6 @@ namespace types */ typedef material_id material_id_t; - /** - * @deprecated Use numbers::invalid_material_id - */ - const material_id invalid_material_id = static_cast(-1); - } diff --git a/deal.II/include/deal.II/grid/grid_out.h b/deal.II/include/deal.II/grid/grid_out.h index 824d896e5f..4fdc09c942 100644 --- a/deal.II/include/deal.II/grid/grid_out.h +++ b/deal.II/include/deal.II/grid/grid_out.h @@ -1545,7 +1545,7 @@ class GridOut * these faces are explicitly printed * in the write_* functions; * all faces with indicator - * types::internal_face_boundary_id are + * numbers::internal_face_boundary_id are * interior ones and an indicator with * value zero for faces at the boundary * are considered default. @@ -1580,7 +1580,7 @@ class GridOut * these lines are explicitly printed * in the write_* functions; * all lines with indicator - * types::internal_face_boundary_id are + * numbers::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/tria.h b/deal.II/include/deal.II/grid/tria.h index 39a678440c..366b45cdbd 100644 --- a/deal.II/include/deal.II/grid/tria.h +++ b/deal.II/include/deal.II/grid/tria.h @@ -136,8 +136,8 @@ struct CellData * 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 - * 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 + * numbers::internal_face_boundary_id (if in the interior). Explicitely giving a + * line the indicator numbers::internal_face_boundary_id will result in an error, as well as giving * an interior line a boundary indicator. * * @ingroup grid @@ -783,12 +783,12 @@ namespace internal * use is like the material id of cells). * 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) + * numbers::internal_face_boundary_id-1. The value + * numbers::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 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. + * Material indicators may be in the range from zero to numbers::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 diff --git a/deal.II/include/deal.II/grid/tria_accessor.h b/deal.II/include/deal.II/grid/tria_accessor.h index d9a1a5a4a5..b12710e3f5 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.h +++ b/deal.II/include/deal.II/grid/tria_accessor.h @@ -1019,7 +1019,7 @@ class TriaAccessor : public TriaAccessorBase * object. * * If the return value is the special - * value types::internal_face_boundary_id, + * value numbers::internal_face_boundary_id, * then this object is in the * interior of the domain. */ @@ -1052,14 +1052,14 @@ class TriaAccessor : public TriaAccessorBase * (a face not at the boundary of the * domain), or set set the boundary * indicator of an exterior face to - * types::internal_face_boundary_id + * numbers::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 types::internal_face_boundary_id + * indicator of numbers::internal_face_boundary_id * or if interior cells have boundary - * indicators other than types::internal_face_boundary_id. + * indicators other than numbers::internal_face_boundary_id. * Unfortunately, the current object * has no means of finding out whether it * really is at the boundary of the @@ -1930,7 +1930,7 @@ class TriaAccessor<0, 1, spacedim> * boundary indicator one. * * If the return value is the special - * value types::internal_face_boundary_id, + * value numbers::internal_face_boundary_id, * then this object is in the * interior of the domain. */ @@ -2054,14 +2054,14 @@ class TriaAccessor<0, 1, spacedim> * (a face not at the boundary of the * domain), or set set the boundary * indicator of an exterior face to - * types::internal_face_boundary_id + * numbers::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 types::internal_face_boundary_id + * indicator of numbers::internal_face_boundary_id * or if interior cells have boundary - * indicators other than types::internal_face_boundary_id. + * indicators other than numbers::internal_face_boundary_id. * Unfortunately, the current object * has no means of finding out whether it * really is at the boundary of the 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 47c48cb45b..fd90e894a4 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -1878,7 +1878,7 @@ TriaAccessor::at_boundary () const { // error checking is done // in boundary_indicator() - return (boundary_indicator() != types::internal_face_boundary_id); + return (boundary_indicator() != numbers::internal_face_boundary_id); } @@ -2252,7 +2252,7 @@ TriaAccessor<0, 1, spacedim>::boundary_indicator () const } default: - return types::internal_face_boundary_id; + return numbers::internal_face_boundary_id; } } diff --git a/deal.II/include/deal.II/grid/tria_objects.h b/deal.II/include/deal.II/grid/tria_objects.h index 73d369e317..f64e7fd589 100644 --- a/deal.II/include/deal.II/grid/tria_objects.h +++ b/deal.II/include/deal.II/grid/tria_objects.h @@ -174,7 +174,7 @@ namespace internal * example, in one dimension, this field * stores the material id of a line, which * is a number between 0 and - * types::invalid_material_id-1. In more + * numbers::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 @@ -184,8 +184,8 @@ namespace internal * boundary conditions hold on this * part. The boundary indicator also * is a number between zero and - * types::internal_face_boundary_id-1; - * the id types::internal_face_boundary_id + * numbers::internal_face_boundary_id-1; + * the id numbers::internal_face_boundary_id * is reserved for lines * in the interior and may be used * to check whether a line is at the @@ -712,7 +712,7 @@ namespace internal inline TriaObjects::BoundaryOrMaterialId::BoundaryOrMaterialId () { - material_id = types::invalid_material_id; + material_id = numbers::invalid_material_id; } diff --git a/deal.II/include/deal.II/numerics/error_estimator.h b/deal.II/include/deal.II/numerics/error_estimator.h index adfec866bb..e856482be9 100644 --- a/deal.II/include/deal.II/numerics/error_estimator.h +++ b/deal.II/include/deal.II/numerics/error_estimator.h @@ -300,7 +300,7 @@ class KellyErrorEstimator * * The @p material_id parameter has a similar * meaning: if not set to its default value - * (which is types::invalid_material_id), + * (which is numbers::invalid_material_id), * it means that indicators will only be * computed for cells with this particular * material id. @@ -349,7 +349,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = numbers::invalid_unsigned_int, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** * Calls the @p estimate @@ -366,7 +366,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** * Same function as above, but @@ -406,7 +406,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** * Calls the @p estimate @@ -423,7 +423,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -443,7 +443,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -462,7 +462,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -482,7 +482,7 @@ class KellyErrorEstimator const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -501,7 +501,7 @@ class KellyErrorEstimator const Function* coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -612,7 +612,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** * Calls the @p estimate @@ -629,7 +629,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** * Same function as above, but @@ -669,7 +669,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** * Calls the @p estimate @@ -686,7 +686,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -706,7 +706,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -725,7 +725,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -745,7 +745,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** @@ -764,7 +764,7 @@ class KellyErrorEstimator<1,spacedim> const Function *coefficients = 0, const unsigned int n_threads = multithread_info.n_default_threads, const types::subdomain_id subdomain_id = types::invalid_subdomain_id, - const types::material_id material_id = types::invalid_material_id); + const types::material_id material_id = numbers::invalid_material_id); /** * Exception diff --git a/deal.II/include/deal.II/numerics/vector_tools.h b/deal.II/include/deal.II/numerics/vector_tools.h index f6a1387560..157c56b0c5 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.h +++ b/deal.II/include/deal.II/numerics/vector_tools.h @@ -121,8 +121,8 @@ 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 types::internal_face_boundary_id-1 - * (types::internal_face_boundary_id is used for other purposes, + * which all boundary indicators from zero to numbers::internal_face_boundary_id-1 + * (numbers::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 @@ -694,7 +694,7 @@ namespace VectorTools * keys of this map * correspond to the number * @p boundary_indicator of the - * face. types::internal_face_boundary_id + * face. numbers::internal_face_boundary_id * is an illegal value for this key since * it is reserved for interior faces. * @@ -841,7 +841,7 @@ namespace VectorTools * The parameter @p boundary_component * corresponds to the number @p * boundary_indicator of the face. - * types::internal_face_boundary_id + * numbers::internal_face_boundary_id * is an illegal value, since it is * reserved for interior faces. * @@ -1147,7 +1147,7 @@ namespace VectorTools * The parameter @p boundary_component * corresponds to the number * @p boundary_indicator of the face. - * types::internal_face_boundary_id + * numbers::internal_face_boundary_id * is an illegal value, since it is * reserved for interior faces. * @@ -1242,7 +1242,7 @@ namespace VectorTools * The parameter @p boundary_component * corresponds to the number * @p boundary_indicator of the face. - * types::internal_face_boundary_id + * numbers::internal_face_boundary_id * is an illegal value, since it is * reserved for interior faces. * diff --git a/deal.II/include/deal.II/numerics/vector_tools.templates.h b/deal.II/include/deal.II/numerics/vector_tools.templates.h index 2df4c30f05..bea6de958e 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -308,7 +308,7 @@ namespace VectorTools // count, how often we have // added to this dof - Assert (touch_count[local_dof_indices[j]] < types::internal_face_boundary_id, + Assert (touch_count[local_dof_indices[j]] < numbers::internal_face_boundary_id, ExcInternalError()); ++touch_count[local_dof_indices[j]]; }; @@ -571,7 +571,7 @@ namespace VectorTools // function to hold on // all parts of the boundary typename FunctionMap::type boundary_functions; - for (types::boundary_id c=0; c unsigned int DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicators) const { - Assert (boundary_indicators.find(types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find(numbers::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); std::set boundary_dofs; @@ -1605,7 +1605,7 @@ template unsigned int DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const { - Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find (numbers::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 e23dd691a8..6b7d727666 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(types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find(numbers::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))); @@ -3948,7 +3948,7 @@ namespace DoFTools const std::set &boundary_indicators) { AssertDimension (component_select.size(), n_components(dof_handler)); - Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); const unsigned int dim=DH::dimension; @@ -4076,7 +4076,7 @@ namespace DoFTools const std::set &boundary_indicators) { AssertDimension (component_select.size(), n_components(dof_handler)); - Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); // let's see whether we have to @@ -5875,7 +5875,7 @@ namespace DoFTools std::vector &mapping) { Assert (&dof_handler.get_fe() != 0, ExcNoFESelected()); - Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); mapping.clear (); diff --git a/deal.II/source/grid/grid_generator.cc b/deal.II/source/grid/grid_generator.cc index 24a3432374..20136921f4 100644 --- a/deal.II/source/grid/grid_generator.cc +++ b/deal.II/source/grid/grid_generator.cc @@ -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 > cells(n_val_cells); unsigned int id = 0; for (unsigned int y=0; y > cells(n_val_cells); @@ -1110,7 +1110,7 @@ GridGenerator::subdivided_hyper_rectangle ( for (unsigned int z=0; z &tria, { for (unsigned int i=0;i::faces_per_cell;++i) { - if (cell->face(i)->boundary_indicator() == types::internal_face_boundary_id) + if (cell->face(i)->boundary_indicator() == numbers::internal_face_boundary_id) continue; // If x is zero, then this is part of the plane diff --git a/deal.II/source/grid/grid_in.cc b/deal.II/source/grid/grid_in.cc index a48f534ef3..25c7698101 100644 --- a/deal.II/source/grid/grid_in.cc +++ b/deal.II/source/grid/grid_in.cc @@ -357,9 +357,9 @@ void GridIn::read_ucd (std::istream &in) // 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)); + // we use only material_ids in the range from 0 to numbers::invalid_material_id-1 + Assert(material_id < numbers::invalid_material_id, + ExcIndexRange(material_id,0,numbers::invalid_material_id)); cells.back().material_id = static_cast(material_id); @@ -387,9 +387,9 @@ void GridIn::read_ucd (std::istream &in) // 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)); + // we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1 + Assert(material_id < numbers::internal_face_boundary_id, + ExcIndexRange(material_id,0,numbers::internal_face_boundary_id)); subcelldata.boundary_lines.back().boundary_id = static_cast(material_id); @@ -425,9 +425,9 @@ void GridIn::read_ucd (std::istream &in) // 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)); + // we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1 + Assert(material_id < numbers::internal_face_boundary_id, + ExcIndexRange(material_id,0,numbers::internal_face_boundary_id)); subcelldata.boundary_quads.back().boundary_id = static_cast(material_id); @@ -1000,9 +1000,9 @@ void GridIn::read_msh (std::istream &in) // 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)); + // we use only material_ids in the range from 0 to numbers::invalid_material_id-1 + Assert(material_id < numbers::invalid_material_id, + ExcIndexRange(material_id,0,numbers::invalid_material_id)); cells.back().material_id = static_cast(material_id); @@ -1029,9 +1029,9 @@ void GridIn::read_msh (std::istream &in) // 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)); + // we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1 + Assert(material_id < numbers::internal_face_boundary_id, + ExcIndexRange(material_id,0,numbers::internal_face_boundary_id)); subcelldata.boundary_lines.back().boundary_id = static_cast(material_id); @@ -1067,9 +1067,9 @@ void GridIn::read_msh (std::istream &in) // 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)); + // we use only boundary_ids in the range from 0 to numbers::internal_face_boundary_id-1 + Assert(material_id < numbers::internal_face_boundary_id, + ExcIndexRange(material_id,0,numbers::internal_face_boundary_id)); subcelldata.boundary_quads.back().boundary_id = static_cast(material_id); @@ -1618,10 +1618,10 @@ void GridIn<3>::read_netcdf (const std::string &filename) // we only handle boundary // indicators that fit into an // types::boundary_id. Also, we don't - // take types::internal_face_boundary_id + // take numbers::internal_face_boundary_id // as it denotes an internal face for (unsigned int i=0; i::face_iterator face = cell->face(face_reorder[f]); const types::boundary_id bi = face->boundary_indicator(); - if (bi != types::internal_face_boundary_id) + if (bi != numbers::internal_face_boundary_id) { // Code for polyline out << "2 1 " diff --git a/deal.II/source/grid/tria.cc b/deal.II/source/grid/tria.cc index 31a0ef4830..adef525f7f 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 -> types::internal_face_boundary_id - line->set_boundary_indicator (types::internal_face_boundary_id); + // interior line -> numbers::internal_face_boundary_id + line->set_boundary_indicator (numbers::internal_face_boundary_id); } // set boundary indicators where @@ -1824,13 +1824,13 @@ namespace internal // assert that we only set // boundary info once AssertThrow (! (line->boundary_indicator() != 0 && - line->boundary_indicator() != types::internal_face_boundary_id), + line->boundary_indicator() != numbers::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() == types::internal_face_boundary_id), + AssertThrow (! (line->boundary_indicator() == numbers::internal_face_boundary_id), ExcInteriorLineCantBeBoundary()); 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 -> types::internal_face_boundary_id - quad->set_boundary_indicator (types::internal_face_boundary_id); + // interior quad -> numbers::internal_face_boundary_id + quad->set_boundary_indicator (numbers::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 (types::internal_face_boundary_id); + line->set_boundary_indicator (numbers::internal_face_boundary_id); // next reset all lines bounding // boundary quads as on the // boundary also. note that since @@ -4117,7 +4117,7 @@ namespace internal new_lines[l]->clear_user_data(); new_lines[l]->clear_children(); // interior line - new_lines[l]->set_boundary_indicator(types::internal_face_boundary_id); + new_lines[l]->set_boundary_indicator(numbers::internal_face_boundary_id); } // Now add the four (two) @@ -6375,7 +6375,7 @@ namespace internal new_lines[i]->clear_user_data(); new_lines[i]->clear_children(); // interior line - new_lines[i]->set_boundary_indicator(types::internal_face_boundary_id); + new_lines[i]->set_boundary_indicator(numbers::internal_face_boundary_id); } // find some space for the newly to @@ -6394,7 +6394,7 @@ namespace internal new_quads[i]->clear_user_data(); new_quads[i]->clear_children(); // interior quad - new_quads[i]->set_boundary_indicator (types::internal_face_boundary_id); + new_quads[i]->set_boundary_indicator (numbers::internal_face_boundary_id); // set all line orientation // flags to true by default, // change this afterwards, if @@ -9472,7 +9472,7 @@ void Triangulation::set_boundary (const types::boundary_id number, const Boundary& boundary_object) { - Assert(number < types::internal_face_boundary_id, ExcIndexRange(number,0,types::internal_face_boundary_id)); + Assert(number < numbers::internal_face_boundary_id, ExcIndexRange(number,0,numbers::internal_face_boundary_id)); boundary[number] = &boundary_object; } @@ -9483,7 +9483,7 @@ template void Triangulation::set_boundary (const types::boundary_id number) { - Assert(number < types::internal_face_boundary_id, ExcIndexRange(number,0,types::internal_face_boundary_id)); + Assert(number < numbers::internal_face_boundary_id, ExcIndexRange(number,0,numbers::internal_face_boundary_id)); //delete the entry located at number. boundary.erase(number); @@ -9495,7 +9495,7 @@ template const Boundary & Triangulation::get_boundary (const types::boundary_id number) const { - Assert(number::get_boundary_indicators () const { //TODO: if boundary_id_t is a real integer type, this might become //a humongously large array... - std::vector bi_exists(types::internal_face_boundary_id, false); + std::vector bi_exists(numbers::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) diff --git a/deal.II/source/grid/tria_accessor.cc b/deal.II/source/grid/tria_accessor.cc index 972b4696d7..cb713aa258 100644 --- a/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/source/grid/tria_accessor.cc @@ -1285,7 +1285,7 @@ template void CellAccessor::set_material_id (const types::material_id mat_id) const { Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed()); - Assert ( mat_id < types::invalid_material_id, ExcIndexRange(mat_id,0,types::invalid_material_id)); + Assert ( mat_id < numbers::invalid_material_id, ExcIndexRange(mat_id,0,numbers::invalid_material_id)); this->tria->levels[this->present_level]->cells.boundary_or_material_id[this->present_index].material_id = mat_id; } diff --git a/deal.II/source/hp/dof_handler.cc b/deal.II/source/hp/dof_handler.cc index 75f2668392..35a74c9670 100644 --- a/deal.II/source/hp/dof_handler.cc +++ b/deal.II/source/hp/dof_handler.cc @@ -2869,7 +2869,7 @@ template <> DoFHandler::n_boundary_dofs (const FunctionMap &boundary_indicators) const { Assert (finite_elements != 0, ExcNoFESelected()); - Assert (boundary_indicators.find(types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find(numbers::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); // same as above, but with @@ -2905,7 +2905,7 @@ template <> DoFHandler::n_boundary_dofs (const std::set &boundary_indicators) const { Assert (finite_elements != 0, ExcNoFESelected()); - Assert (boundary_indicators.find (types::internal_face_boundary_id) == boundary_indicators.end(), + Assert (boundary_indicators.find (numbers::internal_face_boundary_id) == boundary_indicators.end(), ExcInvalidBoundaryIndicator()); // same as above, but with diff --git a/deal.II/source/numerics/error_estimator.cc b/deal.II/source/numerics/error_estimator.cc index c598979682..95517074b6 100644 --- a/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/source/numerics/error_estimator.cc @@ -907,7 +907,7 @@ namespace internal || (cell->subdomain_id() == subdomain_id)) && - ((material_id == types::invalid_material_id) + ((material_id == numbers::invalid_material_id) || (cell->material_id() == material_id))) ) { @@ -927,7 +927,7 @@ namespace internal && ((cell->neighbor(face_no)->material_id() == material_id) || - (material_id == types::invalid_material_id)); + (material_id == numbers::invalid_material_id)); else { for (unsigned int sf=0; sfn_children(); ++sf) @@ -935,7 +935,7 @@ namespace internal ->subdomain_id() == subdomain_id) && (material_id == - types::invalid_material_id)) + numbers::invalid_material_id)) || ((cell->neighbor_child_on_subface(face_no,sf) ->material_id() == material_id) @@ -1207,7 +1207,7 @@ estimate (const Mapping<1,spacedim> &mapping, const unsigned int n_solution_vectors = solutions.size(); // sanity checks - Assert (neumann_bc.find(types::internal_face_boundary_id) == neumann_bc.end(), + Assert (neumann_bc.find(numbers::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 == types::invalid_material_id) + ((material_id == numbers::invalid_material_id) || (cell->material_id() == material_id))) { @@ -1668,7 +1668,7 @@ estimate (const Mapping &mapping, || (cell->subdomain_id() == subdomain_id)) && - ((material_id == types::invalid_material_id) + ((material_id == numbers::invalid_material_id) || (cell->material_id() == material_id))) {