]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace invalid_manifold_id by flat_manifold_id
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 4 Aug 2018 16:51:51 +0000 (18:51 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 4 Aug 2018 16:54:37 +0000 (18:54 +0200)
14 files changed:
doc/doxygen/headers/glossary.h
examples/step-1/step-1.cc
include/deal.II/base/types.h
include/deal.II/grid/grid_tools.h
include/deal.II/grid/tria.h
include/deal.II/grid/tria_accessor.h
include/deal.II/grid/tria_accessor.templates.h
include/deal.II/grid/tria_objects.h
source/fe/mapping_q_generic.cc
source/grid/grid_tools.cc
source/grid/manifold_lib.cc
source/grid/tria.cc
tests/fail/arclength_boundary_02.cc
tests/mpi/fe_field_function_02.cc

index 3a4d72740a0d26917935b6f84b08bb3c2fb82178..a9fb7e8eec4f899870dab5dc4b025ac4d0cf2fc1 100644 (file)
  * is responsible to generate new points when the mesh is refined.
  *
  * By default, all manifold indicators of a mesh are set to
- * numbers::invalid_manifold_id. A typical piece of code that sets the
+ * numbers::flat_manifold_id. A typical piece of code that sets the
  * manifold indicator on a object to something else would look like
  * this, here setting the manifold indicator to 42 for all cells whose
  * center has an $x$ component less than zero:
index dbf94ccb07d6d1402dee9a8f7ce4d6590476f445..3c29516d88d828d0fc9d8362e13ef4cd9a8e623b 100644 (file)
@@ -124,7 +124,7 @@ void second_grid()
   // By default (i.e., for a Triangulation created by hand or without a
   // call to a GridGenerator function like GridGenerator::hyper_shell or
   // GridGenerator::hyper_ball), all cells and faces of the Triangulation
-  // have their manifold_id set to numbers::invalid_manifold_id, which is
+  // have their manifold_id set to numbers::flat_manifold_id, which is
   // the default if you want a manifold that produces straight edges, but
   // you can change this number for individual cells and faces. In that
   // case, the curved manifold thus associated with number zero will not
index f92594529224139c3086c39b4b23cf2adde2c088..a6724db1331595d6a3cd1707154bbc3be47ac12f 100644 (file)
@@ -228,9 +228,12 @@ namespace numbers
    * We assume that all valid manifold_ids lie in the range [0,
    * invalid_manifold_id).
    *
+   * @deprecated Use flat_manifold_id instead.
+   *
    * @see
    * @ref GlossManifoldIndicator "Glossary entry on manifold indicators"
    */
+  DEAL_II_DEPRECATED
   const types::manifold_id invalid_manifold_id =
     static_cast<types::manifold_id>(-1);
 
index f21a8ba5ff893a2fa3ee407fcb1351a3aaa17897..0322381f385c9b4b614a1b71c2bdef5e9ce78395 100644 (file)
@@ -2454,7 +2454,7 @@ namespace GridTools
   /**
    * Copy boundary ids to manifold ids on faces and edges at the boundary. The
    * default manifold_id for new Triangulation objects is
-   * numbers::invalid_manifold_id. This function copies the boundary_ids of
+   * numbers::flat_manifold_id. This function copies the boundary_ids of
    * the boundary faces and edges to the manifold_ids of the same faces and
    * edges, allowing the user to change the boundary_ids and use them for
    * boundary conditions regardless of the geometry, which will use
@@ -2511,7 +2511,7 @@ namespace GridTools
 
   /**
    * Copy material ids to manifold ids. The default manifold_id for new
-   * Triangulation objects is numbers::invalid_manifold_id. When refinements
+   * Triangulation objects is numbers::flat_manifold_id. When refinements
    * occurs, the Triangulation asks where to locate new points to the
    * underlying manifold.
    *
index bbba7634625ee9cd0e257ae5c1e5ea5b95b44d7d..91c7d3e2849bf4264a253bbeb31e8386ccfe3928 100644 (file)
@@ -186,7 +186,7 @@ struct CellData
    *
    * - vertex indices to invalid values
    * - boundary or material id zero (the default for boundary or material ids)
-   * - manifold id to numbers::invalid_manifold_id
+   * - manifold id to numbers::flat_manifold_id
    */
   CellData();
 };
@@ -3776,7 +3776,7 @@ inline CellData<structdim>::CellData()
   material_id = 0;
 
   // And the manifold to be invalid
-  manifold_id = numbers::invalid_manifold_id;
+  manifold_id = numbers::flat_manifold_id;
 }
 
 
index e609989151109432ce6b99b6c7021f6df41b6233..40ee283c6e440543ac037f435e4e114477b28b0e 100644 (file)
@@ -623,7 +623,7 @@ public:
   has_children() const;
 
   /**
-   * Dummy function that always returns numbers::invalid_manifold_id.
+   * Dummy function that always returns numbers::flat_manifold_id.
    */
   types::manifold_id
   manifold_id() const;
index 768bae31e0f4df769a73396f09cf8fd6781ad72f..45898346c6750b27e2c699fb9d5de3251c2818c2 100644 (file)
@@ -516,7 +516,7 @@ template <int structdim, int dim, int spacedim>
 types::manifold_id
 InvalidAccessor<structdim, dim, spacedim>::manifold_id() const
 {
-  return numbers::invalid_manifold_id;
+  return numbers::flat_manifold_id;
 }
 
 
@@ -2861,7 +2861,7 @@ TriaAccessor<0, 1, spacedim>::manifold_id() const
       tria->vertex_to_manifold_id_map_1d->end())
     return (*tria->vertex_to_manifold_id_map_1d)[this->vertex_index()];
   else
-    return numbers::invalid_manifold_id;
+    return numbers::flat_manifold_id;
 }
 
 
index f9d003291e71d3e402907307af5a05720da7d185..0a70fb9c5525be5defa7b3fbd4588af0336986d0 100644 (file)
@@ -170,7 +170,7 @@ namespace internal
 
       /**
        * Store manifold ids. This field stores the manifold id of each object,
-       * which is a number between 0 and numbers::invalid_manifold_id-1.
+       * which is a number between 0 and numbers::flat_manifold_id-1.
        */
       std::vector<types::manifold_id> manifold_id;
 
index e2f08ad7cbc4848cccf467f5db9f2fc7669faeb6..73a6b8ecfc8dc8da17ca92f8f5757f8dcaff37a9 100644 (file)
@@ -3885,7 +3885,7 @@ MappingQGeneric<dim, spacedim>::add_line_support_points(
                cell->line(line_no));
 
           const Manifold<dim, spacedim> &manifold =
-            ((line->manifold_id() == numbers::invalid_manifold_id) &&
+            ((line->manifold_id() == numbers::flat_manifold_id) &&
                  (dim < spacedim) ?
                cell->get_manifold() :
                line->get_manifold());
@@ -3908,7 +3908,7 @@ MappingQGeneric<dim, spacedim>::add_line_support_points(
                cell->line(line_no));
 
           const Manifold<dim, spacedim> &manifold =
-            ((line->manifold_id() == numbers::invalid_manifold_id) &&
+            ((line->manifold_id() == numbers::flat_manifold_id) &&
                  (dim < spacedim) ?
                cell->get_manifold() :
                line->get_manifold());
index 1b886afc14cdbdb749e556130e9073bea708f51d..9b26f8f52ed8766699989a8be9baa584c728094a 100644 (file)
@@ -3924,7 +3924,7 @@ namespace GridTools
       endf = tria.end_face();
     for (; face != endf; ++face)
       if ((face->at_boundary() ||
-           face->manifold_id() != numbers::invalid_manifold_id) &&
+           face->manifold_id() != numbers::flat_manifold_id) &&
           faces_to_remove[face->index()] == false)
         {
           for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_face; ++l)
@@ -3972,7 +3972,7 @@ namespace GridTools
       manifolds;
     // Set manifolds in new Triangulation
     for (auto manifold_id : manifold_ids)
-      if (manifold_id != numbers::invalid_manifold_id)
+      if (manifold_id != numbers::flat_manifold_id)
         manifolds[manifold_id] = tria.get_manifold(manifold_id).clone();
 
     tria.clear();
@@ -3981,7 +3981,7 @@ namespace GridTools
 
     // Restore manifolds
     for (auto manifold_id : manifold_ids)
-      if (manifold_id != numbers::invalid_manifold_id)
+      if (manifold_id != numbers::flat_manifold_id)
         tria.set_manifold(manifold_id, *manifolds[manifold_id]);
   }
 
index af6d2834eae2e0ce4f6d19acb9b1cb09cc5810b3..bcce5668d822cc8fdcea6cc3b75da039c6ca15a0 100644 (file)
@@ -1455,12 +1455,12 @@ TransfiniteInterpolationManifold<dim, spacedim>::initialize(
       bool cell_is_flat = true;
       for (unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
         if (cell->line(l)->manifold_id() != cell->manifold_id() &&
-            cell->line(l)->manifold_id() != numbers::invalid_manifold_id)
+            cell->line(l)->manifold_id() != numbers::flat_manifold_id)
           cell_is_flat = false;
       if (dim > 2)
         for (unsigned int q = 0; q < GeometryInfo<dim>::quads_per_cell; ++q)
           if (cell->quad(q)->manifold_id() != cell->manifold_id() &&
-              cell->quad(q)->manifold_id() != numbers::invalid_manifold_id)
+              cell->quad(q)->manifold_id() != numbers::flat_manifold_id)
             cell_is_flat = false;
       AssertIndexRange(static_cast<unsigned int>(cell->index()),
                        coarse_cell_is_flat.size());
@@ -1547,7 +1547,7 @@ namespace
             const types::manifold_id line_manifold_id =
               cell.line(line)->manifold_id();
             if (line_manifold_id == my_manifold_id ||
-                line_manifold_id == numbers::invalid_manifold_id)
+                line_manifold_id == numbers::flat_manifold_id)
               {
                 weights_vertices[GeometryInfo<2>::line_to_cell_vertices(line,
                                                                         0)] -=
@@ -1678,7 +1678,7 @@ namespace
             const types::manifold_id face_manifold_id =
               cell.face(face)->manifold_id();
             if (face_manifold_id == my_manifold_id ||
-                face_manifold_id == numbers::invalid_manifold_id)
+                face_manifold_id == numbers::flat_manifold_id)
               {
                 for (unsigned int line = 0;
                      line < GeometryInfo<2>::lines_per_cell;
@@ -1752,7 +1752,7 @@ namespace
             const types::manifold_id line_manifold_id =
               cell.line(line)->manifold_id();
             if (line_manifold_id == my_manifold_id ||
-                line_manifold_id == numbers::invalid_manifold_id)
+                line_manifold_id == numbers::flat_manifold_id)
               {
                 weights_vertices[GeometryInfo<3>::line_to_cell_vertices(line,
                                                                         0)] -=
index e2325b8b61ee86ce095919e52d774c96940cd00b..aec3fee2aa262f251ffe447e096ae393e354eff8 100644 (file)
@@ -1854,7 +1854,7 @@ namespace internal
           for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
             {
               (*triangulation.vertex_to_manifold_id_map_1d)
-                [cell->face(f)->vertex_index()] = numbers::invalid_manifold_id;
+                [cell->face(f)->vertex_index()] = numbers::flat_manifold_id;
 
               if (cell->at_boundary(f))
                 (*triangulation.vertex_to_boundary_id_map_1d)
@@ -5112,7 +5112,7 @@ namespace internal
                     // same object of the cell (which was stored in
                     // line->user_index() before) unless a manifold_id
                     // has been set on this very line.
-                    if (line->manifold_id() == numbers::invalid_manifold_id)
+                    if (line->manifold_id() == numbers::flat_manifold_id)
                     triangulation.vertices[next_unused_vertex] =
                       triangulation.get_manifold(line->user_index())
                         .get_new_point_on_line(line);
@@ -10269,8 +10269,8 @@ Triangulation<dim, spacedim>::set_manifold(
   const types::manifold_id       m_number,
   const Manifold<dim, spacedim> &manifold_object)
 {
-  Assert(m_number < numbers::invalid_manifold_id,
-         ExcIndexRange(m_number, 0, numbers::invalid_manifold_id));
+  Assert(m_number < numbers::flat_manifold_id,
+         ExcIndexRange(m_number, 0, numbers::flat_manifold_id));
 
   manifold[m_number] = manifold_object.clone();
 }
@@ -10289,8 +10289,8 @@ template <int dim, int spacedim>
 void
 Triangulation<dim, spacedim>::reset_manifold(const types::manifold_id m_number)
 {
-  Assert(m_number < numbers::invalid_manifold_id,
-         ExcIndexRange(m_number, 0, numbers::invalid_manifold_id));
+  Assert(m_number < numbers::flat_manifold_id,
+         ExcIndexRange(m_number, 0, numbers::flat_manifold_id));
 
   // delete the entry located at number.
   manifold.erase(m_number);
index 89e183a16b0109b71036f89961e17e4a04b50cf9..0fd4c2c83a2982e6a9ab21c4756b5b1f31b978b1 100644 (file)
@@ -51,7 +51,7 @@ main()
   GridGenerator::hyper_cube(tria);
 
   tria.set_all_manifold_ids_on_boundary(1);
-  tria.begin_active()->face(2)->set_manifold_id(numbers::invalid_manifold_id);
+  tria.begin_active()->face(2)->set_manifold_id(numbers::flat_manifold_id);
   tria.set_manifold(1, manifold);
 
   tria.refine_global(3);
index fe53a1c73a4df866d21b39a88942709c903e734e..6722fef8baf1317496aa6c7ddfa5150351981714 100644 (file)
@@ -84,7 +84,7 @@ test()
        ++cell)
     for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
       if (cell->at_boundary(f))
-        cell->face(f)->set_all_manifold_ids(numbers::invalid_manifold_id);
+        cell->face(f)->set_all_manifold_ids(numbers::flat_manifold_id);
   //  static const SphericalManifold<dim> boundary_shell;
   //  tr.set_manifold (0, boundary_shell);
   //  tr.set_manifold (1, boundary_shell);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.