]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed comments, made second arguments const. 413/head
authorLuca Heltai <luca.heltai@sissa.it>
Sun, 11 Jan 2015 13:23:31 +0000 (14:23 +0100)
committerLuca Heltai <luca.heltai@sissa.it>
Sun, 11 Jan 2015 13:23:31 +0000 (14:23 +0100)
include/deal.II/grid/grid_tools.h
source/grid/grid_tools.cc
source/grid/grid_tools.inst.in

index 1b99809908a74bc3c6228a3fb33ea864be1f9dd7..fc342de97ce7e7b1f806727196031a8f6a8c946e 100644 (file)
@@ -1153,18 +1153,14 @@ namespace GridTools
 
   /**
    * Copy boundary ids to manifold ids. The default manifold_id for
-   * new Triangulation objects is numbers::invalid_manifold_id. When
-   * refinements occurs, the Triangulation asks where to locate new
-   * points to the underlying manifold, and if the manifold_id of a
-   * boundary face is set to numbers::invalid_manifold_id, then
-   * Triangulation reverts back boundary_id (this was the behavior of
-   * deal.II < 8.2). This function copies the boundary_ids of the
-   * boundary faces to the manifold_ids of the same faces, allowing
-   * the user to change the boundary_ids and use them for boundary
-   * conditions regardless of the geometry, which will use
-   * manifold_ids to create new points. Only active cells will be
-   * iterated over. This is a function you'd typically call when there
-   * is only one active level on your Triangulation.
+   * new Triangulation objects is numbers::invalid_manifold_id. This
+   * function copies the boundary_ids of the boundary faces to the
+   * manifold_ids of the same faces, allowing the user to change the
+   * boundary_ids and use them for boundary conditions regardless of
+   * the geometry, which will use manifold_ids to create new
+   * points. Only active cells will be iterated over. This is a
+   * function you'd typically call when there is only one active level
+   * on your Triangulation.
    *
    * The optional parameter @p reset_boundary_ids, indicates wether
    * this function should reset the boundary_ids of the Triangulation
@@ -1178,7 +1174,7 @@ namespace GridTools
    */
   template <int dim, int spacedim>
   void copy_boundary_to_manifold_id(Triangulation<dim, spacedim> &tria,
-                                    bool reset_boundary_ids=false);
+                                    const bool reset_boundary_ids=false);
 
   /**
    * Copy material ids to manifold ids. The default manifold_id for
@@ -1187,10 +1183,11 @@ namespace GridTools
    * points to the underlying manifold.
    *
    * When reading a Triangulation from a supported input format,
-   * tipical informations that can be stored in a file are boundary
-   * conditions (which we store in boundary_ids), material types
-   * (which we store in material_ids) and in some cases subdomain ids
-   * (which we store in subdomain_ids).
+   * typical informations that can be stored in a file are boundary
+   * conditions for boundary faces (which we store in the boundary_id
+   * of the faces), material types for cells (which we store in the
+   * material_id of the cells) and in some cases subdomain ids for
+   * cells (which we store in the subdomain_id of the cell).
    *
    * If you read one of these grids into a Triangulation, you might
    * still want to use the material_id specified in the input file as
@@ -1214,7 +1211,7 @@ namespace GridTools
    */
   template <int dim, int spacedim>
   void copy_material_to_manifold_id(Triangulation<dim, spacedim> &tria,
-                                    bool compute_face_ids=false);
+                                    const bool compute_face_ids=false);
 
 
   /*@}*/
index 9f0a5b9b915ae30f52a6590e5acaa6424ee15693..3285cc8476a7158420f2aa2f12c9e4c1306dbc94 100644 (file)
@@ -2896,7 +2896,7 @@ next_cell:
 
   template <int dim, int spacedim>
   void copy_boundary_to_manifold_id(Triangulation<dim, spacedim> &tria,
-                                    bool reset_boundary_ids)
+                                    const bool reset_boundary_ids)
   {
 
     typename Triangulation<dim,spacedim>::active_cell_iterator
@@ -2915,7 +2915,7 @@ next_cell:
 
   template <int dim, int spacedim>
   void copy_material_to_manifold_id(Triangulation<dim, spacedim> &tria,
-                                    bool compute_face_ids)
+                                    const bool compute_face_ids)
   {
     typename Triangulation<dim,spacedim>::active_cell_iterator
     cell=tria.begin_active(), endc=tria.end();
@@ -2927,11 +2927,12 @@ next_cell:
           {
             for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
               {
-                cell->face(f)->set_manifold_id(cell->material_id());
                 if (cell->neighbor(f) != endc)
                   cell->face(f)->set_manifold_id
                   (std::min(cell->material_id(),
                             cell->neighbor(f)->material_id()));
+                else
+                  cell->face(f)->set_manifold_id(cell->material_id());
               }
           }
       }
index 246dcd76fd23060a4af49fd9539e248dde8cbeed..717981f487ab6d1fee6293d23ac4aaedccac0a4f 100644 (file)
@@ -393,9 +393,9 @@ for (deal_II_dimension : DIMENSIONS ; deal_II_space_dimension : SPACE_DIMENSIONS
 #if deal_II_space_dimension >= deal_II_dimension
  namespace GridTools \{
       template void copy_boundary_to_manifold_id<deal_II_dimension, deal_II_space_dimension>
-      (Triangulation<deal_II_dimension, deal_II_space_dimension> &, bool);
+      (Triangulation<deal_II_dimension, deal_II_space_dimension> &, const bool);
       template void copy_material_to_manifold_id<deal_II_dimension, deal_II_space_dimension>
-      (Triangulation<deal_II_dimension, deal_II_space_dimension> &, bool);
+      (Triangulation<deal_II_dimension, deal_II_space_dimension> &, const bool);
 
 \}
 #endif

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.